UNPKG

@xchainjs/xchain-utxo

Version:
29 lines (28 loc) 680 B
import { UTXO } from '../types'; /** * Interface for UTXO selection strategies */ export interface UtxoSelectionStrategy { name: string; select(utxos: UTXO[], targetValue: number, feeRate: number, extraOutputs?: number): UtxoSelectionResult | null; } /** * Result of UTXO selection */ export interface UtxoSelectionResult { inputs: UTXO[]; changeAmount: number; fee: number; efficiency: number; strategy: string; } /** * UTXO selection preferences */ export interface UtxoSelectionPreferences { minimizeFee?: boolean; minimizeInputs?: boolean; minimizeChange?: boolean; avoidDust?: boolean; consolidateSmallUtxos?: boolean; }