diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..e4a564f --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,36 @@ +name: Publish documentation site + +on: + push: + branches: [main] + paths: + - "docs/site/**" + - ".github/workflows/pages.yml" +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: github-pages + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + - name: Configure Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b + - name: Upload site + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa + with: + path: docs/site + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e diff --git a/README.md b/README.md index 044f1ca..ddb738a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ A comprehensive TypeScript/JavaScript utility library that simplifies common Stellar blockchain operations. Built for developers who want clean, tested, and production-ready helpers for Stellar development. +**Documentation site:** [Stellar Toolkit guide](https://hyperdevtools.github.io/stellar-toolkit/) + **Current Version:** v0.1.0 ## 🎯 Overview diff --git a/docs/site/index.html b/docs/site/index.html new file mode 100644 index 0000000..a94be75 --- /dev/null +++ b/docs/site/index.html @@ -0,0 +1,148 @@ + + + + + + + Stellar Toolkit - Build with guardrails + + + +
+ +
+
+
+
+
TypeScript SDK companion
+

Useful Stellar operations, in one toolkit.

+

A compact wrapper around the Stellar SDK for account lookups, payments, trustlines, and asset utilities. Start on testnet, keep signing keys on a trusted server, and explicitly review every transaction.

+ +
+ +
+ +
+
+
01 / API map
+

One entry point, focused operations.

+

Instantiate StellarToolkit with a network and optional Horizon URL. Operations that submit transactions require secret material and return the resulting transaction hash.

+
+
+
01 / ACCOUNTS

Look up and fund

generateKeypair, getAccount, getBalances, accountExists, getNativeBalance, and testnet-only funding.

+
02 / PAYMENTS

Send and convert

sendPayment submits a payment; sendPathPayment submits a strict-receive path payment with a destination amount and maximum send amount.

+
03 / ASSETS

Trust and format

Add or remove trustlines, build a custom asset value, and format native or issued assets for display.

+
+
+ +
+
+
02 / Quick start
+

Read first. Sign only when ready.

+

This server-side example creates a testnet keypair, funds it through the testnet friendbot, and reads its balances. Keep the secret out of logs and source control.

+
+
import { StellarToolkit } from '@hyperdevtools/stellar-toolkit';
+
+const toolkit = new StellarToolkit({ network: 'testnet' });
+const keypair = toolkit.generateKeypair();
+
+// Public address is safe to share; store the secret securely if needed.
+console.log('Public key:', keypair.publicKey);
+await toolkit.fundTestnetAccount(keypair.publicKey);
+const balances = await toolkit.getBalances(keypair.publicKey);
+console.log('Testnet balances:', balances);
+

For a payment, load the source secret from a server-side secret manager or protected environment variable, verify the destination and amount, and call sendPayment only after explicit user intent. Never put signing keys in browser code or a NEXT_PUBLIC_* variable.

+
+ +
+
+
+
03 / Transaction safety
+

Secret keys are signing authority.

+

A leaked Stellar secret can authorize transactions from its account. Treat it like a production credential, not ordinary configuration.

+
+
    +
  • Use testnet for development and fund test accounts only.
  • +
  • Keep secrets server-side; never commit, print, or send them to analytics.
  • +
  • Validate the destination, asset issuer, amount, and network before signing.
  • +
  • Use a dedicated, minimally funded account for experiments; rotate a key if exposed.
  • +
  • Check transaction results and error handling before relying on an operation.
  • +
+
+

Browse the complete exported types in src/types.ts and implementation in src/core.

+
+
+ + +