Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(spec): record that the OKX rail no longer names an x402 v1 header anywhere

nirholas95c031589e33
diff --git a/specs/okx-agent-payments.md b/specs/okx-agent-payments.md
index 1c8b180ae..4b1188c59 100644
--- a/specs/okx-agent-payments.md
+++ b/specs/okx-agent-payments.md
@@ -14,6 +14,8 @@
> **Post-implementation reconciliation (2026-07-07, WO-01 close-out session):** the contract below has since been **implemented** by WO-02/03 and **re-validated against still-live primary sources today**, the approved-seller 402 (oklink `get_chain_info`) is byte-identical to Appendix A, the OKX facilitator still returns `HTTP 401 code 50103` requiring `OK-ACCESS-KEY`, and USD₮0 is unchanged. Spec-vs-shipped conformance was checked: [`api/_lib/x402-xlayer-okx.js`](../api/_lib/x402-xlayer-okx.js) `okxXLayerAccept()` byte-matches §1.1 (scheme `exact`, `eip155:196`, USD₮0 asset, `extra{name:"USD₮0",version:"1",transferMethod:"eip3009",decimals:6}`, `maxTimeoutSeconds:86400`), reads `PAYMENT-SIGNATURE`, routes verify/settle through `OKXFacilitatorClient`, and emits `PAYMENT-RESPONSE` per §1.2. **The §4 gap list below is therefore historical, it was 02's work list and is now closed in code**, EXCEPT the runtime is still gated: the X Layer accept is only advertised when `xlayerSettleable()` is true (`X402_PAY_TO_XLAYER` + `X402_ASSET_ADDRESS_XLAYER` + OKX HMAC creds **or** `X402_XLAYER_RELAYER_KEY`). Those env vars were **not set in Vercel production** on the day this note was written, so `POST /api/okx/3d/*` then returned a **Solana-only** challenge with no `eip155:196` entry. **That runtime gate is CLOSED and has been since the Cloud Run migration.** Re-verified 2026-08-01 against live production: all 9 paid services return a spec-valid 402 whose `accepts[0]` is the `eip155:196` USD₮0 entry at exactly the catalog amount, and `/api/okx/3d/health` reports `payment-rail settleable: true`. The only thing still outstanding from this spec's perspective is funding the buyer wallet for a first settled payment; no code or research remains.
+> **Note (2026-09-02, WO-07 audit): the last v1 string is gone.** The header *reading* has accepted `PAYMENT-SIGNATURE` since WO-02, and `PAYMENT-RESPONSE` has always been emitted, so §1.2 held. What did not: the 402 body's `error` field still read `"X-PAYMENT header is required"`, the platform-wide default from [api/_lib/x402-spec.js](../api/_lib/x402-spec.js), on every OKX row including the four listed forge services. A reviewer of an x402-**v2** listing read a **v1** header name in the one string an unpaid call is guaranteed to surface. Closed by `X402_HEADER_ERROR` in [api/_lib/x402-xlayer-okx.js](../api/_lib/x402-xlayer-okx.js), threaded into every OKX challenge, naming both headers with v2 first; the shared default is unchanged for the Solana and Base rails, which really do read `X-PAYMENT`. Pinned by [tests/api/okx-402-dialect.test.js](../tests/api/okx-402-dialect.test.js). Ships on the next deploy.
+
> **Correction (2026-07-23, Work Order 07 final audit):** the "our payTo" address stated throughout this spec, `0x75d00a2713565171f33216e5aa2a375e076ecf69`, is **no longer what production advertises**. Live probe of `POST /api/okx/3d/text-to-3d` today returns `accepts[0].payTo = 0x4022de2D36C334E73C7a108805Cea11C0564f402` on `eip155:196` (confirmed against the Cloud Run service's live `X402_PAY_TO_XLAYER` env var). That address is the platform's standing EVM merchant/deployer wallet, already the `payTo` for the Base rail (see `contracts/DEPLOYMENTS.md`) and now consolidated onto X Layer too, sometime between 2026-07-07 and 2026-07-23 (no PROGRESS.md entry recorded the change; not a WO-07 regression). `0x75d0…cf69` remains agent #2632's **on-chain identity owner wallet** (the ERC-8004 registration) and the **onchainos buyer/TEE wallet** used to sign test payments, those roles are unaffected, only the payment-recipient address changed. Funding instructions in [`prompts/finish/okx-ai-RUNBOOK.md`](../prompts/finish/okx-ai-RUNBOOK.md) have been corrected to the live address; every `0x75d0…cf69`-as-payTo reference below (§1 examples, Appendix D, the table in §5) is now historical evidence of what was true on the date it was captured, not the current live value. Re-verify `payTo` live before any future funding request.
This is a load-bearing contract in the sense of `specs/README.md`: 02's implementation is validated against §1 (the challenge shape) and §4 (the gap list). Every claim carries a citation. Anything not verifiable from a primary source is marked **UNRESOLVED**.