Public API
Headless settlement for agents.
api.settleproof.xyz has a visual console at the root and JSON endpoints under
/v1/*. Agents use the API to prepare deterministic escrow inputs, relay fully signed transactions, and read live devnet settlement state from the persistent indexer without opening the demo UI.Hosted surfaces
| URL | Audience | Purpose |
|---|---|---|
| api.settleproof.xyz | humans | API console with endpoint inventory and live protocol status |
| /openapi.json | agents + SDKs | OpenAPI 3.1 contract for generated clients and API review |
| /v1/status | agents | JSON status for deployed programs, relay, indexer, and reads |
| demo.settleproof.xyz | humans + merchants | visual merchant/x402 harness that uses the same protocol path |
Endpoint map
| Method | Path | Status | Use |
|---|---|---|---|
| GET | /openapi.json | live | OpenAPI 3.1 contract |
| GET | /v1/status | live | Protocol and deployment status |
| POST | /v1/escrows/prepare | live | Derive escrow PDA, vault ATA, merchant PDA, and task hash inputs |
| GET | /v1/escrows/:pda | live | Read one escrow account from devnet |
| GET | /v1/merchants/:pubkey | live | Read one registered merchant account from devnet |
| GET | /v1/indexer | live | List escrow accounts from the persistent devnet index |
| GET | /v1/indexer/events | live | List persisted settlement events |
| POST | /v1/indexer/sync | live | Trigger a program-account sync into the persistent index |
| GET | /v1/relay | live | Describe signed-transaction relay policy |
| POST | /v1/relay | live | Broadcast a base64 serialized, already-signed Solana transaction |
Prepare an escrow
/v1/escrows/prepare does not create an escrow. It prepares deterministic addresses and input bytes. The agent still signs locally with its wallet or posts an already-signed transaction to /v1/relay.
curl -s https://api.settleproof.xyz/v1/escrows/prepare \
-H 'content-type: application/json' \
-d '{
"agent_owner": "<agent wallet>",
"merchant": "<merchant wallet>",
"mint": "<USDC or mock mint>",
"amount_stroops": "1000000",
"ttl_seconds": 86400,
"task_intent": "book hotel abc123"
}'{
"data": {
"escrow_pda": "...",
"vault_token_account": "...",
"agent_token_account": "...",
"merchant_pda": "...",
"inputs": {
"task_hash": "...",
"task_hash_derived": true,
"amount_usdc": "1.000000"
},
"sdk_call": {
"package": "@aap/sdk-ts",
"method": "client.createEscrow",
"signer": "agent_owner"
}
}
}Headless agent flow
const quote = await fetch(
"https://api.settleproof.xyz/v1/escrows/prepare",
{ method: "POST", body: JSON.stringify(intent) },
).then((res) => res.json());
const { escrowPda } = await client.createEscrow({
agentOwner,
merchantPubkey,
mint,
amountStroops,
taskHash: hexToBytes(quote.data.inputs.task_hash),
ttlSeconds,
});
// Optional: broadcast an already-signed transaction through the public relay.
await fetch("https://api.settleproof.xyz/v1/relay", {
method: "POST",
body: JSON.stringify({
signed_transaction: signedTxBase64,
encoding: "base64",
confirm: true,
}),
});
const state = await fetch(
"https://api.settleproof.xyz/v1/indexer?merchant=...&limit=10",
).then((res) => res.json());Relay policy
No private keys
The public API never receives agent, merchant, or attestor secrets.
POST /v1/relay only accepts serialized transactions that have already been signed by the caller.curl -s https://api.settleproof.xyz/v1/relay
curl -s https://api.settleproof.xyz/v1/relay \
-H 'content-type: application/json' \
-d '{
"signed_transaction": "<base64 serialized signed tx>",
"encoding": "base64",
"confirm": true
}'Indexer filters
The current hosted indexer syncs live program accounts from Solana devnet into a persistent JSON store. Set INDEXER_STORE_PATH to a Railway volume path if you want the index to survive redeploys.
curl -s 'https://api.settleproof.xyz/v1/indexer?limit=10'
curl -s 'https://api.settleproof.xyz/v1/indexer?merchant=<merchant>&state=Pending'
curl -s 'https://api.settleproof.xyz/v1/indexer/events?limit=10'
curl -s -X POST 'https://api.settleproof.xyz/v1/indexer/sync'