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.

fix(custody): take down the public integrity page while its on-chain anchor is broken

nirholasd44332275366
diff --git a/docs/custody.md b/docs/custody.md
index 22b2488c5..094db9ae1 100644
--- a/docs/custody.md
+++ b/docs/custody.md
@@ -46,9 +46,9 @@ Every six hours, an attestation epoch runs:
3. The leaves build a Merkle tree; the epoch and leaves are persisted.
4. The root is anchored on Solana as a signed SPL-Memo transaction, when an attester key is configured and funded (see **Honest limits** below).
-Two public surfaces:
+Two public surfaces, one of which is currently API-only:
-- **[/integrity](https://three.ws/integrity)** is the aggregate view, no sign-in: latest epoch, Merkle root, the anchor transaction (once an epoch is anchored), wallet count, total SOL, recent epochs. API: `GET /api/custody/integrity`, `GET /api/custody/anchor?epoch=latest`.
+- **The aggregate view** is `GET /api/custody/integrity` and `GET /api/custody/anchor?epoch=latest`: latest epoch, Merkle root, the anchor transaction (once an epoch is anchored), wallet count, total SOL, recent epochs. No sign-in. The `/integrity` page that rendered this is **switched off** while anchoring is unavailable, because a page headlined "custody you can verify" is misleading when no epoch has an on-chain anchor to verify against (see **Honest limits** below). The endpoints stay public and unchanged, so nothing that reads them breaks; re-routing the page is the last step of restoring anchoring, not a separate project.
- **[/proof](https://three.ws/proof)** is your wallet's inclusion proof (owner-only, since it reveals a per-wallet balance). The page fetches your proof and then **re-verifies it in your browser** with an independent verifier: it recomputes your leaf hash from the public fields, walks the Merkle path, and checks the result against the epoch's published root. The prover and verifier share one hashing module, so they cannot silently drift. Where the epoch is anchored, that same root is what the on-chain memo commits to.
Epochs also run a reconciliation pass: any balance drop since the previous epoch must be explained by authorized withdraw/spend events (plus fee tolerance), or it's flagged. "No unexplained outflows" is a checked property, not a slogan.
diff --git a/pages/proof.html b/pages/proof.html
index 839e07fda..97debde5a 100644
--- a/pages/proof.html
+++ b/pages/proof.html
@@ -46,7 +46,7 @@
<section class="poc-hero">
<p class="poc-kicker" data-i18n="proof.don_t_trust_verify">Don't trust · verify</p>
<h1 class="poc-title" data-i18n="proof.verify_your_custody">Verify your custody</h1>
- <p class="poc-sub" data-i18n-html="proof.your_wallet_s_balance_and_authorized_state">Your wallet's balance and authorized-state are committed to a Merkle tree whose root is anchored on Solana. This page recomputes your leaf, walks the path to that root, and reads the anchor straight off-chain — all in your browser. We never tell you it's fine; you check it. See the platform-wide picture on the <a href="/integrity">public integrity page</a>.</p>
+ <p class="poc-sub" data-i18n-html="proof.your_wallet_s_balance_and_authorized_state">Your wallet's balance and authorized-state are committed to a Merkle tree whose root is anchored on Solana. This page recomputes your leaf, walks the path to that root, and reads the anchor straight off-chain, all in your browser. We never tell you it's fine; you check it.</p>
</section>
<div id="poc-root" aria-live="polite"></div>
</main>
diff --git a/src/agent-wallet-hub/tabs/proof.js b/src/agent-wallet-hub/tabs/proof.js
index 8999f960d..445df0646 100644
--- a/src/agent-wallet-hub/tabs/proof.js
+++ b/src/agent-wallet-hub/tabs/proof.js
@@ -54,7 +54,6 @@ registerWalletTab({
ctx,
verify: verifyInclusionProof,
shareBase: '/proof',
- origin: location.origin,
});
}
diff --git a/src/proof-of-custody/ui.js b/src/proof-of-custody/ui.js
index c8d111b58..607e04904 100644
--- a/src/proof-of-custody/ui.js
+++ b/src/proof-of-custody/ui.js
@@ -30,10 +30,9 @@ function fmtTime(iso) {
* @param {object} args.proof the `data` object from the inclusion-proof endpoint
* @param {(proof:object)=>Promise<object>} args.verify the independent verifier
* @param {string} [args.shareBase='/proof']
- * @param {string} [args.origin]
* @param {object} [args.ctx] optional hub ctx (toast, copyToClipboard)
*/
-export function renderProofUI(panel, { proof, verify, shareBase = '/proof', origin = '', ctx = {} }) {
+export function renderProofUI(panel, { proof, verify, shareBase = '/proof', ctx = {} }) {
injectProofStyle();
if (!proof || proof.included === false) {
panel.innerHTML = notYetState(proof);
@@ -135,21 +134,24 @@ export function renderProofUI(panel, { proof, verify, shareBase = '/proof', orig
function renderShare() {
const wrap = panel.querySelector('[data-share]');
if (!wrap) return;
- // The public, re-verifiable artifact is the platform integrity page — anyone
- // can confirm the latest root on-chain there without auth. Per-wallet leaves
- // stay owner-gated, so the shared badge points at /integrity, not the private
- // per-wallet proof.
- const publicUrl = `${origin}/integrity`;
+ // The public, re-verifiable artifact is the anchor transaction itself: anyone
+ // can open it on a block explorer and read the committed root without an
+ // account, and it stays valid regardless of which of our own pages are
+ // routed. Per-wallet leaves stay owner-gated, so the shared badge points at
+ // the on-chain transaction, never at the private per-wallet proof. This block
+ // only renders once verification passed, so `anchor.explorer` is always set.
+ const publicUrl = anchor.explorer;
+ if (!publicUrl) return;
const ownUrl = `${esc(shareBase)}?agent=${encodeURIComponent(proof.leaf.agentId)}`;
const embed = `<a href="${publicUrl}" target="_blank" rel="noopener" style="display:inline-flex;align-items:center;gap:6px;font:600 12px system-ui;color:#4ade80;text-decoration:none;padding:5px 11px;border:1px solid #4ade8055;border-radius:999px;background:#4ade801a">✓ Custody verified on-chain · three.ws</a>`;
wrap.hidden = false;
wrap.className = 'awh-proof-card';
wrap.innerHTML = `
<h2>Show it off</h2>
- <p class="awh-proof-lead">Your custody is provable. The badge links to the public integrity page, where anyone can re-verify the platform's on-chain root in their own browser.</p>
+ <p class="awh-proof-lead">Your custody is provable. The badge links to the anchor transaction on Solana, where anyone can read the committed root for themselves.</p>
<div class="awh-proof-actions">
<span class="awh-proof-badge">Custody verified on-chain</span>
- <button class="awh-proof-btn ghost" type="button" data-copy-link>Copy integrity link</button>
+ <button class="awh-proof-btn ghost" type="button" data-copy-link>Copy anchor link</button>
<button class="awh-proof-btn ghost" type="button" data-copy-embed>Copy badge embed</button>
<a class="awh-proof-btn ghost" href="${ownUrl}" target="_blank" rel="noopener">Open my verifier ↗</a>
</div>
@@ -157,7 +159,7 @@ export function renderProofUI(panel, { proof, verify, shareBase = '/proof', orig
<textarea class="awh-proof-embed" readonly rows="2" aria-label="Badge embed HTML">${esc(embed)}</textarea>
</div>
`;
- wrap.querySelector('[data-copy-link]')?.addEventListener('click', () => copy(publicUrl, 'Integrity link copied'));
+ wrap.querySelector('[data-copy-link]')?.addEventListener('click', () => copy(publicUrl, 'Anchor link copied'));
wrap.querySelector('[data-copy-embed]')?.addEventListener('click', () => copy(embed, 'Badge embed copied'));
}
diff --git a/src/proof.js b/src/proof.js
index 475dbc325..aab09e9d7 100644
--- a/src/proof.js
+++ b/src/proof.js
@@ -4,8 +4,8 @@
* Reads ?agent=<id>, fetches the owner-gated inclusion proof, and hands it to the
* shared renderer, which auto-runs the independent in-browser verifier. With no
* ?agent it explains how to get here from the wallet hub. A non-owner (or signed-
- * out) visitor is told the per-wallet proof is private and pointed at the public
- * /integrity page, which anyone can verify.
+ * out) visitor is told the per-wallet proof is private and pointed at their own
+ * agents rather than at another owner's wallet.
*/
import { apiFetch } from './api.js';
@@ -25,10 +25,9 @@ async function main() {
if (!agentId) {
root.innerHTML = card(`
<h2>Open from your wallet</h2>
- <p class="awh-proof-lead">To verify a specific wallet, open its <strong>Proof of Custody</strong> tab in the wallet hub, or append <code>?agent=&lt;your-agent-id&gt;</code> to this URL. Want the platform-wide view instead?</p>
+ <p class="awh-proof-lead">To verify a specific wallet, open its <strong>Proof of Custody</strong> tab in the wallet hub, or append <code>?agent=&lt;your-agent-id&gt;</code> to this URL.</p>
<div class="awh-proof-actions" style="margin-top:12px">
<a class="awh-proof-btn" href="/agents">My agents</a>
- <a class="awh-proof-btn ghost" href="/integrity">Public integrity page ↗</a>
</div>`);
return;
}
@@ -41,18 +40,17 @@ async function main() {
if (res.status === 401) {
root.innerHTML = card(`
<h2>This proof is private</h2>
- <p class="awh-proof-lead">Per-wallet custody proofs are only shown to the wallet's owner, so we never expose another owner's data. Sign in if this is your wallet — or verify the platform's on-chain custody, which anyone can do.</p>
+ <p class="awh-proof-lead">Per-wallet custody proofs are only shown to the wallet's owner, so we never expose another owner's data. Sign in if this is your wallet.</p>
<div class="awh-proof-actions" style="margin-top:12px">
<a class="awh-proof-btn" href="/login?next=${encodeURIComponent(location.pathname + location.search)}">Sign in</a>
- <a class="awh-proof-btn ghost" href="/integrity">Verify platform custody ↗</a>
</div>`);
return;
}
if (res.status === 403) {
root.innerHTML = card(`
<h2>Not your wallet</h2>
- <p class="awh-proof-lead">You're signed in, but this wallet belongs to another owner. You can still verify the platform's on-chain custody on the public integrity page.</p>
- <div class="awh-proof-actions" style="margin-top:12px"><a class="awh-proof-btn" href="/integrity">Public integrity page ↗</a></div>`);
+ <p class="awh-proof-lead">You're signed in, but this wallet belongs to another owner. Open the Proof of Custody tab on one of your own agents to verify it.</p>
+ <div class="awh-proof-actions" style="margin-top:12px"><a class="awh-proof-btn" href="/agents">My agents</a></div>`);
return;
}
if (res.status === 404) {
diff --git a/vercel.json b/vercel.json
index e8d559539..be4440c96 100644
--- a/vercel.json
+++ b/vercel.json
@@ -5503,14 +5503,6 @@
"src": "/profile/",
"dest": "/profile.html"
},
- {
- "src": "/integrity",
- "dest": "/integrity.html"
- },
- {
- "src": "/integrity/",
- "dest": "/integrity.html"
- },
{
"src": "/proof",
"dest": "/proof.html"