Skip to main content

Quickstart

Five minutes, one golden path: wallet → faucet → quote → commit → reveal. Examples use curl against a running host — production https://api.skia.money, local development http://localhost:3000.
Bearer auth on testnet is simulated: the token is the caller’s wallet address. Commit and reveal authenticate as the taker (senderWallet).

1. Create a wallet

The response is a WalletSummary with custody: "server-custodial", seeded balances, and per-chain entries. Note the address — it is the bearer for everything below.

2. Fund it from the faucet

Credits testnet balances on the chosen chain. The faucet is rate-limited — repeat calls cool down with 429 and a Retry-After header.

3. Get a quote (free, no auth)

The QuoteResponse echoes the request and carries the exact uint256 signer/sender settlement fields, so the caller can construct /api/commit without holding request state. It also carries settlementMode (on-chain or simulated) — the honest answer for the lane you are about to settle on. Quotes are never cached: the response embeds a live signed maker order.

4. Commit

Commit has no confidentiality: the body carries all nine preimage fields in plaintext, and the withheld pieces are the maker signature, the AirSwap order nonce, and the protocol fee. What commit buys is equivocation-binding — the intent is bound to the taker under an expiry window, and the server’s stored commitNonce + commitmentExpiry are authoritative at reveal.

5. Reveal and settle

Reveal is single-fire — no transport retry; an already-revealed commit refuses. On success the Order settles through SwapERC20.swap on the active lane, or DB-simulated with txHash: null when the lane is not backed. The response’s settlement fields are what your balances, orders, and tier read from.

The one-shot alternative

The TypeScript SDK collapses steps 3–5 into one idempotent call:
swap() is single-fire and idempotent by key; resumeSwap() covers both crash windows (died between commit and reveal; died right after reveal). See the TypeScript SDK guide.

Next

  • Turn the quote into an obligation: Invoices.
  • Understand what commit actually buys: Settlements.
  • Full wire detail: the API Reference and the generated endpoint pages.