arkade:BTC → lightning:BTC and lightning:BTC → arkade:BTC
routes. For the model underneath, see Markets and
Execution and the protocol
reference.
Setup
- an initialized Arkade
IWallet— Create Your Wallet; - an Arkade server URL — developer resources lists the networks.
SwapRefusal where you request quotes:
SwapRefusal is that
solver declining instead of quoting — amount outside its bounds, route off,
no inventory — and it carries the reason; nothing is committed, so show the
reason or re-request. Check quote.pair matches the pair you asked for —
no transport does this for you.
Pay an Invoice
Decode the BOLT11 locally, then request a quote:requestLightningSend rejects expired invoices, unsafe refund windows, and a
quoted address that differs from the contract it derives locally.
This corridor is exact-out: quote.to_amount is the invoice amount and
quote.from_amount is what the lockup must carry — the spread is the fee.
requestLightningSend registers the lockup with your wallet’s contract
manager and derives the swap secrets from the wallet seed — the covenant is
watched, survives restart, and your app stores nothing. Fund it:
Refund a Stalled Send
If the solver never pays, the lockup is yours to reclaim oncerefund_locktime passes — nothing does this automatically:
RefundOutcome variants: resolved, refunded,
nothing_to_refund, and needs_recovery — the last is returned, not
retried, and needs the wallet’s VTXO recovery before a refund can be pushed.
Receive a Payment
Not available in the developer preview. The preview solver does not
serve
lightning:BTC → arkade:BTC yet. The API below is the released
surface, ready when a solver serves the corridor.requestLightningReceive derives the preimage and payout key from the wallet
seed, seals the claim packet, and verifies the lockup it derives locally. The
solver mints a hold invoice on the payment hash and never sees the preimage
until you claim.
receive.invoice) is the acceptance — there is
no accept message. The solver funds the Arkade lockup once it sees the
payment held.
Claim It
Claiming reveals the preimage, which is what lets the solver settle the Lightning payment: the swap completes only when you claim.claimReceiveLockup waits for the solver’s funding, then pushes the claim:
Arkade Assets
Swap BTC against an Arkade Asset.
RFQ Protocol
Review quote, transport, settlement, and recovery requirements.