Swap Lifecycle
Core endpoints that drive a swap from creation through execution: request a quote, poll for the current required action, submit signed transactions, and settle Lightning swaps via LNURL-withdraw.
Create a new swap
Creates a new swap quote and returns the initial serialized swap state.
Get swap status
Returns the current serialized state of an existing swap, optionally including execution actions such as funded PSBTs or manual settlement transactions.
Submit signed transactions
Submits signed transactions for the current actionable swap step.
Settle a Lightning swap with LNURL-withdraw
Triggers an LNURL-withdraw based settlement for supported Lightning-to-smart-chain swaps. Call this when `getSwapStatus` returns a `SendToAddress` current action, which corresponds to the `PR_CREATED` stage for these swaps. If the swap already contains an LNURL-withdraw link, do not pass `lnurlWithdraw`; otherwise `lnurlWithdraw` must be provided.