> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skia.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create a wallet, fund it from the faucet, quote, commit, reveal — the five-minute golden path on the Skia settlement API.

# 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`.

> [!NOTE]
>
> 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

```bash theme={null}
curl -s -X POST https://api.skia.money/api/wallets \
  -H 'Content-Type: application/json' \
  -d '{"label": "agent-1"}'
```

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

```bash theme={null}
curl -s -X POST https://api.skia.money/api/wallets/<address>/faucet \
  -H 'Authorization: Bearer <address>' \
  -H 'Content-Type: application/json' \
  -d '{"chain": "base"}'
```

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)

```bash theme={null}
curl -s 'https://api.skia.money/api/quote?chainId=base&tokenIn=USDC&tokenOut=DAI&amountIn=100'
```

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

```bash theme={null}
curl -s -X POST https://api.skia.money/api/commit \
  -H 'Authorization: Bearer <address>' \
  -H 'Idempotency-Key: swap-2026-11-30-001' \
  -H 'Content-Type: application/json' \
  -d '{ ...the nine preimage fields from the quote... }'
```

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

```bash theme={null}
curl -s -X POST https://api.skia.money/api/reveal \
  -H 'Authorization: Bearer <address>' \
  -H 'Content-Type: application/json' \
  -d '{ ...the full 9+2-field Order... }'
```

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:

```ts theme={null}
import SkiaClient from "@skia-money/sdk";

const skia = new SkiaClient({ baseUrl: "https://api.skia.money" });

// 1. Create + fund a testnet taker
const wallet = await skia.createWallet({ label: "agent-1" });
await skia.faucet(wallet.address, "base");

// 2. One-shot swap: quote -> commit -> reveal, single-fire, idempotent by key
const result = await skia.swap({
  chainId: "base",
  tokenIn: "USDC",
  tokenOut: "DAI",
  amountIn: "100",
  senderWallet: wallet.address,
  idempotencyKey: "swap-2026-11-30-001", // replay-safe
});

console.log(result.txHash, result.settlementMode);
```

`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](https://docs.skia.money/sdk/typescript.md).

## Next

* Turn the quote into an obligation: [Invoices](https://docs.skia.money/concepts/invoices.md).
* Understand what commit actually buys: [Settlements](https://docs.skia.money/concepts/settlements.md).
* Full wire detail: the [API Reference](https://docs.skia.money/api-reference/overview.md) and the
  generated endpoint pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.