Before you start
1. Install
2. List what the maker trades
No keys, no funds. If this prints routes, the SDK and the maker are both reachable.routes.ts
3. Receive L-BTC from a Lightning payment
You pay a Lightning invoice and receive L-BTC on Liquid. TheKaleidoSwap API does it in three calls: quote prices the route, start creates the swap, and following the swap claims the L-BTC for you.
swap.ts
SWAP_MNEMONIC and LIQUID_ADDRESS set, and pay the printed invoice (for example through the Mutinynet faucet). The script prints each phase and ends on settled.
If you stop the script after paying, run it again: resume() picks the swap up from ./swaps and claims it.
Next steps
The KaleidoSwap API
Quotes, refusals, your own store and signer, and errors.
Pay Lightning from on-chain
The opposite direction, with a refund path.
Swap states
Every status, and what your app does at each one.
Examples
Runnable programs in the SDK repository.