@arkade-os/sdk Documentation - v0.5.0-rc.11
    Preparing search index...

    Function onchainRail

    • On-chain BTC send via collaborative exit — the Wallet-only on-chain path (no swap). Matches a bare BTC address or the on-chain part of a unified BIP21 URI and offboards VTXOs to the address via Ramps.offboard, which owns fee-aware coin selection, dust-safe change, and settlement.

      The exit fee is priced on the DESTINATION output — the one arkd charges for — and met from the balance, so the recipient receives exactly quote.amount (see RouteQuote). Ramps.offboardExact carries that; the gross-up this rail used to do could only approximate it.

      A request naming selectedVtxos offboards exactly those — so the exit need not sweep the whole off-chain balance into one change output — and only then does the quote carry the per-input intent fees: unselected, the coins are chosen later at settlement and there is nothing here to price.

      An explicit amount is mandatory. To sweep the full balance, call Ramps.offboard(address, feeInfo) directly — the router has no amountless path.

      Parameters

      • deps: { feeInfo: () => Promise<FeeInfo> }
        • feeInfo: () => Promise<FeeInfo>

          Source of the operator's fee schedule. Required: a rail that cannot price an offboard must not be constructible — a silently dropped rail on the money path is worse than a wiring error at startup.

      Returns PaymentRail