Caravan Documentation
    Preparing search index...

    Interface CancelRbfOptions

    Options for creating a cancel RBF transaction.

    interface CancelRbfOptions {
        absoluteFee: string;
        availableInputs: UTXO[];
        cancelAddress: string;
        dustThreshold: string;
        fullRBF?: boolean;
        globalXpubs?: GlobalXpub[];
        network: Network;
        originalTx: string;
        requiredSigners: number;
        reuseAllInputs?: boolean;
        scriptType: MultisigAddressType;
        strict?: boolean;
        targetFeeRate: number;
        totalSigners: number;
    }
    Index

    Properties

    absoluteFee: string

    The absolute fee of the original transaction in satoshis.

    availableInputs: UTXO[]

    Array of available UTXOs, including the original transaction's inputs.

    cancelAddress: string

    The address where all funds will be sent in the cancellation transaction.

    dustThreshold: string

    The dust threshold in satoshis. Outputs below this value are considered "dust" and may not be economically viable to spend.

    fullRBF?: boolean

    Whether to attempt full RBF even if the transaction doesn't signal it.

    false
    
    globalXpubs?: GlobalXpub[]

    Optional array of global xpubs to include in the PSBT.

    network: Network

    The Bitcoin network being used (e.g., mainnet, testnet).

    originalTx: string

    The hex-encoded original transaction to be replaced.

    requiredSigners: number

    The number of required signers for the multisig setup.

    reuseAllInputs?: boolean

    Whether to reuse all inputs from the original transaction in the replacement.

    For cancel transactions, this defaults to false as there's no risk of double-paying. Setting this to true will include all original inputs, potentially increasing fees but ensuring maximum conflict with the original transaction.

    false
    

    The type of script used for the transaction (e.g., P2PKH, P2SH, P2WSH).

    strict?: boolean

    If true, enforces stricter validation rules.

    When set to true, the following stricter rules (among others) are applied:

    • Ensures the new fee is significantly higher than the original fee
    • Strictly enforces output value rules (no increases except for fee)
    • Requires change outputs to be above the dust threshold
    • Strictly validates RBF signaling on input sequence numbers
    false
    
    targetFeeRate: number

    The target fee rate in satoshis per virtual byte. This is used to calculate the appropriate fee for the transaction.

    totalSigners: number

    The total number of signers in the multisig setup.