Bitcoin Development
This section covers practical Bitcoin development tasks, the building blocks you'll use when creating Bitcoin applications. In Bitcoin Fundamentals you learned how Bitcoin works conceptually: the UTXO model, the blockchain, the trust model, and incentives. Here we turn those ideas into implementation. Keys prove ownership, addresses encode spending conditions, transactions move UTXOs, and tools like PSBTs coordinate signing while monitoring keeps your app in sync with the chain. These guides focus on hands-on implementation: constructing transactions, managing keys, generating addresses, working with PSBTs, monitoring the blockchain, and more.
Key Management
Securely generate, store, and manage Bitcoin private keys. Learn about key derivation, encryption, and hardware wallet integration.
Key topics:
- Private key generation
- Key derivation (BIP32)
- Secure storage practices
- Hardware wallet protocols
Address Generation
Generate and validate Bitcoin addresses for different address types (P2PKH, P2SH, P2WPKH, P2WSH, P2TR). Understand encoding, validation, and best practices.
Key topics:
- Address types and encoding
- Bech32 and Base58 encoding
- Address validation
- Derivation paths
Fee Estimation
Get a fee rate (sat/vB) from your node (e.g. estimatesmartfee) or from external APIs so you can set transaction fees appropriately. Integrates with Transaction Construction and Coin Selection (see below).
Key topics:
- Node RPC (estimatesmartfee)
- External fee APIs (e.g. mempool.space)
- Confirmation targets and units
Coin Selection
Choose which UTXOs to spend so that total input value covers the payment plus fees. Implementation-focused: effective value, fee budget, and change handling. For algorithms and privacy strategies, see Wallet Development.
Key topics:
- Effective value and input size
- Selecting inputs to cover amount + fee
- Change output and dust
Transaction Construction
Build Bitcoin transactions from scratch, understanding inputs, outputs, fees, and signing. Learn the complete process from UTXO selection to broadcasting.
Key topics:
- Transaction structure and serialization
- Fee calculation strategies
- Coin selection algorithms
- Signing and validation
Signing & Sighash
Choose and use sighash types in code, multisig signing order, and how signing fits into PSBT workflows. For the protocol definition of sighash types, see Sighash Types.
Key topics:
- Sighash types in practice (ALL, ANYONECANPAY)
- Multisig signing and PSBT flow
- Single-input signing and witness
PSBT
Partially Signed Bitcoin Transactions (BIP-174) provide a standardized format for passing unsigned or partially signed transactions between different software and hardware. Essential for multi-party signing, hardware wallet integration, and air-gapped setups.
Key topics:
- PSBT structure and workflow
- Creating and combining PSBTs
- Hardware wallet integration
- Multi-signature coordination
Fee Bumping
When a transaction is stuck in the mempool, increase the effective fee using Replace-by-Fee (RBF) or Child Pays for Parent (CPFP). Developer-focused: when to use which, enabling RBF, and building replacement or child transactions in code.
Key topics:
- RBF vs CPFP and BIP 125 rules
- Enabling RBF and creating replacements
- Creating CPFP child transactions
Payment Requests
Request and receive Bitcoin payments: BIP 21 bitcoin: URIs, QR codes, verifying payment, and handling refunds. Use with Blockchain Monitoring to detect incoming payments and Price Tracking for fiat amounts on invoices.
Key topics:
- BIP 21 bitcoin: URI (generate and parse)
- QR codes and verification
- Refunds and confirmation handling
Blockchain Monitoring
Monitor the Bitcoin blockchain programmatically, track transactions, watch addresses, and respond to network events in real-time.
Key topics:
- Block and transaction monitoring
- Address watching
- Mempool tracking
- WebSocket and API integration
Price Tracking
Integrate Bitcoin price data into your applications using various APIs and services. Track prices, historical data, and market metrics.
Key topics:
- Price API integration
- Historical data retrieval
- Real-time price feeds
- Market data aggregation
See Advanced Topics for covenants, sidechains, trampoline routing, and more. In this section:
Mining Pools
Pool setup, monitoring, Stratum protocol, share validation, and pool architecture are covered in the Mining section.
Bitcoin Script Patterns
Common Bitcoin script patterns and templates for building smart contracts and advanced spending conditions.
Key topics:
- Script templates
- Common patterns (multisig, timelocks, etc.)
- Script optimization
- Miniscript integration
Miniscript
Structured policy language that compiles to Bitcoin Script. Express spending conditions in high-level policies and get correct, analyzable scripts for multisig, timelocks, vaults, and Taproot.
Key topics:
- Policy vs. script
- Fragments and composition
- Correctness and safety
- Tapscript support
Output Descriptors
Standardized, human-readable strings (BIP 380/386) that describe which output scripts and addresses a wallet can derive. Essential for watch-only wallets, backup/restore, and interoperability with hardware wallets and PSBT. Complements Miniscript (policies compile to descriptors).
Key topics:
- Script and key expressions (wpkh, wsh, tr, xpub, paths)
- Parsing, validating, and deriving addresses
- Use cases: watch-only, backup, scanning
- Setup & Infrastructure - Setup, testing, libraries, node architecture
- Wallet Development - HD wallets, coin selection, multisig
- Bitcoin Protocol - Script system, RPC, transaction structure
- UTXO Model - Understanding UTXOs for transaction building
- Bitcoin Developer Reference - Official documentation
- BIPs - Bitcoin Improvement Proposals
- Bitcoin Optech - Technical newsletter and guides
- Bitcoin Stack Exchange - Q&A community