Skip to Content
Getting StartedQuickstart

Quickstart

Get your first private x402 payment running in under 10 minutes.

Prerequisites

1. Clone and install

git clone https://github.com/DavidZapataOh/lateo-protocol.git cd lateo-protocol/lateo pnpm install

2. Configure

cp proxy/.env.example proxy/.env

Edit proxy/.env with your testnet keys:

POOL_SECRET=S... # Pool operator secret key POOL_CONTRACT_ID=C... # Deployed pool contract ASP_MEMBERSHIP_CONTRACT_ID=C... ASP_NON_MEMBERSHIP_CONTRACT_ID=C... VERIFIER_CONTRACT_ID=C...

3. Start services

# Terminal 1: Privacy proxy cd proxy && npm run dev # Terminal 2: zkSearch (x402 service) cd zksearch && npm start # Terminal 3: Dashboard cd dashboard && npm run dev

4. Make your first private payment

  1. Open http://localhost:5173 in your browser
  2. Connect Freighter (switch to testnet)
  3. Click Deposit — enter an amount (e.g., 1 USDC)
  4. Freighter will ask you to sign the transact() call — this is the atomic ZK deposit
  5. Once confirmed, your balance appears in the dashboard
  6. Use the MCP server or API to make x402 payments through the pool

5. Verify on-chain

Open Stellar Expert  and search for the pool contract address. You’ll see transact() calls with Groth16 proofs verified on-chain — but no individual agent information.

What just happened?

  1. Deposit: Freighter signed a transact() call. The pool contract verified a Groth16 ZK proof, transferred your USDC, and inserted a commitment into the Merkle tree — all atomic.
  2. Payment: When you pay for an x402 service, the pool wallet sends the payment. On-chain, only “Pool → Service” is visible.
  3. Privacy: An observer cannot link your deposit to any specific payment. The ZK proof ensures your balance is valid without revealing which deposit is yours.
Last updated on