A TypeScript library for parsing Bitcoin Descriptors, including Miniscript-based ones. Streamlines creating Partially Signed Bitcoin Transactions (PSBTs) from Descriptors. Features BIP32, single-signature, and Hardware Wallet signing capabilities, and facilitates finalizing transactions.
This PR introduces support for the rbf parameter in the updatePsbtAsInput method, allowing users to specify whether a transaction should use Replace-By-Fee (RBF). The update ensures that transactions utilizing relative timelocks automatically opt into RBF unless explicitly disabled. Key changes include:
README.md: Updated to document the rbf parameter in updatePsbtAsInput.
src/descriptors.ts: Enhanced to process the rbf parameter.
src/psbt.ts: Integrated RBF logic with nSequence management.
package.json & package-lock.json: Updated dependencies for @bitcoinerlab/miniscript and @bitcoinerlab/secp256k1.
Default Behavior Change: The rbf parameter now defaults to true, differing from previous versions where it was not explicitly set.
Details
README Update: Detailed the usage of the rbf parameter in updatePsbtAsInput, including its default behavior and implications for transactions using relative timelocks.
Descriptor Changes:
Added rbf parameter handling in updatePsbtAsInput.
Ensured nSequence values comply with both relative timelocks and RBF requirements.
PSBT Changes:
Integrated logic to set nSequence values correctly based on rbf parameter.
Added error handling for incompatible sequence and RBF settings.
Dependency Updates:
Bumped @bitcoinerlab/miniscript to version 1.4.0.
Bumped @bitcoinerlab/secp256k1 to version 1.1.1.
Default Behavior Change:
The rbf parameter now defaults to true, which changes the default behavior from previous versions where it was not explicitly set. This ensures that transactions are replaceable by default unless specified otherwise.
Notes
Transactions using relative timelocks (nSequence < 0x80000000) inherently opt into RBF due to the overlapping nSequence value ranges.
The rbf parameter is optional and defaults to true, ensuring backward compatibility.
This update provides more control over transaction fee adjustments and ensures correct behavior with relative timelocks.
Overview
This PR introduces support for the
rbf
parameter in theupdatePsbtAsInput
method, allowing users to specify whether a transaction should use Replace-By-Fee (RBF). The update ensures that transactions utilizing relative timelocks automatically opt into RBF unless explicitly disabled. Key changes include:rbf
parameter inupdatePsbtAsInput
.rbf
parameter.@bitcoinerlab/miniscript
and@bitcoinerlab/secp256k1
.rbf
parameter now defaults totrue
, differing from previous versions where it was not explicitly set.Details
README Update: Detailed the usage of the
rbf
parameter inupdatePsbtAsInput
, including its default behavior and implications for transactions using relative timelocks.Descriptor Changes:
rbf
parameter handling inupdatePsbtAsInput
.PSBT Changes:
rbf
parameter.Dependency Updates:
@bitcoinerlab/miniscript
to version1.4.0
.@bitcoinerlab/secp256k1
to version1.1.1
.Default Behavior Change:
rbf
parameter now defaults totrue
, which changes the default behavior from previous versions where it was not explicitly set. This ensures that transactions are replaceable by default unless specified otherwise.Notes
nSequence < 0x80000000
) inherently opt into RBF due to the overlapping nSequence value ranges.rbf
parameter is optional and defaults totrue
, ensuring backward compatibility.This update provides more control over transaction fee adjustments and ensures correct behavior with relative timelocks.