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
feat: add SAS Credentialed Attestations documentation and key generation script
ni3aa7c7ba33ef68
diff --git a/.env.example b/.env.exampleindex ae664540c..9a370a771 100644--- a/.env.example+++ b/.env.example@@ -775,6 +775,10 @@ COIN_TREASURY_SECRET_KEY_B64=# Base64-encoded 64-byte Solana keypair used by the Pump.fun buyback cron to# pay tx fees on behalf of the protocol. Distinct from TREASURY_KEYPAIR.+# Generate (writes .env + prints the public key to fund with SOL):+# node scripts/gen-solana-signer-key.mjs --var PUMP_CRON_RELAYER_SECRET_KEY_B64 --write+# Add --vanity www to grind a vanity public key. Same generator for any+# *_SECRET_KEY_B64 var below.PUMP_CRON_RELAYER_SECRET_KEY_B64=# ── Programmatic $THREE buyback (revenue → Jupiter buy → treasury) ───────────diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 856131beb..b4f019d5b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,10 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Trading Swarms: pool capital with other agents and split the profits** — A new way to trade together. Create a swarm and a dedicated treasury wallet is provisioned on-chain; you and other agents fund it with real SOL. The swarm only buys a coin when enough of its members' verified track records already agree on it — a reputation-weighted consensus, not one agent's hunch — and every trade still passes the same safety firewall and spend limits as a solo snipe. When a position closes in profit, the gain is paid back to every member pro-rata by their share, on-chain and fully auditable, minus an optional creator fee. You can see the live vote on every decision, the treasury balance, each member's share, and the full payout ledger. Exit and redeem your share any time, no single member can capture the treasury, and any qualifying member can hit the kill switch. Find it under Discover → Trading Swarms. (`/swarms`) `[feature]`+## 2026-06-24++- **Docs · SAS Credentialed Attestations** (`/docs/sas-attestations`) — Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.+## 2026-06-23- **$THREE Tiers · Hold-to-Access** (`/three`) — Hold $THREE to unlock platform-wide perks — fee discounts on compute, higher free quotas, and private and branded worlds. See every tier, what it unlocks, and exactly how much $THREE you hold to reach the next one. The same tiering and the same upgrade path, everywhere.diff --git a/data/pages.json b/data/pages.jsonindex 54b83eea7..f26e1ef70 100644--- a/data/pages.json+++ b/data/pages.json@@ -1375,6 +1375,12 @@"description": "How three.ws gives a Solana agent a trust record — memo attestations, the AgenC coordination program, and the EVM identity bridge.","added": "2026-06-22"},+ {+ "path": "/docs/sas-attestations",+ "title": "Docs · SAS Credentialed Attestations",+ "description": "Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.",+ "added": "2026-06-24"+ },{"path": "/docs/embedding","title": "Docs · Embedding",diff --git a/docs/configuration.md b/docs/configuration.mdindex 215bf27cf..58610bf7f 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -302,6 +302,28 @@ Get from [app.pinata.cloud/keys](https://app.pinata.cloud/keys).WEB3_STORAGE_TOKEN=xxxxx```+#### Solana signer keys (`*_SECRET_KEY_B64`)+**Optional.** Server-side Solana keypairs the cron jobs and on-chain flows sign with: `PUMP_CRON_RELAYER_SECRET_KEY_B64` (pays tx fees for the Pump.fun buyback cron), `COIN_TREASURY_SECRET_KEY_B64`, `THREE_BUYBACK_SECRET_KEY_B64`, `CLUB_SOLANA_TREASURY_SECRET_KEY_B64`, `PUMP_X402_LAUNCHER_SECRET_KEY_B64`. Each is the **base64 encoding of the 64 raw secret-key bytes** — the format `decodeSecretKey` expects (`api/_lib/solana-signers.js`).++```+PUMP_CRON_RELAYER_SECRET_KEY_B64=<base64 of 64-byte keypair>+```++Generate with the bundled, dependency-free generator (no `@solana/web3.js` install needed):++```bash+# Writes the secret to .env and prints the public key to fund with SOL+node scripts/gen-solana-signer-key.mjs --var PUMP_CRON_RELAYER_SECRET_KEY_B64 --write++# Or print to stdout (swap the var for any of the *_SECRET_KEY_B64 names)+node scripts/gen-solana-signer-key.mjs --var COIN_TREASURY_SECRET_KEY_B64++# Grind a vanity public key (case-insensitive prefix; base58 has no 0/O/I/l)+node scripts/gen-solana-signer-key.mjs --vanity www+```++**Fund the printed public key with SOL** before the relayer can pay fees. `--write` refuses to clobber an existing value, so rotating means removing the old line first. For Vercel, add the value with `vercel env add <NAME>` — never commit the secret.+---### Minimum Local Development Configurationdiff --git a/docs/index.html b/docs/index.htmlindex 0c52b4c94..ed28be59c 100644--- a/docs/index.html+++ b/docs/index.html@@ -781,6 +781,7 @@{ label: 'ERC-8004', path: 'erc8004' },{ label: 'Reputation system', path: 'reputation' },{ label: 'Validation attestations', path: 'validation' },+ { label: 'SAS attestations', path: 'sas-attestations' },{ label: 'Solana agents', path: 'solana' },{ label: 'Deploy agents on-chain (bulk)', path: 'onchain-agents' },{ label: 'Solana pump.fun signals', path: 'solana-pumpfun' },diff --git a/docs/sas-attestations.md b/docs/sas-attestations.mdnew file mode 100644index 000000000..d762c3826--- /dev/null+++ b/docs/sas-attestations.md@@ -0,0 +1,210 @@+# SAS Credentialed Attestations++three.ws issues two kinds of on-chain attestations on Solana:++- **Permissionless attestations** — general feedback, task lifecycle, dispute, and revoke events. Anyone can write them as SPL Memos (see [Solana reputation](solana-reputation)).+- **Credentialed attestations** — claims only three.ws or an authorized validator may make: that a wallet is verified, or that a validator audited an agent's task result. These use the [Solana Attestation Service (SAS)](https://attest.solana.com/) and are signed by the **three.ws authority wallet**.++This page covers the authority wallet, the `SAS_AUTHORITY_SECRET` environment variable, bootstrapping the credential + schemas, and the API that issues them.++---++## The authority wallet++Every credentialed attestation is signed by a single Solana keypair — the **authority**. That keypair:++- Pays rent for the credential and schema accounts (one-time, at bootstrap).+- Owns the credential, so it can later authorize additional signers via `changeAuthorizedSigners`.+- Signs (and pays fees for) every attestation issued under the three.ws schemas.+- Is the only key that can close (revoke) an attestation it issued.++The server loads it from the `SAS_AUTHORITY_SECRET` environment variable — see [api/_lib/sas.js](../api/_lib/sas.js).++---++## `SAS_AUTHORITY_SECRET`++The **base58-encoded 64-byte secret key** of the authority keypair. This is the Phantom/Solflare "export private key" format, *not* the JSON byte array that `solana-keygen` writes to disk.++```+SAS_AUTHORITY_SECRET=<base58 secret key>+```++It is decoded with `bs58.decode()` and passed to `createKeyPairSignerFromBytes()`. If it is missing, any attempt to issue or close an attestation throws `SAS_AUTHORITY_SECRET not configured`.++> **This is a private key. Treat it as a secret.**+> - Never commit it, and never commit a `*.json` keypair file. Keep both out of git.+> - Use **separate keypairs for devnet and mainnet** so a devnet leak can never touch mainnet funds.+> - Use the **same keypair for bootstrap and runtime** on a given network — a different key cannot issue under the credential the first key created.++### Generating a keypair++**With the Solana CLI** (recommended for production — produces a real, fundable wallet):++```bash+solana-keygen new --no-bip39-passphrase --outfile authority.json+# Convert the 64-byte array to the base58 form SAS_AUTHORITY_SECRET expects:+node -e "import('bs58').then(({default:b})=>console.log(b.encode(Uint8Array.from(require('./authority.json')))))"+```++**Without any dependencies** (built-in `crypto` only — handy in a clean shell):++```bash+node --input-type=module -e '+import { generateKeyPairSync } from "node:crypto";+const A="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";+const b58=u=>{let z=0;while(z<u.length&&!u[z])z++;const d=[0];for(let i=z;i<u.length;i++){let c=u[i];for(let j=0;j<d.length;j++){c+=d[j]<<8;d[j]=c%58;c=c/58|0}while(c){d.push(c%58);c=c/58|0}}return "1".repeat(z)+d.reverse().map(x=>A[x]).join("")};+const{publicKey,privateKey}=generateKeyPairSync("ed25519");+const seed=privateKey.export({format:"der",type:"pkcs8"}).subarray(-32);+const pub =publicKey .export({format:"der",type:"spki" }).subarray(-32);+console.log("PUBKEY:", b58(pub));+console.log("SECRET:", b58(Buffer.concat([seed,pub])));+'+```++The `SECRET:` line is the value for `SAS_AUTHORITY_SECRET`; the `PUBKEY:` line is the address you fund.++### Vanity addresses (optional)++To make the authority address recognizable (e.g. starting with `3ws` or `www`), grind keypairs until the base58 public key matches a prefix. With the CLI:++```bash+solana-keygen grind --starts-with 3ws:1 --ignore-case+```++`--ignore-case` matches the prefix case-insensitively, which is much faster. Base58 excludes the characters `0`, `O`, `I`, and `l`, so a prefix cannot contain them. Cost grows ~58× per added character: 3 characters resolve in seconds, 4 in a minute or two, 5+ can take much longer.++---++## Bootstrap (one-time per network)++Registering the credential and schemas is idempotent — existing accounts are left untouched, so the script is safe to re-run.++1. **Fund the authority wallet** with ~0.05 SOL on the target cluster (covers one credential plus the schemas). Devnet: [faucet.solana.com](https://faucet.solana.com). Mainnet: send real SOL to the address.++2. **Run the bootstrap** ([scripts/sas-bootstrap.js](../scripts/sas-bootstrap.js)):++ ```bash+ SAS_AUTHORITY_SECRET=<base58 secret key> node scripts/sas-bootstrap.js devnet+ # or: ... node scripts/sas-bootstrap.js mainnet+ ```++ On success it writes the derived PDAs into [sdk/src/sas-config.json](../sdk/src/sas-config.json). Do not edit that file by hand — re-run bootstrap to refresh it. Commit the updated config so the server knows the credential/schema addresses.++3. **Set the env var in each environment.** Locally, add it to `.env`. On Vercel:++ ```bash+ vercel env add SAS_AUTHORITY_SECRET+ ```++ Use the devnet key for Preview and the mainnet key for Production. Redeploy so functions pick it up.++### Related environment variables++| Variable | Purpose | Default |+|----------|---------|---------|+| `SAS_AUTHORITY_SECRET` | Base58 authority secret key. **Required** to issue/close. | — |+| `SOLANA_RPC_URL` | Mainnet RPC endpoint. | `https://api.mainnet-beta.solana.com` |+| `SOLANA_RPC_URL_DEVNET` | Devnet RPC endpoint. | `https://api.devnet.solana.com` |++A custom RPC (Helius, Triton, QuickNode) is strongly recommended for mainnet — the public endpoint is rate-limited and will fail under load.++---++## Schemas++The schemas three.ws registers live in [sdk/src/sas-config.json](../sdk/src/sas-config.json). Two ship today:++### `threews.verified-client.v1`++A wallet has been verified by three.ws (KYC, payment history, or a trusted introduction). Subject = the client wallet pubkey. Used to weight feedback attestations.++| Field | Type | Meaning |+|-------|------|---------|+| `method` | string | Verification method, e.g. `kyc-tier-1`, `payment-history`, `partner:auditor-x`. |+| `reference` | string | Opaque reference id pointing at an off-chain record. |++### `threews.audited-validation.v1`++A validation of an agent task result, issued by an authorized validator. Subject = the agent asset pubkey. Carries higher weight than a self-attested validation.++| Field | Type | Meaning |+|-------|------|---------|+| `task_hash` | string | Hash of the task input/output bundle. |+| `passed` | bool | Whether the validator considers the work acceptable. |+| `report_uri` | string | Link to the validator's full report (Arweave/IPFS/HTTPS). |++---++## API++The endpoint is [api/agents/sas/[action].js](../api/agents/sas/[action].js).++### Read credentials — `GET /api/agents/sas/credentials`++Public, rate-limited. Returns active (non-closed, non-expired) attestations for a subject.++| Query param | Required | Description |+|-------------|----------|-------------|+| `subject` | yes | Base58 pubkey the attestation is about. |+| `network` | no | `mainnet` or `devnet` (default `devnet`). |+| `kind` | no | Filter to one schema, e.g. `threews.verified-client.v1`. |+| `include_closed` | no | `1` to include closed attestations. |++```bash+curl "https://three.ws/api/agents/sas/credentials?subject=<pubkey>&network=mainnet"+```++```json+{ "subject": "<pubkey>", "network": "mainnet", "kind": null, "count": 1, "data": [ /* attestations */ ] }+```++### Issue a credential — `POST /api/agents/sas/issue-credential`++**Admin-only.** Requires admin auth (see [api/_lib/admin.js](../api/_lib/admin.js)) and validates the body against the target schema before signing. On success it issues the attestation on-chain with the authority wallet and records it in the `solana_credentials` table.++```bash+curl -X POST https://three.ws/api/agents/sas/issue-credential \+ -H "Authorization: Bearer <admin-token>" \+ -H "Content-Type: application/json" \+ -d '{+ "kind": "threews.verified-client.v1",+ "subject": "<client-wallet-pubkey>",+ "data": { "method": "kyc-tier-1", "reference": "rec_01H..." },+ "expiry": 0,+ "network": "mainnet"+ }'+```++| Body field | Required | Description |+|------------|----------|-------------|+| `kind` | yes | One of the registered schema kinds. |+| `subject` | yes | Base58 pubkey (32–44 chars) the attestation is about; used as the attestation nonce. |+| `data` | yes | Object whose keys match the schema's `fieldNames`, with the right types. |+| `expiry` | no | Unix seconds; `0` (default) means no expiry. |+| `network` | no | `devnet` (default) or `mainnet`. |++```json+{+ "signature": "<tx-sig>",+ "attestation_pda": "<pda>",+ "schema_pda": "<pda>",+ "credential_pda": "<pda>",+ "kind": "threews.verified-client.v1",+ "subject": "<pubkey>"+}+```++Closing (revoking) an attestation is done server-side via `sasClose()` in [api/_lib/sas.js](../api/_lib/sas.js); only the authority can close.++---++## Troubleshooting++| Symptom | Cause | Fix |+|---------|-------|-----|+| `SAS_AUTHORITY_SECRET not configured` | Env var unset in the running environment. | Set it in `.env` / Vercel and redeploy. |+| `SAS not bootstrapped for <network>` | `sdk/src/sas-config.json` has no PDAs for that network. | Run `scripts/sas-bootstrap.js <network>` and commit the updated config. |+| `schema <kind> not registered on <network>` | Schema added to config but bootstrap not re-run. | Re-run the bootstrap for that network. |+| Bootstrap or issue fails with insufficient funds | Authority wallet not funded on that cluster. | Send SOL to the authority address and retry. |+| Non-base58 / bad key on load | `SAS_AUTHORITY_SECRET` holds the JSON array form, not base58. | Convert the array to base58 (see above) and use that. |diff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex 98c2679a5..c2c83e3ba 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -469,13 +469,27 @@ Organized by symptom. Find your problem, check the likely causes, follow the fix1. Verify `DATABASE_URL` is set. The format for Neon is: `postgres://user:password@host/dbname?sslmode=require`.2. If using Neon: check that your server's IP is in the Neon project's IP allowlist (or set it to allow all IPs during development).-3. Run the schema migration to ensure tables exist:+3. Run the full schema bootstrap to ensure every table exists:```bash- node scripts/apply-schema.mjs+ npm run db:bootstrap```---+### `relation "…" does not exist` errors in production logs++**Symptom:** API routes and crons throw `NeonDbError: relation "agent_custody_events" does not exist` (or `forge_creations`, `x_triggers`, `club_tips`, `unstoppable_activity`, …). Often hundreds or thousands of identical errors.++**Cause:** The database was provisioned with only part of the schema — typically `apply-schema.mjs` was run but the incremental migrations under `api/_lib/migrations/` were not. The base schema does **not** create migration-defined tables.++**Fix:** Point `DATABASE_URL` at the affected database and run the complete bootstrap. It is idempotent — it only creates what is missing:+```bash+DATABASE_URL=<prod connection string> npm run db:bootstrap+```+Run `npm run db:status` first to preview which migrations are pending.++---+### API routes return 500**Symptom:** Requests to `/api/*` return HTTP 500 with no useful body.diff --git a/public/changelog.json b/public/changelog.jsonindex a73cdb5a2..5599c0e74 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T20:22:03.052Z",+ "generated_at": "2026-06-24T04:43:14.383Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -16,6 +16,16 @@"feature"]},+ {+ "date": "2026-06-24",+ "type": "launch",+ "title": "Docs · SAS Credentialed Attestations",+ "summary": "Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.",+ "link": "/docs/sas-attestations",+ "tags": [+ "launch"+ ]+ },{"date": "2026-06-23","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex 595138f90..9b9662f5a 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -14,6 +14,14 @@<category>feature</category><description>A new way to trade together. Create a swarm and a dedicated treasury wallet is provisioned on-chain; you and other agents fund it with real SOL. The swarm only buys a coin when enough of its members' verified track records already agree on it — a reputation-weighted consensus, not one agent's hunch — and every trade still passes the same safety firewall and spend limits as a solo snipe. When a position closes in profit, the gain is paid back to every member pro-rata by their share, on-chain and fully auditable, minus an optional creator fee. You can see the live vote on every decision, the treasury balance, each member's share, and the full payout ledger. Exit and redeem your share any time, no single member can capture the treasury, and any qualifying member can hit the kill switch. Find it under Discover → Trading Swarms.</description></item>+ <item>+ <title>Docs · SAS Credentialed Attestations</title>+ <link>https://three.ws/docs/sas-attestations</link>+ <guid isPermaLink="false">2026-06-24:Docs · SAS Credentialed Attestations</guid>+ <pubDate>Wed, 24 Jun 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.</description>+ </item><item><title>$THREE Tiers · Hold-to-Access</title><link>https://three.ws/three</link>diff --git a/public/docs/configuration.md b/public/docs/configuration.mdindex 5aad4decf..6071fb8a9 100644--- a/public/docs/configuration.md+++ b/public/docs/configuration.md@@ -302,6 +302,28 @@ Get from [app.pinata.cloud/keys](https://app.pinata.cloud/keys).WEB3_STORAGE_TOKEN=xxxxx```+#### Solana signer keys (`*_SECRET_KEY_B64`)+**Optional.** Server-side Solana keypairs the cron jobs and on-chain flows sign with: `PUMP_CRON_RELAYER_SECRET_KEY_B64` (pays tx fees for the Pump.fun buyback cron), `COIN_TREASURY_SECRET_KEY_B64`, `THREE_BUYBACK_SECRET_KEY_B64`, `CLUB_SOLANA_TREASURY_SECRET_KEY_B64`, `PUMP_X402_LAUNCHER_SECRET_KEY_B64`. Each is the **base64 encoding of the 64 raw secret-key bytes** — the format `decodeSecretKey` expects (`api/_lib/solana-signers.js`).++```+PUMP_CRON_RELAYER_SECRET_KEY_B64=<base64 of 64-byte keypair>+```++Generate with the bundled, dependency-free generator (no `@solana/web3.js` install needed):++```bash+# Writes the secret to .env and prints the public key to fund with SOL+node scripts/gen-solana-signer-key.mjs --var PUMP_CRON_RELAYER_SECRET_KEY_B64 --write++# Or print to stdout (swap the var for any of the *_SECRET_KEY_B64 names)+node scripts/gen-solana-signer-key.mjs --var COIN_TREASURY_SECRET_KEY_B64++# Grind a vanity public key (case-insensitive prefix; base58 has no 0/O/I/l)+node scripts/gen-solana-signer-key.mjs --vanity www+```++**Fund the printed public key with SOL** before the relayer can pay fees. `--write` refuses to clobber an existing value, so rotating means removing the old line first. For Vercel, add the value with `vercel env add <NAME>` — never commit the secret.+---### Minimum Local Development Configurationdiff --git a/public/features.json b/public/features.jsonindex 6e8944112..b23cfa64b 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T20:22:03.035Z",+ "generated_at": "2026-06-24T04:43:14.369Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -1687,6 +1687,16 @@"tags": [],"showcase": false},+ {+ "path": "/docs/sas-attestations",+ "title": "Docs · SAS Credentialed Attestations",+ "description": "Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.",+ "added": "2026-06-24",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/docs/embedding","title": "Docs · Embedding",diff --git a/public/llms-full.txt b/public/llms-full.txtindex 8abd54400..d86c59025 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -1033,6 +1033,12 @@ URL: https://three.ws/docs/solana-reputationHow three.ws gives a Solana agent a trust record — memo attestations, the AgenC coordination program, and the EVM identity bridge.+### Docs · SAS Credentialed Attestations++URL: https://three.ws/docs/sas-attestations++Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.+### Docs · EmbeddingURL: https://three.ws/docs/embeddingdiff --git a/public/llms.txt b/public/llms.txtindex d22b967fd..a711a645c 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -195,6 +195,7 @@ Docs, tutorials, and reference.- [Docs · Reputation System](https://three.ws/docs/reputation): Leave and read permanent, on-chain reviews for any registered agent via the UI, SDK, or contract.- [Docs · Validation Attestations](https://three.ws/docs/validation): Record and read on-chain attestations that an agent's 3D model passes glTF validation.- [Docs · Agent Reputation on Solana](https://three.ws/docs/solana-reputation): How three.ws gives a Solana agent a trust record — memo attestations, the AgenC coordination program, and the EVM identity bridge.+- [Docs · SAS Credentialed Attestations](https://three.ws/docs/sas-attestations): Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.- [Docs · Embedding](https://three.ws/docs/embedding): Embed an agent via iframe, oEmbed, or the <agent-3d> web component.- [Docs · <agent-3d>](https://three.ws/docs/web-component): Reference for the <agent-3d> custom element.- [Docs · MCP](https://three.ws/docs/mcp): Expose your agent as an MCP server for Claude, ChatGPT, and other clients.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 288872f45..ae330bfe7 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -65,7 +65,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 335 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 336 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -77,7 +77,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 335 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 336 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -1200,7 +1200,7 @@<section class="sm-section" id="learn"><header>- <h2>Learn<span class="sm-count" data-count>38</span></h2>+ <h2>Learn<span class="sm-count" data-count>39</span></h2><p class="sm-section-desc">Docs, tutorials, and reference.</p></header><ul class="sm-list">@@ -1295,6 +1295,13 @@<span class="sm-desc">How three.ws gives a Solana agent a trust record — memo attestations, the AgenC coordination program, and the EVM identity bridge.</span></a></li>+ <li>+ <a href="/docs/sas-attestations">+ <span class="sm-title">Docs · SAS Credentialed Attestations</span>+ <span class="sm-path">/docs/sas-attestations</span>+ <span class="sm-desc">Set up the three.ws authority wallet and SAS_AUTHORITY_SECRET, bootstrap the Solana Attestation Service credential and schemas, and issue or read credentialed attestations.</span>+ </a>+ </li><li><a href="/docs/embedding"><span class="sm-title">Docs · Embedding</span>diff --git a/scripts/gen-solana-signer-key.mjs b/scripts/gen-solana-signer-key.mjsnew file mode 100755index 000000000..6ccdb405a--- /dev/null+++ b/scripts/gen-solana-signer-key.mjs@@ -0,0 +1,109 @@+#!/usr/bin/env node+// Generate a Solana ed25519 signer keypair in the base64 `_SECRET_KEY_B64`+// format the server-side signers expect (api/_lib/solana-signers.js →+// decodeSecretKey: base64 of the 64 raw secret-key bytes). Use it for any of+// the platform's *_SECRET_KEY_B64 vars — PUMP_CRON_RELAYER, COIN_TREASURY,+// THREE_BUYBACK, CLUB_SOLANA_TREASURY, PUMP_X402_LAUNCHER.+//+// Dependency-free (node:crypto only), so it runs without installing+// @solana/web3.js. The output is byte-for-byte compatible with+// Keypair.fromSecretKey.+//+// node scripts/gen-solana-signer-key.mjs # print pubkey + b64+// node scripts/gen-solana-signer-key.mjs --vanity www # grind a vanity prefix (case-insensitive)+// node scripts/gen-solana-signer-key.mjs --var PUMP_CRON_RELAYER_SECRET_KEY_B64 --write+//+// --write upserts into .env WITHOUT clobbering an existing value (so you never+// overwrite a funded signer by accident) and keeps the secret off your scrollback.+// Fund the printed public key with SOL before the cron can pay tx fees.++import crypto from 'node:crypto';+import { readFileSync, writeFileSync, existsSync } from 'node:fs';+import { resolve } from 'node:path';++const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';++function base58(buf) {+ const digits = [0];+ for (const byte of buf) {+ let carry = byte;+ for (let j = 0; j < digits.length; j++) {+ carry += digits[j] << 8;+ digits[j] = carry % 58;+ carry = (carry / 58) | 0;+ }+ while (carry) {+ digits.push(carry % 58);+ carry = (carry / 58) | 0;+ }+ }+ let str = '';+ for (const b of buf) {+ if (b === 0) str += '1';+ else break;+ }+ for (let i = digits.length - 1; i >= 0; i--) str += BASE58[digits[i]];+ return str;+}++function arg(name) {+ const i = process.argv.indexOf(name);+ return i >= 0 ? process.argv[i + 1] : undefined;+}++const vanity = (arg('--vanity') || '').trim();+if (vanity && [...vanity].some((c) => !BASE58.includes(c))) {+ console.error(`Invalid vanity prefix "${vanity}" — base58 has no 0, O, I, or l.`);+ process.exit(1);+}+const varName = arg('--var') || 'PUMP_CRON_RELAYER_SECRET_KEY_B64';+const write = process.argv.includes('--write');++function generate() {+ const { privateKey, publicKey } = crypto.generateKeyPairSync('ed25519');+ // pkcs8 DER ends with the 32-byte seed; spki DER ends with the 32-byte pubkey.+ const seed = privateKey.export({ format: 'der', type: 'pkcs8' }).subarray(-32);+ const pub = publicKey.export({ format: 'der', type: 'spki' }).subarray(-32);+ return { secretKey: Buffer.concat([seed, pub]), pubkey: base58(pub) };+}++const start = Date.now();+let tries = 0;+let kp;+const want = vanity.toLowerCase();+do {+ tries++;+ kp = generate();+} while (want && kp.pubkey.slice(0, want.length).toLowerCase() !== want);++const b64 = kp.secretKey.toString('base64');+if (Buffer.from(b64, 'base64').length !== 64) {+ console.error('Sanity check failed: secret key is not 64 bytes.');+ process.exit(1);+}++if (vanity) {+ console.error(+ `Matched "${vanity}" prefix in ${tries.toLocaleString()} tries (${((Date.now() - start) / 1000).toFixed(1)}s)`,+ );+}++if (write) {+ const ENV_PATH = resolve(process.cwd(), '.env');+ const contents = existsSync(ENV_PATH) ? readFileSync(ENV_PATH, 'utf8') : '';+ if (new RegExp(`^${varName}=.+`, 'm').test(contents)) {+ console.error(`${varName} already set in .env — refusing to clobber. Remove it first to rotate.`);+ process.exit(1);+ }+ const sep = contents && !contents.endsWith('\n') ? '\n' : '';+ const next = new RegExp(`^${varName}=$`, 'm').test(contents)+ ? contents.replace(new RegExp(`^${varName}=$`, 'm'), `${varName}=${b64}`)+ : `${contents}${sep}${varName}=${b64}\n`;+ writeFileSync(ENV_PATH, next);+ console.error(`Wrote ${varName} to .env (secret kept off your terminal).`);+ console.log(`Fund this public key with SOL: ${kp.pubkey}`);+} else {+ console.log(`Public key (fund this address with SOL): ${kp.pubkey}`);+ console.log('');+ console.log(`${varName}=${b64}`);+}