Add change output if needed
Add inputs to transaction (with validation)
Add outputs to transaction (with validation)
Build complete transaction from UTXOs
Optionaloptions: Partial<BuildOptions>Calculate fee based on size and fee rate Simply: size * feeRate
Calculate optimal change for stamp transactions
Calculate fee for stamp transaction using SRC-20 calculator
Create a new transaction
Estimate optimal fee for different input/output combinations
Estimate transaction size in bytes Basic formula: ~180 bytes per input + ~34 bytes per output + ~10 bytes overhead
OptionalhasWitness: booleanEstimate transaction size with different input/output types
Estimate total cost of stamp transaction including stamp value
Finalize and extract transaction (with validation)
Get dynamic dust thresholds for different output types
OptionalfeeRate: numberGet network type string from bitcoin.Network Return 'mainnet', 'testnet', or 'regtest' based on network
Optionalnetwork: NetworkGet SRC-20 minimum value (500,000 satoshis)
Get stamp fee rates for different transaction types
Check if change amount is above dust threshold
Sign transaction
Main transaction builder for creating Bitcoin transactions with advanced features
Remarks
Provides comprehensive transaction building capabilities including:
Example