UNPKG

@node-dlc/core

Version:
24 lines (23 loc) 778 B
export interface UTXO { txid: string; vout: number; value: number; address: string; derivationPath?: string; } export declare const dustThreshold: (feeRate: bigint) => bigint; export declare const dualFees: (feeRate: bigint, numInputs: number, numContracts: number) => bigint; /** * Selects UTXOs for dual funding * @param utxos - UTXOs to select from * @param collaterals - Collaterals to fund (just one for non-batch tx) * @param feeRate - Fee rate in satoshis per byte * @returns Inputs and fee * @description * Add inputs until we reach or surpass the target value (or deplete) * Worst-case: O(n) */ export declare const dualFundingCoinSelect: (utxos: UTXO[], collaterals: bigint[], feeRate: bigint) => { inputs: UTXO[]; fee: bigint; };