Caravan Documentation
    Preparing search index...

    Interface AcceleratedRbfOptions

    Options for creating an accelerated RBF transaction.

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

    Hierarchy

    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.

    changeAddress?: string

    The address to use for the new change output, if different from the original. Use this option to specify a new address for the change output.

    • Provide either changeAddress or changeIndex, not both.
    • If changeAddress is provided, this address will be used for the new change output, regardless of the original transaction's change output address.
    • Must be a valid Bitcoin address for the specified network.
    changeIndex?: number

    The index of the change output in the original transaction. Use this option to specify which output from the original transaction should be treated as the change output and potentially modified.

    • Provide either changeIndex or changeAddress, not both.
    • If changeIndex is provided, the address of the output at this index in the original transaction will be used for the new change output.
    • Must be a non-negative integer.
    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 while accelerating the transaction.

    Setting this to false can potentially lead to a "replacement cycle attack" where multiple versions of a transaction could be confirmed if they don't conflict with each other. Only set this to false if you fully understand the risks and have implemented appropriate safeguards.

    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.