import { AssetInfo, FeeRate } from '@xchainjs/xchain-client'; import { Address } from '@xchainjs/xchain-util'; import { Client as UTXOClient, PreparedTx, TxParams, UTXO, UtxoClientParams, UtxoSelectionPreferences } from '@xchainjs/xchain-utxo'; import * as Bitcoin from 'bitcoinjs-lib'; import { AddressFormat } from './types'; export declare const defaultBTCParams: UtxoClientParams; declare abstract class Client extends UTXOClient { protected addressFormat: AddressFormat; constructor(params?: UtxoClientParams & { addressFormat?: AddressFormat; }); getAssetInfo(): AssetInfo; validateAddress(address: string): boolean; protected compileMemo(memo: string): Buffer; protected getFeeFromUtxos(inputs: UTXO[], feeRate: FeeRate, data?: Buffer | null): number; /** * P2WPKH / P2SH-P2WPKH use `witnessUtxo` (the P2SH redeem script is attached later by the * keystore signer, which holds the public key; the Ledger client rebuilds inputs from `txHex`). * P2TR uses `witnessUtxo` + `tapInternalKey` reconstructed from the sender address. * P2PKH (legacy) uses `nonWitnessUtxo` built from the full previous transaction hex. */ protected addInputsToPsbt(psbt: Bitcoin.Psbt, inputs: UTXO[], sender: Address): void; buildTxEnhanced({ amount, recipient, memo, feeRate, sender, spendPendingUTXO, utxoSelectionPreferences, selectedUtxos, }: TxParams & { feeRate: FeeRate; sender: Address; spendPendingUTXO?: boolean; utxoSelectionPreferences?: UtxoSelectionPreferences; selectedUtxos?: UTXO[]; }): Promise<{ psbt: Bitcoin.Psbt; utxos: UTXO[]; inputs: UTXO[]; }>; /** Delegates to `buildTxEnhanced` so the original API stays in place. */ buildTx({ amount, recipient, memo, feeRate, sender, spendPendingUTXO, }: TxParams & { feeRate: FeeRate; sender: Address; spendPendingUTXO?: boolean; withTxHex?: boolean; }): Promise<{ psbt: Bitcoin.Psbt; utxos: UTXO[]; inputs: UTXO[]; }>; sendMax({ sender, recipient, memo, feeRate, spendPendingUTXO, utxoSelectionPreferences, selectedUtxos, }: { sender: Address; recipient: Address; memo?: string; feeRate: FeeRate; spendPendingUTXO?: boolean; utxoSelectionPreferences?: UtxoSelectionPreferences; selectedUtxos?: UTXO[]; }): Promise<{ psbt: Bitcoin.Psbt; utxos: UTXO[]; inputs: UTXO[]; maxAmount: number; fee: number; }>; prepareMaxTx({ sender, recipient, memo, feeRate, spendPendingUTXO, utxoSelectionPreferences, selectedUtxos, }: { sender: Address; recipient: Address; memo?: string; feeRate: FeeRate; spendPendingUTXO?: boolean; utxoSelectionPreferences?: UtxoSelectionPreferences; selectedUtxos?: UTXO[]; }): Promise; prepareTxEnhanced({ sender, memo, amount, recipient, spendPendingUTXO, feeRate, utxoSelectionPreferences, selectedUtxos, }: TxParams & { sender: Address; feeRate: FeeRate; spendPendingUTXO?: boolean; utxoSelectionPreferences?: UtxoSelectionPreferences; selectedUtxos?: UTXO[]; }): Promise; /** * @deprecated Use `prepareTxEnhanced` directly for explicit enhanced UTXO selection. */ prepareTx({ sender, memo, amount, recipient, spendPendingUTXO, feeRate, }: TxParams & { sender: Address; feeRate: FeeRate; spendPendingUTXO?: boolean; }): Promise; } export { Client };