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

# Quickstart

> Quote, sign and settle one swap on Base Sepolia with curl and a wallet library.

This walks through one cNGN → USDC swap against the hosted relay. You need a wallet holding testnet cNGN on
Base Sepolia that has approved Permit2 once, and a way to sign EIP-712 typed data and EIP-191 messages
(viem, ethers, or a browser wallet).

<Steps>
  <Step title="Read the configuration">
    ```bash theme={null}
    export RELAY=https://relay-production-f175.up.railway.app
    curl -s $RELAY/v1/config | jq '{chainId, executor, permit2, requireTakerProof, tokens}'
    ```

    Note the token addresses and `requireTakerProof`. The hosted relay sets it to true.
  </Step>

  <Step title="Sign a taker proof">
    Sign the text `panofx-taker|84532|<your address>|<issuedAt>` with EIP-191 (`personal_sign`), where
    `issuedAt` is the current unix time in seconds. It is valid for 24 hours. See [Taker proof](/integrators/taker-proof).
  </Step>

  <Step title="Ask for a quote">
    ```bash theme={null}
    curl -s $RELAY/v1/quotes -H 'content-type: application/json' -d '{
      "chainId": 84532,
      "sellToken": "0xe2387F04d3858e7Cb64Ef5Ed6617f9B2fcEEAfa2",
      "buyToken":  "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "sellAmount": "10000000000",
      "taker": "0xYourAddress",
      "takerProof": { "issuedAt": 1757750400, "signature": "0x…" }
    }' | tee quote.json | jq '{status, quoteId, expiresAt, proceeds, fee, gasFee}'
    ```

    `status` is `quoted` with the terms, or `no_quote` with a `reason`. The quote is open for 20 seconds.
  </Step>

  <Step title="Sign the typed data">
    `quote.json` carries `typedData`: a Permit2 `PermitWitnessTransferFrom` with a `TakerAuth` witness, ready
    for `eth_signTypedData_v4`. With viem:

    ```ts theme={null}
    const q = JSON.parse(fs.readFileSync("quote.json", "utf8"));
    const signature = await walletClient.signTypedData({ account, ...q.typedData });
    ```

    Selling USDC? Sign an EIP-2612 permit for Permit2 too, and send it as `erc2612`. Selling cNGN needs the
    one-time on-chain approval instead.
  </Step>

  <Step title="Submit">
    ```bash theme={null}
    curl -s $RELAY/v1/executions -H 'content-type: application/json' \
      -H "Idempotency-Key: $(uuidgen)" \
      -d "{\"quoteId\": \"$(jq -r .quoteId quote.json)\", \"signature\": \"0x…\"}"
    ```

    `202` with `status: "submitted"` and a `txHash` means the keeper broadcast it. `200` with
    `status: "requote"` means the simulation failed and nothing moved; ask for a new quote.
  </Step>

  <Step title="Follow it">
    ```bash theme={null}
    curl -s $RELAY/v1/quotes/$(jq -r .quoteId quote.json) | jq '{status, final, settlement, timeline}'
    ```

    `status` goes `quoted → signed → submitted → settled`, and `final` turns true once the indexer has
    confirmed the fill.
  </Step>
</Steps>

<Check>
  The receipt is at `https://web-production-a2664.up.railway.app/receipt/<quoteId>`.
</Check>

For Solana devnet the shape differs in a few places: see [Solana](/integrators/solana).
