Overview
This guide shows you how to sign Bitcoin transactions using Dynamic’s Node SDK. Bitcoin uses PSBTs (Partially Signed Bitcoin Transactions) for signing. You create a PSBT, pass it to signTransaction() as a base64 string, and receive the signed PSBT back.
Prerequisites
Step 1: Install Dependencies
Step 2: Create and Sign a PSBT
The approach for signing transactions depends on how you created your wallet:
With Automatic Backup (Recommended)
If you created your wallet with backUpToDynamic: true, you can sign directly without retrieving key shares:
With Manual Backup
If you created your wallet with backUpToDynamic: false, you must retrieve and provide external key shares:
Password Handling Notes:
- If your wallet was created without a password, omit the
password parameter
- If your wallet was created with a password, you must provide it for all operations
- The password parameter is always optional in the API, but required if the wallet is password-protected
Step 3: Finalize and Broadcast
After signing, finalize the PSBT and extract the raw transaction for broadcasting:
Complete Example: Send Bitcoin
Here’s a complete example of creating, signing, and broadcasting a Bitcoin transaction:
Taproot Transaction Signing
For Taproot addresses, the signing process is the same, but uses Schnorr signatures internally:
The SDK only signs inputs that belong to the sender address. Other inputs remain unsigned:
Error Handling
Next Steps
Last modified on May 21, 2026