@arkade-os/sdk Documentation - v0.4.54
    Preparing search index...

    Function selectVirtualCoins

    • Select virtual outputs to reach a target amount, prioritizing those closer to expiry

      Parameters

      • coins: ExtendedVirtualCoin[]

        List of virtual outputs to select from

      • targetAmount: number

        Target amount to reach in satoshis

      Returns { changeAmount: bigint; inputs: ExtendedVirtualCoin[] }

      Selected virtual outputs and change amount