Recommended: JavaScript SDK for React Native
While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
dynamicClient.bitcoin.sendBitcoin builds, signs, and broadcasts a Bitcoin transfer in a single call. Use it when you don’t need to inspect or modify the PSBT before broadcast.
Parameters
Example
React Native
Converting between BTC and satoshis
amount is always a satoshi string. Convert from a user-supplied BTC value before calling:
BigInt:
Errors
sendBitcoin rejects when:
- The wallet is not a Bitcoin wallet, or the
walletIddoesn’t match a wallet in the current session. - The user cancels the signing prompt in the WebView.
- The connected external wallet refuses the request (insufficient funds, network mismatch, etc.).
- The broadcast fails (the network rejects the transaction).