Skip to main content
Onchain routes run on mutinynet only. A solver serves arkade:mutinynet/slip44:1 → bitcoin:mutinynet/slip44:1 on mutinynet, so the snippets use mutinynet. On other networks, pay throws UnsupportedRoute until a solver serves the route. The solver’s card currently accepts 1,000 to 50,000 sats per swap.
Pay a Bitcoin address from your Arkade wallet through a solver. The solver does the onchain side. The swap client gets the quote, funds the swap, and claims the result. The wallet can also move bitcoin in and out through the operator alone, with no solver: see Boarding & Offboarding. That path works on mainnet today, and settles in the next batch swap.

Setup

Prerequisites:
  • an initialized Arkade Wallet on mutinynet: Create Your Wallet, with { isMainnet: false } and the mutinynet operator, https://mutinynet.arkade.sh.
The client reads the mutinynet registry, which lists the onchain market:
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. Raise it when blocks are full:
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.