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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(okx): WO-02 close-out — multi-rail api-reference, changelog, PROGRESS
fudjiafbd01f4e275e
diff --git a/data/changelog.json b/data/changelog.jsonindex c0d9f4e88..30d181ac7 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,33 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-07-07",+ "title": "Mint a generated 3D avatar as an on-chain Solana NFT — with a live 3D viewer as its media",+ "summary": "You can now turn a generated or owned avatar into real, ownable on-chain property. The new mint_3d_asset tool mints your rigged GLB as a Solana NFT whose media is a live, interactive 3D viewer — not a flat picture — with the model, a rendered thumbnail, and its full provenance (who made it, the prompt, the model, its lineage) travelling with it. Creator royalties are enforced on every resale, capped at 10%. A companion get_3d_asset_onchain tool resolves any mint back to its current holder, live viewer, provenance, and royalty terms. Minting defaults to devnet for safe testing; mainnet is an explicit opt-in. It's idempotent, so a retried mint never creates a duplicate.",+ "tags": [+ "feature",+ "sdk"+ ]+ },+ {+ "date": "2026-07-07",+ "title": "three.ws MCP servers are now listed across Smithery, Glama, mcp.so, PulseMCP & LobeHub",+ "summary": "All 42 three.ws MCP servers — the seven hosted remotes plus 35 one-command npm servers — now have consistent, verified listings ready for every major MCP directory, not just the official registry. Any MCP-compatible client (Claude, Cursor, and the rest) can discover three.ws by name wherever it looks. We fixed a discovery bug where the Agent-wallet and x402 Bazaar remotes wouldn't answer a plain tool list to crawlers, synced every server manifest to its published version, and built one canonical metadata source so a server's name, tagline, and connect snippet read identically on every directory.",+ "tags": [+ "infra",+ "sdk"+ ]+ },+ {+ "date": "2026-07-07",+ "title": "3D Studio tools can now be paid on X Layer via the OKX Agent Payments Protocol",+ "summary": "Agents on the OKX.AI marketplace can now pay for our 3D tools the way that marketplace expects: our payment challenge now offers X Layer (chain 196) in the USD₮0 stablecoin alongside the existing USDC-on-Base/Solana options, and speaks the OKX buyer flow end to end — it verifies the payment on-chain before doing any work and only charges after the tool succeeds. Existing customers paying on Base or Solana are unaffected; this simply adds a rail. It's the integration OKX asked us to complete before re-listing our 3D Studio agent.",+ "tags": [+ "feature",+ "infra"+ ]+ },{"date": "2026-07-07","title": "The animation library API now pages, so it stays fast as the catalog grows",diff --git a/docs/api-reference.md b/docs/api-reference.mdindex 1abf7a7b3..a23c3f2a3 100644--- a/docs/api-reference.md+++ b/docs/api-reference.md@@ -1378,6 +1378,24 @@ Each asset has its own SIWX grant key: the endpoint passes a `resourceUrlBuilder---+## Multi-rail x402 payments (X Layer / OKX Agent Payments Protocol)++Paid MCP and A2MCP endpoints advertise **every settlement rail the deployment can serve** in a single 402 challenge — one `accepts[]` array, one entry per rail. A buyer picks the rail it can pay on.++- **Solana / Base / BSC / Arbitrum** — USDC (or $THREE on Solana), header `X-PAYMENT` in, `x-payment-response` out (x402 v1 header names). Facilitators: Coinbase CDP / PayAI / self.+- **X Layer (`eip155:196`)** — USD₮0 (`0x779ded…713736`, 6 decimals, EIP-3009), header **`PAYMENT-SIGNATURE`** in, **`PAYMENT-RESPONSE`** out (x402 **v2** header names, what the OKX Agent Payments Protocol buyer flow uses). Settled via the OKX facilitator when credentialed, else direct on-chain EIP-3009 redemption. This is the rail that makes our endpoints listable on the OKX.AI marketplace.++Both header names are read case-insensitively and both receipt names are emitted, so a buyer speaking either dialect is served. The advertised amount, the verified amount, and the settled amount are all the same per-tool price (one source of truth). Endpoints that speak this rail:++| Endpoint | Kind | Rails advertised |+|---|---|---|+| `POST /api/mcp-3d` | MCP (Streamable HTTP) | Base + X Layer (+ Solana when configured) |+| `POST /api/okx/3d/<service>` | A2MCP (decomposed 3D studio) | X Layer first, then Solana/Base |++The full seller-side wire contract — challenge fields, verify→work→settle order, the `PAYMENT-SIGNATURE` payload shape, and the settlement receipt — is pinned in [`specs/okx-agent-payments.md`](../specs/okx-agent-payments.md). The per-service catalog and runnable curls are in [`docs/okx-marketplace.md`](okx-marketplace.md).++---+## Coin Market Data APIPublic, unauthenticated, CORS-open proxies over CoinGecko (plus a newsdiff --git a/prompts/okx-ai/PROGRESS.md b/prompts/okx-ai/PROGRESS.mdindex 92837bc24..de7bbdfcb 100644--- a/prompts/okx-ai/PROGRESS.md+++ b/prompts/okx-ai/PROGRESS.md@@ -6,6 +6,83 @@ Work Order 04 session — no earlier entries existed because no earlier work ord---+## 2026-07-07 — Work Order 02 session: COMPLETE — OKX/X Layer rail gaps closed, verified, documented++**Outcome: our A2MCP/MCP endpoints are first-class OKX Agent Payments Protocol sellers.**+The `eip155:196` USD₮0 accept, the OKX facilitator verify/settle route, and the x402-v2+receipt header names all flow through the SAME `x402-spec.js` seams every other rail uses —+no parallel payment stack. The spec gained a new **§5 "Implementation"** section mapping+every clause + gap to `file:line`. The rail code was already in HEAD (converged from the+concurrent WO-02/03/04 sessions, commit `05de055d6`); this session closed the remaining G8+header gaps, added endpoint-level tests, unblocked the deploy, and did the real local ++buyer's-eye verification. **Note:** the rail is already LIVE in production (WO-04 session #2+below); for X Layer relayer/funding specifics defer to the relayer-reconciliation entry+below — THE relayer is `0x9e48…B7a3`, USD₮0 buyer/seller is `0x75d0…cf69`.++### What this session changed (on top of the converged HEAD implementation)++- **G8 finished on the MCP endpoints.** `api/mcp-3d.js` and `api/okx/3d/[service].js` now+ emit BOTH `PAYMENT-RESPONSE` (x402 v2, what OKX buyers decode) and `x-payment-response`+ (v1 alias) on a settled paid call — they previously set only the v1 name.+- **Receipt carries `status` + `amount`.** `encodePaymentResponseHeader()`+ ([x402-spec.js](../../api/_lib/x402-spec.js)) passes through the OKX SettleResponse+ `status` ("success"/"pending") and `amount` (spec §1.4); the X Layer settle+ ([x402-xlayer-okx.js](../../api/_lib/x402-xlayer-okx.js)) returns them on both the+ facilitator and direct-redemption paths.+- **CORS.** `PAYMENT-RESPONSE` added to `access-control-expose-headers`+ ([http.js](../../api/_lib/http.js)) so cross-origin agent clients can read the receipt.+- **Tests.** `tests/api/mcp-3d-challenge.test.js` gained an OKX-rail block (11→15 tests):+ the `eip155:196` accept's byte-exact shape (incl. `extra.name` = `USD₮0`, U+20AE),+ per-tool amount scaling, multi-rail coexistence (Base + X Layer), and a paid-leg test+ proving both v2/v1 receipt headers ship with `status`+`amount`.+- **Docs.** Spec §5 Implementation (spec→code map + env table); `docs/api-reference.md`+ multi-rail payments section; `data/changelog.json` holder entry (feature/infra).+- **Deploy unblock (concurrent-agent regression).** `server-studio.json` (committed clean+ at HEAD by concurrent commit `86c675cb8`, AFTER WO-04's prod redeploy) had a 286-char+ `description`; registry max is 100, so `build:vercel` → `audit:mcp` failed and every+ future deploy was broken. Trimmed to 96 chars. Not this WO's file, but it blocked my+ preview deploy and the team's next prod deploy.++### Verification captured (real, not theatrical) — evidence in `e2e-evidence/02-*`++- **Tests:** `mcp-3d-challenge` 15/15; with `okx-3d-services` + `mcp-3d` + `x402-spec` ++ `mcp` = **110/110** in one run. One pre-existing unrelated failure elsewhere+ (`x402-pipeline` "partial-failure semantics" — fails with my changes stashed too).+- **Local integration (real module over `node:http`, OKX env set):** unpaid+ `POST tools/call text_to_3d` → `HTTP/1.1 402` with TWO accepts — Base (`eip155:8453`) AND+ X Layer (`eip155:196`). Field-by-field vs spec §1.1, all present: `scheme:exact`,+ `payTo:0x75d0…cf69`, `asset:0x779ded…713736`, `amount:"150000"` (text_to_3d standard,+ 6-dp USD₮0), `maxTimeoutSeconds:86400`,+ `extra:{symbol:USDT,name:USD₮0,version:1,transferMethod:eip3009,decimals:6}`. The `₮`+ bytes = `555344e282ae30` (U+20AE), matching spec Appx H.3.+- **Buyer's-eye check:** `onchainos payment pay --payload <our 402> --selected-index 1`+ ACCEPTED it → `header_name: PAYMENT-SIGNATURE`, `scheme: exact`, signed EIP-3009+ `value:"150000"` to our payTo on `eip155:196`. CLI did not reject our challenge.+- **Full unfunded round-trip:** replaying that `PAYMENT-SIGNATURE` against our endpoint ran+ our REAL verify (EIP-712 recovery + `authorizationState` + `balanceOf` on X Layer RPC)+ and returned `402 error:"insufficient_balance"` with a fresh full challenge — the tool did+ NOT run. Verify-gates-execution proven; funded success leg is WO-04's.++### 6 requirements — status++1. Challenge (OKX-valid 402, all `extra` fields, decimals-scaled) — ✅ verified locally.+2. Verify before work (real on-chain, invalid→fresh challenge, tool doesn't run) — ✅.+3. Settle after success + `PAYMENT-RESPONSE` — ✅ (paid-leg unit test; live settle is WO-04).+4. Multi-rail coexistence (Base accept still present) — ✅ same challenge.+5. Free lane intact (getting_started / discovery) — ✅ existing tests green.+6. Amounts consistent (advertised == verified == settled from `priceBatch`) — ✅.++### Blocked on / owner action++- **OKX facilitator creds** (`OKX_API_KEY`/`OKX_SECRET_KEY`/`OKX_PASSPHRASE`) — enable the+ preferred gasless facilitator settle route. Without them the rail still settles via the+ reconciled relayer `0x9e48…B7a3` (direct EIP-3009 redemption, OKB gas). Not a blocker for+ the challenge/verify the listing review checks.+- **Funding** — defer to the relayer-reconciliation + WO-04 entries below (OKB → relayer+ `0x9e48…B7a3`; USD₮0 → `0x75d0…cf69`). Only needed for WO-04's funded success leg.++---+## 2026-07-07 — Relayer-key reconciliation: ONE authoritative X Layer relayer, funding target corrected**Read this before funding anything.** Two concurrent sessions (this WO-03 re-dispatch and the