UNPKG

@arklabs/wallet-sdk

Version:

Bitcoin wallet SDK with Taproot and Ark integration

22 lines (21 loc) 883 B
import type { Coin, VirtualCoin } from "../wallet"; /** * Select coins to reach a target amount, prioritizing those closer to expiry * @param coins List of coins to select from * @param targetAmount Target amount to reach in satoshis * @returns Selected coins and change amount, or null if insufficient funds */ export declare function selectCoins(coins: Coin[], targetAmount: number): { inputs: Coin[] | null; changeAmount: number; }; /** * Select virtual coins to reach a target amount, prioritizing those closer to expiry * @param coins List of virtual coins to select from * @param targetAmount Target amount to reach in satoshis * @returns Selected coins and change amount, or null if insufficient funds */ export declare function selectVirtualCoins(coins: VirtualCoin[], targetAmount: number): { inputs: VirtualCoin[] | null; changeAmount: number; };