Configuration options for creating the cancel RBF transaction.
The base64-encoded PSBT of the cancel RBF transaction.
const cancelTx = createCancelRbfTransaction({
originalTx: originalTxHex,
availableInputs: availableUTXOs,
cancelAddress: 'bc1q...', // cancel address
network: Network.MAINNET,
scriptType: 'P2WSH',
requiredSigners: 2,
totalSigners: 3,
targetFeeRate: '10',
absoluteFee: '1000',
fullRBF: false,
strict: true
reuseAllInputs: false, // Default behavior, more efficient fee wise
});
Creates a cancel Replace-By-Fee (RBF) transaction.
This function creates a new transaction that double-spends at least one input from the original transaction, effectively cancelling it by sending all funds to a new address minus the required fees.