Caravan Documentation
    Preparing search index...

    Interface CPFPOptions

    Options for creating a CPFP transaction.

    interface CPFPOptions {
        absoluteFee: string;
        availableInputs: UTXO[];
        changeAddress: string;
        dustThreshold: string;
        globalXpubs?: GlobalXpub[];
        network: Network;
        originalTx: string;
        parentUtxo: UTXO;
        requiredSigners: number;
        scriptType: MultisigAddressType;
        spendableOutputIndex: number;
        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 spendable output from the parent transaction.

    changeAddress: string

    The address where any excess funds (change) will be sent in the child transaction.

    dustThreshold: string

    The dust threshold in satoshis. Outputs below this value are considered "dust".

    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 (parent) transaction to be accelerated.

    parentUtxo: UTXO

    The parent output UTXO with complete PSBT metadata. This UTXO represents the output from the parent transaction that will be spent in the child transaction. It must include all necessary signing information (scripts, derivation paths, etc.) for proper PSBT construction.

    This should be created using wallet-specific logic that can reconstruct the full UTXO metadata from the transaction output.

    requiredSigners: number

    The number of required signers for the multisig setup.

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

    spendableOutputIndex: number

    The index of the output in the parent transaction that will be spent in the child transaction.

    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
    • Requires change outputs to be above the dust threshold
    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.