Overview
StellarModule provides native Stellar blockchain operations including message signing, transaction envelope signing, XLM and asset transfers, trustlines, balance queries, and network details. Access it via DynamicSDK.instance().stellar.
Prerequisites
- Dynamic SDK initialized (see Quickstart)
- User authenticated (see Authentication)
- Stellar enabled in the Dynamic dashboard
Get a Stellar Wallet
If Stellar is enabled in the dashboard, the user gets a Stellar wallet on signup. Find it viauserWallets:
Get Balance
Query the XLM balance for a wallet. Returned as a string to preserve precision. PassassetCode and assetIssuer to query a non-native asset instead.
Get Network
Query the Stellar network the wallet is connected to:Sign a Message
Sign a message using the connected Stellar wallet:Sign a Transaction
Sign a base64-encoded transaction envelope XDR. Returns the signed envelope XDR:Send a Balance
Send XLM, or a Stellar asset, to a recipient. Returns the transaction hash.Add a Trustline
Add a trustline for a non-native asset. An account must hold a trustline for an asset before it can receive it:API Reference
Next Steps
- Bitcoin Operations: Bitcoin operations
- SUI Operations: SUI operations
- Token Balances: Multi-chain balance queries