import BigNumber from "bignumber.js"; import { Transaction } from "bitcoinjs-lib"; import type { Account } from "@ledgerhq/types-live"; import type { Account as WalletAccount } from "@ledgerhq/wallet-btc/account"; import type { BitcoinCoinConfig } from "./config"; export declare const RBF_SEQUENCE_THRESHOLD = 4294967294; /** * Returns the set of input outpoints for a tx in "txid-index" format (same as operation.extra.inputs). */ export declare function getTxInputOutpoints(walletAccount: WalletAccount, txId: string): Promise>; export declare function getUtxoValue(walletAccount: WalletAccount, txid: string, index: number): Promise; type OriginalTxFeeContext = { tx: Transaction; vsize: number; oldFeeSat: BigNumber; oldFeeRateSatVb: BigNumber; incrementalFeeRateSatVb: BigNumber; }; export declare function getOriginalTxFeeContext(config: BitcoinCoinConfig, walletAccount: WalletAccount, originalTxId: string): Promise; /** * Minimum total fee (in sats) for a replacement tx to beat one specific conflicting tx. * RBF requires the replacement to pay strictly more total fee than the original; using * only a higher feerate can still yield a lower total fee if the replacement has a * smaller vsize (e.g. cancel with fewer outputs). The caller (e.g. wallet.buildAccountTx) * must take the max over all conflicting unconfirmed txs so the replacement beats every one. */ export declare const getMinReplacementFeeSat: (config: BitcoinCoinConfig, walletAccount: WalletAccount, originalTxId: string) => Promise; /** * Minimum replacement feerate (sat/vB) implied by RBF policy for the original tx. * Useful for building a speedup transaction. */ export declare const getMinReplacementFeeRateSatVb: (config: BitcoinCoinConfig, { account, originalTxId, }: { account: Account; originalTxId: string; }) => Promise; export {}; //# sourceMappingURL=rbfFees.d.ts.map