UNPKG

@xchainjs/xchain-utxo

Version:
22 lines (21 loc) 786 B
import { UTXO } from '../types'; import { UtxoSelectionStrategy, UtxoSelectionResult } from './types'; /** * Branch and Bound strategy - optimal for minimizing fees and change */ export declare class BranchAndBoundStrategy implements UtxoSelectionStrategy { name: string; private static readonly MAX_TRIES; private static readonly DUST_THRESHOLD; private static readonly BYTES_PER_INPUT; private static readonly BYTES_PER_OUTPUT; private static readonly BASE_TX_SIZE; select(utxos: UTXO[], targetValue: number, feeRate: number, extraOutputs?: number): UtxoSelectionResult | null; private findExactMatch; private branchAndBound; private calculateEfficiency; /** * Calculate estimated transaction fee */ private calculateFee; }