Exclude Inputs Based On Maturity When Building Transactions
Overview
- Lead Developer: @evanlinjin
- Ticket: #143
- Pull Request: #258
- Feature Type: Non-breaking
Overview
- Two methods are added to the TxBuilder, allowing users to exclude inputs that are either (a) unconfirmed, or (b) below a certain confirmation threshold.
Example 1 | |
---|---|
Example 2 | |
---|---|
Why Do This?
These are convenience methods that fit a broad number of use cases. Previously, users had to do custom UTXO selection if they needed to ensure they used inputs that were confirmed onchain, or had a certain number of confirmations. This allows users to keep the BDK coins selection algos working their magic while also refraining from picking inputs that are not yet confirmed or within a specific confirmation threshold.