Skip to main content
Call pay with a Bitcoin address. A solver locks BTC onchain in exchange for BTC from your Arkade wallet, and your client claims it to that address. During the developer preview, one solver serves this route on mainnet, for payments from 10,000 to 500,000 sats. On mutinynet, the solver registry lists a solver for it. On other networks, pay throws UnsupportedRoute until a solver serves the route. The wallet can also move bitcoin in and out through the operator alone, with no solver: see Boarding & Offboarding. That path settles in the next batch swap.

Setup

You need an Arkade Wallet. To create one, see Create Your Wallet. On mutinynet, create it with { isMainnet: false } and the mutinynet operator, https://mutinynet.arkade.sh.
The public registry does not list the preview solver yet. Save its card as beta-solver.card.json, from Lightning Payments, and pin it with discovery.localCards. The same card serves Lightning and onchain payments.
In Node, use the storage from Swap Client instead.

Pay a Bitcoin Address

pay picks the onchain route, gets a quote, and funds your side of the swap. The solver then locks the BTC onchain, and your client claims it to the recipient’s address. Keep the client running until the outcome is claimed, because your client builds and broadcasts that claim. The fee is charged in BTC, so maxFee names BTC. A BIP21 URI works in the same call. If the URI already sets an amount, do not pass amount. pay throws AmountMismatch, even when the two match. amount is what the recipient gets when the claim pays the quoted fee rate. The quote includes the miner fee for the onchain claim, at claimFeeRateSatVb. The client builds the claim at that rate or at the network’s current estimate, whichever is higher. Any difference comes out of the recipient’s output. To keep the payout exact, set the claim fee rate.

Set the Claim Fee Rate

The default claim fee rate is 1 sat/vB, the lowest rate the network relays. To keep the payout exact, set claimFeeRateSatVb at or above the network’s current estimate:
A higher rate raises the quoted fee, so raise maxFee with it. To build and broadcast the claim yourself, pass corridors.onchain.claim. Your builder replaces the default, and claimFeeRateSatVb still sets the fee added to the quote. Do not set claimFeeRateSatVb to null unless you claim yourself. null is manual mode: the client adds no claim fee to the quote and builds no default claim. Without corridors.onchain.claim, nobody claims the payment. The swap reports needs_recovery, and your funds come back only after the refund timelock.

Follow the Outcome

claimed means the onchain claim confirmed. refunded means the solver did not fill the swap, and your funds came back after the timelock. needs_recovery on this route usually means the swap is blocked: the funds are still locked, and swap.blockedReason says what is missing. An underfunded lock waits on the solver. A missing claim callback waits on your configuration. The client checks again on every pass, and the swap resumes when the cause clears. Show the reason. recover changes nothing on a blocked swap: before the refund timelock it throws SwapDriveRefusedError (refund-window-open), and with nothing swept it throws nothing-swept. For the other case, where outputs were swept, see Recover a Swept Swap.

Want to learn more?

Corridor Swaps

Routes with one endpoint outside Arkade, settled by paired HTLCs.

Swap Client

Storage, discovery, outcomes, and the errors every route can raise.