Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheBitcoinModule provides native Bitcoin operations including message signing, PSBT signing, sending Bitcoin, and balance queries. Access it via DynamicSDK.instance.bitcoin.
Prerequisites
- Dynamic SDK initialized (see Quickstart)
- User authenticated (see Authentication)
- Bitcoin enabled in the Dynamic dashboard
Get a Bitcoin Wallet
There are two paths to a Bitcoin wallet: filter the user’s existing wallets, or create a new one explicitly.Filter existing wallets
If Bitcoin is enabled and the user has a Bitcoin wallet (created automatically at signup), find it viauserWallets:
Create a new Bitcoin wallet
CallcreateWallet with EmbeddedWalletChain.btc:
Bitcoin wallets are derived as Native SegWit (
bc1q…) by default. Mainnet is the only network supported today.What is a satoshi?
A satoshi is the smallest unit of Bitcoin —1 BTC = 100,000,000 satoshis. All amount fields in the Bitcoin module (sendBitcoin, buildPsbt, getBalance) are expressed in satoshis, not BTC.
What is a PSBT?
A Partially Signed Bitcoin Transaction (PSBT) is a standard for transactions that have not yet been fully signed. It allows different participants with different keys to sign a transaction without sharing private keys, enabling safer multi-step or multi-sig flows.Get Balance
Query the Bitcoin balance (in satoshis) for a wallet:getBalance returns a Future<String> — satoshis as a string to preserve precision.
Operations
Detailed guides for each Bitcoin operation:- Sign a Message — sign arbitrary messages (ECDSA or BIP-322)
- Send Bitcoin — one-call transfer
- Build a PSBT — construct an unsigned PSBT
- Sign a PSBT — sign one or many PSBTs
- Send Raw Transaction — broadcast a pre-signed transaction
API Reference
| Method | Returns | Description |
|---|---|---|
getBalance | Future<String> | Get wallet balance in satoshis |
signMessage | Future<String> | Sign a message |
sendBitcoin | Future<String> | Send BTC, returns transaction ID |
buildPsbt | Future<String> | Build unsigned PSBT (base64) |
signPsbt | Future<String> | Sign a single PSBT |
signPsbts | Future<List<String>> | Sign multiple PSBTs |
sendRawTransaction | Future<String> | Broadcast raw transaction hex |
Next Steps
- TON Operations — TON blockchain operations
- SUI Operations — SUI blockchain operations
- Token Balances — Multi-chain balance queries