/** * Fee calculation constants for Bitcoin transactions. * Based on btc-staking-ts values, adapted for vault peg-in transactions. */ export declare const P2TR_INPUT_SIZE = 58; export declare const MAX_NON_LEGACY_OUTPUT_SIZE = 43; export declare const TX_BUFFER_SIZE_OVERHEAD = 11; export declare const BTC_DUST_SAT = 546; /** Pre-computed BigInt dust threshold to avoid repeated conversions in hot paths */ export declare const DUST_THRESHOLD: bigint; export declare const LOW_RATE_ESTIMATION_ACCURACY_BUFFER = 30; export declare const WALLET_RELAY_FEE_RATE_THRESHOLD = 2; /** * Adds a buffer to the transaction fee calculation if the fee rate is low. * * Some wallets have a relayer fee requirement. If the fee rate is <= 2 sat/vbyte, * there's a risk the fee might not be sufficient for transaction relay. * We add a buffer to ensure the transaction can be relayed. * * @param feeRate - Fee rate in satoshis per vbyte * @returns Buffer amount in satoshis to add to the transaction fee */ export declare function rateBasedTxBufferFee(feeRate: number): number; /** * Number of always-present fixed (non-HTLC) outputs in a Pre-PegIn * transaction. Currently this is 1 CPFP anchor output. */ export declare const PEGIN_FIXED_OUTPUTS = 1; /** * Size of the auth-anchor `OP_RETURN` output when committed into a * Pre-PegIn. The output carries `OP_RETURN ` = 34 script * bytes, plus 8 bytes value + 1 byte scriptLen = ~43 bytes total — * same as {@link MAX_NON_LEGACY_OUTPUT_SIZE}. Counted as one output * toward the fee-estimation output budget. */ export declare const PEGIN_AUTH_ANCHOR_OUTPUTS = 1; /** * Compute the total number of outputs (before change) in a Pre-PegIn * transaction. * * A Pre-PegIn tx has: N HTLC outputs (one per vault) + optional * auth-anchor OP_RETURN output + fixed outputs (CPFP anchor). This * count is used for fee estimation only — the change output is handled * separately by `selectUtxosForPegin` when the change amount exceeds * the dust threshold. * * @param vaultCount - Number of vaults in the batch (≥1). * @param hasAuthAnchor - Whether the Pre-PegIn will carry an auth-anchor * OP_RETURN output. Pass the same value the * caller will hand to `buildPrePeginPsbt`'s * `authAnchorHash` (truthy ↔ true) so the fee * budget stays in lockstep with the output set. * @returns Total output count before change. * @throws If `vaultCount` is not a positive integer. */ export declare function peginOutputCount(vaultCount: number, hasAuthAnchor: boolean): number; /** * Safety multiplier for split transaction fee validation. * The signed PSBT's fee rate and absolute fee must not exceed this multiple * of the planned values. 5x accounts for witness estimation variance while * catching catastrophic wallet-side overpayment. */ export declare const SPLIT_TX_FEE_SAFETY_MULTIPLIER = 5; /** * Binary-independent cap on the implied per-HTLC reserve * (`htlcValue - peginAmount - depositorClaimValue`): the exact identity in * `assertWasmPeginSizing` is WASM-vs-WASM, so this pure-JS bound is what * limits a doctored binary. 100,000 vbytes = Bitcoin Core's relay ceiling * (MAX_STANDARD_TX_WEIGHT / 4) — ~19× the protocol-max PegIn (~5,150 vbytes * at 99 VKs + 99 UCs), so it can never false-positive. */ export declare const MAX_REASONABLE_PEGIN_VBYTES = 100000n; //# sourceMappingURL=constants.d.ts.map