Onchain routes run on mutinynet only. A solver serves
arkade:mutinynet/slip44:1 → bitcoin:mutinynet/slip44:1 and the reverse
route on mutinynet, so the snippets use mutinynet. On other networks, pay
and receive throw UnsupportedRoute until a solver serves the route. The
solver’s card currently accepts 1,000 to 50,000 sats per swap.arkade:BTC → onchain:BTC and onchain:BTC → arkade:BTC routes:
pay a Bitcoin address from your Arkade wallet, or take a deposit from a Bitcoin
address into it, 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
- an initialized Arkade
Walleton mutinynet: Create Your Wallet, with{ isMainnet: false }and the mutinynet operator,https://mutinynet.arkade.sh.
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, setclaimFeeRateSatVb at or above the network’s
current estimate. Raise it when blocks are full:
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. For deposits, null also removes the default
refund: pass corridors.onchain.refund, or a deposit the solver never funds
stays blocked.
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. Do not call recover. With nothing swept, it
throws SwapDriveRefusedError (nothing-swept). Before the refund timelock, it
throws refund-window-open. For the other case, where outputs were swept, see
Recover a Swept Swap.
Deposit from Bitcoin
The client also serves the reverse route, from a Bitcoin address into Arkade.receive returns a Bitcoin address for the payer to fund. amount is what
arrives in your Arkade wallet.
Send exactly depositSats to address. That is the amount the solver
quoted, fee included. The client claims your side within Arkade once the solver
funds it. If the solver never does, the client takes the deposit back after the
timelock, to a boarding address of this wallet.
claimed means the sats arrived in your Arkade wallet. refunded means the
Bitcoin deposit came back. The client reads the chain through a public Esplora
server for your network. To use your own, pass
corridors: { onchain: { chain: { esploraUrl } } }.
To move bitcoin you already hold into Arkade with no solver fee, use
boarding. Boarding is a wallet
operation, not a 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.
Lightning Payments
Pay and receive over Lightning through Arkade.
Exchange Assets
Swap bitcoin for other assets, settled through Arkade.