NOMOS x402 Buyer Quickstart

Buy one governed NOMOS full-chain verification for 0.001 USDC on Base mainnet and cryptographically verify the signed execution receipt. Everything runs over the open x402 v2 protocol — no account, no API key, no OAuth. This page is a technical quickstart, not a revenue or security guarantee.

Downloads

What you are buying

FieldValue
ResourcePOST https://tooloracle.io/v2/nomos_full_chain_verification
Protocolx402 v2: challenge in PAYMENT-REQUIRED, payment in PAYMENT-SIGNATURE, settlement in PAYMENT-RESPONSE (base64-JSON headers). The legacy X-PAYMENT header is not accepted on /v2 routes.
Scheme / Networkexact on eip155:8453 (Base mainnet)
AssetUSDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Price of this route1000 atomic = 0.001 USDC (hard client-side ceiling). Pricing varies by route — the authoritative price is always the accepts[] block of the live PAYMENT-REQUIRED challenge.
payTo0x11f591C3496C0632e7B173184f5Bc71dC941125D
Request body{"intent":"verify_full_chain","client_nonce":"<8-64 chars [A-Za-z0-9_-]>"}
You needa wallet with ≥ 0.001 USDC on Base. No ETH needed — the payment is an EIP-3009 authorization the facilitator submits on-chain.

Five steps

# 1. download the files above into an empty folder (test file into test/)
# 2. install pinned dependencies
npm install
# 3. configure your signer (never committed, never printed)
cp env.example .env    # then edit BUYER_PRIVATE_KEY
# 4. run the offline self-test (no network, no payment, no key needed)
npm test
# 5. buy exactly once
node --env-file=.env buyer_quickstart.mjs

No source edits are needed. Step 5 sends exactly one unpaid challenge request and at most one signed paid retry, spends at most 0.001 USDC, and prints: HTTP status, settlement success, the truncated on-chain transaction, the execution id, the truncated receipt digest and receipt_verified: true|false.

Built-in safety

Key handling, honestly: reading the key from an environment variable is a quickstart convenience, not a security boundary. For production systems keep the key behind a separate signing boundary (dedicated signer process, KMS/HSM or hardware wallet) and fund the buyer wallet only with what you intend to spend.

Compatibility note (2.19.0 + CDP facilitator)

The 2.19 SDK client attaches an optional resource object to the payment payload which the Coinbase (CDP) facilitator's /verify schema currently does not accept. This quickstart therefore removes that optional field after payload creation (delete payload.resource) — omitting an optional field is fully x402-v2-conform, and verification then succeeds. If you build your own client on stock @x402/fetch 2.19 and see verify rejections, check this first.

Verifying the receipt

Every paid response carries chain.receipt.verification with the JWKS URL and the recipe. receipt_verify.mjs implements it: recompute the receipt digest over the canonical JSON of chain.receipt.document.receipt (sorted keys, compact separators), check the kid against the public JWKS at https://feedoracle.io/.well-known/nomos-execution-jwks.json (Ed25519), verify the signature over "nomos.execution.receipt.v1" || 0x00 || canonical(receipt), and confirm the delivered result is hash-bound into the signed receipt. Anyone can re-run this at any time.

Troubleshooting — official x402 error codes

On a non-200 the machine-readable reason is in the fresh PAYMENT-REQUIRED header's error field (verify stage) or in PAYMENT-RESPONSE.errorReason (settlement stage). Codes marked x402 are protocol-standard; facilitator codes come from the CDP facilitator.

CodeStage / sourceMeaningSafe reactionNew payment attempt?
Payment requiredchallenge (x402)No (or undecodable) payment attached — the normal first 402.Sign against the fresh challenge.yes — normal flow
insufficient_fundsverify (x402/facilitator)Wallet holds less USDC than the price.Fund the wallet, then retry with a new challenge + new signature.yes, after funding
invalid_payloadverify (facilitator)Payment payload didn't match the expected schema.See the compatibility note (resource field); rebuild from a fresh challenge.yes, after fixing
invalid_schemeverify (x402)Scheme isn't exact.Fix client config.yes, after fixing
invalid_networkverify (x402)Wrong chain (must be eip155:8453).Fix network; wallet must be on Base.yes, after fixing
invalid_x402_versionverify (x402)Payload isn't v2.Use x402 v2 (PAYMENT-SIGNATURE); v1/X-PAYMENT is not accepted on /v2.yes, after fixing
invalid_payment_requirementsverify (x402)Echoed accepted block doesn't match the server's offer.Always copy accepts[0] from the fresh challenge; never cache old challenges.yes, with a fresh challenge
unexpected_verify_errorverify (x402)Verification failed for an unspecified reason.Do not auto-retry. Wait, then try once more manually with a fresh challenge; report if persistent.manual only, never automatic
unexpected_settle_errorsettle (x402)Settlement failed unexpectedly after successful verification.Do not re-pay. First check the on-chain state for your authorization nonce.only after confirming no transfer happened
settlement_pendingsettle (x402)The settlement transaction is still in flight.Never auto-pay again. Poll the transaction from PAYMENT-RESPONSE until it confirms or fails.no — the payment may still succeed
HTTP 500 (application/problem+json)server (RFC 9457)Internal server error; body carries an instance URN — quote it when reporting.No payment was taken at this stage; retry later with a fresh challenge.yes, later
anything elseUnknown code.Fail-closed: stop, don't re-sign, inspect manually.no, until understood

Discovery: /.well-known/x402 · agent-card.json · OpenAPI