import type { BitcoinOutput, BitcoinResources, Transaction, NetworkInfo, UtxoStrategy, BtcOperation } from "./types"; import { $Shape } from "utility-types"; import type { TX } from "@ledgerhq/wallet-btc/index"; import BigNumber from "bignumber.js"; import type { CryptoCurrency } from "@ledgerhq/ledger-wallet-framework/types"; import type { Account } from "@ledgerhq/types-live"; export declare const inferFeePerByte: (t: Transaction, networkInfo: NetworkInfo) => BigNumber; export declare const isValidRecipient: (params: { currency: CryptoCurrency; recipient: string; }) => Promise; type UTXOStatus = { excluded: true; reason: "pickPendingUtxo" | "userExclusion"; } | { excluded: false; reason?: undefined; }; export declare const getUTXOStatus: (utxo: BitcoinOutput, utxoStrategy: UtxoStrategy) => UTXOStatus; type CoinLogic = { hasExtraData?: boolean; hasExpiryHeight?: boolean; getAdditionals?: (arg0: { transaction: Transaction; }) => string[]; asExplicitTransactionRecipient?: (arg0: string) => string; onScreenTransactionRecipient?: (arg0: string) => string; postBuildBitcoinResources?: (arg0: Account, arg1?: BitcoinResources) => BitcoinResources; syncReplaceAddress?: (addr: string) => string; injectGetAddressParams?: (arg0: Account) => any; }; export declare const bchToCashaddrAddressWithoutPrefix: (recipient: string) => string; export declare const perCoinLogic: Partial>; /** * Derives a transaction sequence number (nonce) from a list of account inputs. * * This is used to compute the `transactionSequenceNumber` for Bitcoin-like UTXO transactions. * * - Only inputs that belong to the current account are considered (`accountInputs`) * - If an input is missing a `sequence`, it is assumed to be `0xfffffffe` (the default used by Bitcoin Core) * - See: https://bitcoin.stackexchange.com/questions/48384/why-bitcoin-core-creates-time-locked-transactions-by-default * - See: https://learnmeabitcoin.com/technical/transaction/input/sequence/ * - The sequence number returned is the **minimum** among all inputs (most conservative RBF/locktime signal) * * ### Rationale: * - In Bitcoin, `nSequence = 0xffffffff` disables both RBF and locktime * - `nSequence < 0xffffffff` enables locktime, and may signal RBF (if any input does, the whole tx is replaceable per BIP 125) * - Using the minimum allows accurate inference of RBF/locktime behavior based on account-controlled inputs * - If no inputs are present (e.g., receive-only or watch-only tx), returns `undefined` * * @param accountInputs - The list of transaction inputs owned by the user's account * @returns The derived transaction sequence number, or `undefined` if no relevant inputs */ export declare function inferTransactionSequenceNumberFromInputs(accountInputs: Array<{ sequence?: number; }>): number | undefined; export declare const mapTxToOperations: (tx: TX, currencyId: string, accountId: string, accountAddresses: Set, changeAddresses: Set) => $Shape; export {}; //# sourceMappingURL=logic.d.ts.map