Skip to main content
Bitcoin is the original cryptocurrency using a UTXO (Unspent Transaction Output) model. This guide covers Bitcoin-specific features when using Dfns wallets.

UTXO model

Unlike account-based blockchains, Bitcoin uses UTXOs. Each transaction consumes existing UTXOs and creates new ones. Key implications:
  • Transaction confirmation: Wait for a transaction to be confirmed before sending another to avoid double-spending the same UTXOs
  • UTXO management: Dfns automatically selects UTXOs for your transactions
  • Consolidation: Many small UTXOs can increase transaction fees; consider consolidating
When Dfns builds transactions, it may use unconfirmed UTXOs. These will be verified on-chain, and Dfns uses Child-Pays-for-Parent (CPFP) to ensure transactions confirm even if parent transactions have low fees. CPFP works by creating a new transaction (the “child”) that spends the output of an unconfirmed transaction (the “parent”) with a high enough fee to incentivize miners to confirm both transactions together.

Address types

Dfns supports multiple Bitcoin address types:
Address TypePrefixSignature
Pay-to-Taproot (P2TR)bc1p...Schnorr
Pay-to-Witness-Public-Key-Hash (P2WPKH)bc1q...ECDSA
When creating a Bitcoin wallet, specify the key scheme:
  • EdDSA or Schnorr for Taproot addresses
  • ECDSA for SegWit addresses

Transfers

Use the Transfer Asset endpoint with kind: Native to send BTC. Specify the amount in satoshis (1 BTC = 100,000,000 satoshis).

Fee priority

Bitcoin fees are based on network congestion. Use the priority field to control fees:
PriorityDescription
SlowLower fees, longer confirmation time
StandardBalanced fees and confirmation time
FastHigher fees, faster confirmation
Dfns uses the Estimate Fees endpoint to calculate appropriate fees.

Transaction management

Waiting for confirmations

Before sending a new transaction, ensure previous transactions are confirmed.

Speed up transactions

If a transaction is stuck in the mempool, use the Speed Up Transfer endpoint to create a CPFP transaction with higher fees.

SDK integration

For full transaction control, use the Dfns SDK with bitcoinjs-lib. See the PSBT signing example.