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.

style(api): strip the banned em and en dashes from the handler and store comments

nirholas3eb72b3440a1
diff --git a/api/_lib/aixbt.js b/api/_lib/aixbt.js
index 2c4bde97e..e402fc412 100644
--- a/api/_lib/aixbt.js
+++ b/api/_lib/aixbt.js
@@ -1,4 +1,4 @@
-// aixbt intelligence client — REST v2 (https://api.aixbt.tech/v2).
+// aixbt intelligence client: REST v2 (https://api.aixbt.tech/v2).
//
// This is the three.ws ⇄ aixbt bridge: it lets three.ws agents tap aixbt's
// narrative / momentum intelligence the same way external builders use the
@@ -11,12 +11,12 @@
// subscription or a time-boxed x402 key pass (see env.js / .env.example).
//
// Endpoints used (per https://docs.aixbt.tech/builders):
-// GET /projects — momentum-ranked projects (filters: names, chain, limit, page)
-// GET /projects/{id} — single project detail
-// GET /intel — recent narrative intel items
-// GET /grounding — hourly structured market context (crypto + tradfi)
-// POST /agents/indigo — agent chat (Pro/Holder plans)
-// GET /api-keys/info — current key metadata (tier, scopes, rate limit)
+// GET /projects : momentum-ranked projects (filters: names, chain, limit, page)
+// GET /projects/{id} : single project detail
+// GET /intel : recent narrative intel items
+// GET /grounding : hourly structured market context (crypto + tradfi)
+// POST /agents/indigo : agent chat (Pro/Holder plans)
+// GET /api-keys/info : current key metadata (tier, scopes, rate limit)
//
// Responses are wrapped by aixbt as { status, data, pagination }. We unwrap to
// the bare `data` and normalize the fields three.ws renders into stable shapes
@@ -56,7 +56,7 @@ class AixbtError extends Error {
}
}
-/** Thrown when no key is configured — callers map this to a 503 + setup hint. */
+/** Thrown when no key is configured: callers map this to a 503 + setup hint. */
export class AixbtNotConfiguredError extends Error {
constructor() {
super('aixbt is not configured on this deployment (set AIXBT_API_KEY)');
@@ -74,7 +74,7 @@ export const AIXBT_SETUP_HINT =
*
* One classifier, every door: api/aixbt/* renders it through respondAixbtError,
* and the /api/v1/market/* handlers rethrow it through the gateway's fail().
- * Keeping it here is what stops the two surfaces from drifting again — the v1
+ * Keeping it here is what stops the two surfaces from drifting again, the v1
* doors used to relay aixbt's raw 401 straight to a caller of a public,
* credential-free endpoint (live on three.ws until this was fixed), telling
* them to authenticate against a door they hold no key to, while /api/aixbt/*
@@ -265,7 +265,7 @@ export async function getGrounding() {
/**
* Agent chat against aixbt's `indigo` agent (Pro/Holder plans only).
- * Not cached — each turn is a distinct conversation.
+ * Not cached: each turn is a distinct conversation.
* @param {Array<{ role: string, content: string }>} messages
*/
export async function chatIndigo(messages) {
@@ -277,7 +277,7 @@ export async function chatIndigo(messages) {
return { reply, raw: data, source: SOURCE };
}
-/** Current API key metadata — tier, scopes, rate limit. */
+/** Current API key metadata: tier, scopes, rate limit. */
export async function getKeyInfo() {
const { data } = await request('/api-keys/info');
return data;
diff --git a/api/_lib/sealed-drop-store.js b/api/_lib/sealed-drop-store.js
index 9379faed7..84f4ffca0 100644
--- a/api/_lib/sealed-drop-store.js
+++ b/api/_lib/sealed-drop-store.js
@@ -3,8 +3,8 @@
*
* A drop is a pre-funded Solana wallet sealed (ECIES) to a recipient and handed
* out by link / QR / 3D agent. This store holds the drop record and runs the
- * single, atomic state machine that makes a drop claimable EXACTLY ONCE — by the
- * holder of the claim secret — or reclaimable by the sender after expiry, never
+ * single, atomic state machine that makes a drop claimable EXACTLY ONCE, by the
+ * holder of the claim secret, or reclaimable by the sender after expiry, never
* both. Mirrors vanity-bounty-store.js: Upstash Redis when configured, an
* in-process Map fallback otherwise (local/CI works; a Redis outage degrades).
*
@@ -20,8 +20,8 @@
*
* ── The create fee lands before the drop does ────────────────────────────────
* A drop is born `escrow_pending`: recorded, but in NO index, and refused by the
- * claim, reveal and reclaim paths. Only `activateDrop` — called once the x402
- * create fee has really settled — flips it to `funded` and indexes it. A fee that
+ * claim, reveal and reclaim paths. Only `activateDrop`, called once the x402
+ * create fee has really settled: flips it to `funded` and indexes it. A fee that
* fails to settle voids the drop (`voidDrop`) after its on-chain funding is swept
* back, so nobody can walk away with a wallet the platform funded for free.
*
@@ -62,7 +62,7 @@ export function isTransientDrop(rec) {
return !!rec && TRANSIENT_STATUSES.includes(rec.status);
}
-// Public projection — the sealed envelope + claim-token hash + funding tx detail
+// Public projection: the sealed envelope + claim-token hash + funding tx detail
// stay private. The privacy boundary: the envelope is released only by the gated
// claim/reveal path, never on a list or status read.
const PUBLIC_FIELDS = Object.freeze([
@@ -225,7 +225,7 @@ return 1
/**
* Atomically claim a drop. The FIRST valid claim (proven possession of the claim
* token) wins; later ones lose. Idempotent on claimerTag. Does NOT release the
- * envelope itself — the caller reads the record after a `won` and returns the
+ * envelope itself: the caller reads the record after a `won` and returns the
* sealed envelope, so a release error can be retried without re-racing.
*
* @param {object} p
@@ -267,7 +267,7 @@ function claimCode(n) {
// Atomic funded→reclaimed compare-and-set, only for EXPIRED drops. Mutually
// exclusive with claim: a claimed drop can never be reclaimed and vice versa.
-// Idempotent — re-running on an already-reclaimed drop returns 1. Returns
+// Idempotent: re-running on an already-reclaimed drop returns 1. Returns
// 1=reclaimable(now reclaimed), 0=not-eligible, -2=missing.
const RECLAIM_LUA = `
local raw = redis.call('HGET', KEYS[1], ARGV[1])
@@ -337,7 +337,7 @@ export async function recordClaimDelivery({ id, claimRecipient }) {
/**
* List a sender's drops (newest first), public projection. `senderTag` is an
* opaque, non-PII tag the creator chooses (e.g. a hash of their session) so they
- * can find their drops to reclaim — it is never required and never exposed.
+ * can find their drops to reclaim: it is never required and never exposed.
* @param {string} senderTag
* @param {number} [limit=50]
*/
@@ -359,7 +359,7 @@ export async function listBySender(senderTag, limit = 50) {
.map(toPublicDrop);
}
-/** Expired, still-funded drops (oldest expiry first) — the reclaim sweep queue. */
+/** Expired, still-funded drops (oldest expiry first), the reclaim sweep queue. */
export async function listReclaimable(limit = 50) {
const now = Date.now();
const n = Math.max(1, Math.min(100, Number(limit) || 50));
@@ -389,7 +389,7 @@ export async function dropStats() {
recs = [...mem.values()];
}
const now = Date.now();
- // Pending/void drops never became gifts, so they count toward nothing — `total`
+ // Pending/void drops never became gifts, so they count toward nothing, `total`
// included, which is the number of drops the platform actually issued.
const real = recs.filter((r) => !isTransientDrop(r));
let funded = 0, claimed = 0, reclaimed = 0;
diff --git a/api/_lib/vanity-bounty-store.js b/api/_lib/vanity-bounty-store.js
index f84b34c9b..7c5f6084f 100644
--- a/api/_lib/vanity-bounty-store.js
+++ b/api/_lib/vanity-bounty-store.js
@@ -8,7 +8,7 @@
* (so local/CI works and a Redis outage degrades rather than throwing).
*
* ── Secret-blind by construction ─────────────────────────────────────────────
- * A stored bounty NEVER holds a private key or seed — only the requester's PUBLIC
+ * A stored bounty NEVER holds a private key or seed, only the requester's PUBLIC
* X25519 recipient key. A winning claim holds only the SEALED envelope (opaque
* ciphertext addressed to the requester) plus the public address. The operator
* therefore cannot open any wallet it brokers; `toPublicBounty()` additionally
@@ -20,13 +20,13 @@
* to the board and to `listClaimable`, and every compare-and-set below refuses it.
* Only `activateBounty` (called after the x402 escrow actually settled on-chain)
* flips it to `open` and indexes it. A settle that fails is voided instead. That
- * ordering is what stops the platform paying a winner — or refunding a requester —
+ * ordering is what stops the platform paying a winner, or refunding a requester -
* out of a bounty whose escrow was never collected.
*
* ── Atomic single-winner settlement ──────────────────────────────────────────
* `claimBounty` runs a Lua compare-and-set: it flips status open→settled, records
* the winner + claim digest, and returns "won" ONLY to the first caller. Every
- * later caller — even with a different valid key — sees `settled` and gets
+ * later caller: even with a different valid key: sees `settled` and gets
* "lost" (idempotent: re-submitting the SAME claim digest returns "won" again so
* a retried settle isn't a double-pay). Expiry refunds are gated by the same
* compare-and-set on open→refunded, so a bounty can never both pay AND refund.
@@ -59,7 +59,7 @@ function isTransient(rec) {
return !!rec && TRANSIENT_STATUSES.includes(rec.status);
}
-// Public board projection — the sealed envelope + escrow proof stay private.
+// Public board projection: the sealed envelope + escrow proof stay private.
// SECURITY: this is the privacy boundary for the board. The sealed envelope is
// only ever returned to the requester through the dedicated reveal path, never here.
const PUBLIC_FIELDS = Object.freeze([
@@ -82,7 +82,7 @@ export function toPublicBounty(rec) {
/**
* Record a bounty. The escrow proof (x402 settlement tx + payer) is stored on the
- * record but never exposed publicly — it is the audit trail proving the requester
+ * record but never exposed publicly: it is the audit trail proving the requester
* actually funded it.
*
* Pass `status: 'escrow_pending'` (what api/vanity/bounties.js does) to record the
@@ -123,7 +123,7 @@ export async function createBounty(rec) {
// Atomic escrow_pending→open compare-and-set, run only once the x402 escrow has
// really settled on-chain. Indexes the bounty in the same call, so it becomes
-// board-visible and claimable at the instant it becomes funded — never before.
+// board-visible and claimable at the instant it becomes funded, never before.
// Idempotent: re-activating an already-open bounty returns 1.
// Returns 1=live, 0=wrong-status, -2=missing.
const ACTIVATE_LUA = `
@@ -331,7 +331,7 @@ export async function recordPayout({ id, payoutTx, workerId, amountAtomics }) {
// Atomic open→refunded compare-and-set, only for EXPIRED bounties. Mutually
// exclusive with settlement: a settled bounty can never be refunded and vice
-// versa. Idempotent — re-running on an already-refunded bounty returns 1 so a
+// versa. Idempotent: re-running on an already-refunded bounty returns 1 so a
// retried refund doesn't error. Returns 1=refundable(now refunded), 0=not-eligible.
const REFUND_LUA = `
local raw = redis.call('HGET', KEYS[1], ARGV[1])
@@ -419,7 +419,7 @@ export async function queryBounties(q = {}) {
}
// A pending/void record has no escrow behind it, so it never appears on the
- // board — not even under status=all, which reads the whole recency index.
+ // board: not even under status=all, which reads the whole recency index.
let filtered = recs.filter((r) => !isTransient(r));
if (status === 'open') filtered = filtered.filter((r) => r.status === 'open' && r.expiresAt > now);
else if (status === 'settled') filtered = filtered.filter((r) => r.status === 'settled');
@@ -435,13 +435,13 @@ export async function queryBounties(q = {}) {
return { bounties: page, total, hasMore: offset + limit < total };
}
-/** Open bounties only, oldest-expiry-first — the worker fleet's claim queue. */
+/** Open bounties only, oldest-expiry-first: the worker fleet's claim queue. */
export async function listClaimable(limit = 30) {
const now = Date.now();
const redis = getRedis();
if (redis) {
// Score is expiresAt; range from now upward returns only still-live bounties
- // in expiry order (soonest-to-expire first — fill them before they refund).
+ // in expiry order (soonest-to-expire first: fill them before they refund).
const members = await redis.zrange(K.open, now, '+inf', { byScore: true });
const slice = members.slice(0, Math.max(1, Math.min(60, limit)));
if (!slice.length) return [];
@@ -466,7 +466,7 @@ export async function bountyStats() {
recs = [...mem.values()];
}
const now = Date.now();
- // Pending/void records never became bounties, so they count toward nothing —
+ // Pending/void records never became bounties, so they count toward nothing -
// including `total`, which is the number of bounties the market actually took.
const real = recs.filter((r) => !isTransient(r));
let open = 0, openEscrow = 0, settled = 0, paidOut = 0;
diff --git a/api/tournaments/[id]/[action].js b/api/tournaments/[id]/[action].js
index dbb113c55..4e25af921 100644
--- a/api/tournaments/[id]/[action].js
+++ b/api/tournaments/[id]/[action].js
@@ -1,5 +1,5 @@
/**
- * Social Trading Arena — sub-route entry point for /api/tournaments/:id/<action>.
+ * Social Trading Arena: sub-route entry point for /api/tournaments/:id/<action>.
*
* GET /api/tournaments/:id/stream → SSE live rank changes
* POST /api/tournaments/:id/join → enter an agent you own
diff --git a/api/traders/preview.js b/api/traders/preview.js
index e732649c0..b999facc5 100644
--- a/api/traders/preview.js
+++ b/api/traders/preview.js
@@ -1,5 +1,5 @@
/**
- * Public wallet preview — show an on-chain pump.fun trade record without auth.
+ * Public wallet preview: show an on-chain pump.fun trade record without auth.
*
* GET /api/traders/preview?wallet=<base58>&network=mainnet
*
@@ -40,14 +40,14 @@ export default wrap(async (req, res) => {
// Build a useful summary even if wallet_reputation doesn't have this wallet
// yet (it's scored by the smart-money rollup worker, so new wallets lag).
// Every per-coin number traces to a real on-chain trade aggregate in
- // pump_coin_wallets — buy/sell lamports + base amounts + tx counts + the
- // observed first/last-seen window — so the wallet dashboard renders deep,
+ // pump_coin_wallets: buy/sell lamports + base amounts + tx counts + the
+ // observed first/last-seen window: so the wallet dashboard renders deep,
// honest analytics with no synthesized values.
const coins = (recent || []).map((r) => {
const buySol = r.buy_lamports != null ? Number(r.buy_lamports) / LAMPORTS : null;
const sellSol = r.sell_lamports != null ? Number(r.sell_lamports) / LAMPORTS : null;
const pnlSol = buySol != null && sellSol != null ? sellSol - buySol : null;
- // ROI on deployed capital — the canonical "Xx" a trader reads off GMGN.
+ // ROI on deployed capital: the canonical "Xx" a trader reads off GMGN.
const roi = buySol != null && sellSol != null && buySol > 0 ? (sellSol - buySol) / buySol : null;
const buyCount = r.buy_count != null ? Number(r.buy_count) : 0;
const sellCount = r.sell_count != null ? Number(r.sell_count) : 0;
@@ -93,7 +93,7 @@ export default wrap(async (req, res) => {
const totalBuy = coins.reduce((a, c) => a + (c.buy_sol || 0), 0);
const totalSell = coins.reduce((a, c) => a + (c.sell_sol || 0), 0);
- // ROI distribution buckets — the GMGN "Distribution (Token N)" panel. Each
+ // ROI distribution buckets: the GMGN "Distribution (Token N)" panel. Each
// closed position lands in exactly one bucket by realized return.
const closed = coins.filter((c) => c.roi != null && !c.open);
// Win/loss is a statement about REALIZED outcomes, so only closed positions
@@ -122,7 +122,7 @@ export default wrap(async (req, res) => {
const openCount = coins.filter((c) => c.open).length;
const creatorCoins = coins.filter((c) => c.is_creator).length;
- // Category mix — what this wallet actually trades.
+ // Category mix: what this wallet actually trades.
const catMap = new Map();
for (const c of coins) {
const k = c.category || 'unknown';
@@ -149,7 +149,7 @@ export default wrap(async (req, res) => {
// `known` means the rollup has graded this wallet. `claimable` means there is
// a real on-chain record to claim, which is true the moment the indexer has
- // seen the wallet trade — the rollup lags by design. Gating claimable on
+ // seen the wallet trade: the rollup lags by design. Gating claimable on
// known made /claim-wallet answer "no record found" to wallets carrying
// thousands of indexed pump.fun trades, purely because the scorer hadn't run.
const known = !!profile;
diff --git a/api/user/x402-subscriptions.js b/api/user/x402-subscriptions.js
index fe199bd1c..ae8f21716 100644
--- a/api/user/x402-subscriptions.js
+++ b/api/user/x402-subscriptions.js
@@ -1,15 +1,15 @@
// GET /api/user/x402-subscriptions
// Lists the signed-in user's x402 subscription keys (the credential an AWS
// Marketplace customer is issued, and any native subscription created on
-// their behalf). Returns prefixes and usage only — never the secret.
+// their behalf). Returns prefixes and usage only: never the secret.
//
// POST /api/user/x402-subscriptions
// body { action: 'rotate' | 'revoke', id: '<subscriptionId>' }
-// rotate — revoke the old key and mint a fresh one. The new plaintext is
+// rotate: revoke the old key and mint a fresh one. The new plaintext is
// returned ONCE. For AWS-Marketplace-sourced keys this goes
// through the billing bridge so the new key stays linked to the
// AWS CustomerIdentifier and keeps metering correctly.
-// revoke — permanently disable a NATIVE key. AWS-sourced keys cannot be
+// revoke: permanently disable a NATIVE key. AWS-sourced keys cannot be
// bare-revoked here (that would cut off access the customer is
// paying AWS for); cancellation must originate in AWS Marketplace.
// Rotate them instead.
@@ -86,7 +86,7 @@ export default wrap(async (req, res) => {
return json(res, 200, { subscriptions: rows.map(shape) });
}
- // POST — rotate or revoke. Both permanently change a live API credential on
+ // POST: rotate or revoke. Both permanently change a live API credential on
// nothing but the session cookie, so they need the same CSRF proof every
// other session-auth writer here demands (provider-keys PATCH, the wallet
// routes). Without it a cross-site form POST could revoke a paying
@@ -113,7 +113,7 @@ export default wrap(async (req, res) => {
return json(res, 400, { error: 'missing_id' });
}
- // Ownership check — never act on a subscription the caller doesn't own.
+ // Ownership check: never act on a subscription the caller doesn't own.
const [sub] = await sql`
SELECT id, name, rate_limit_per_minute, expires_at, revoked_at, meta, created_by
FROM x402_subscriptions
@@ -192,7 +192,7 @@ export default wrap(async (req, res) => {
});
}
- // Native rotate — mint the replacement FIRST, then revoke the old key.
+ // Native rotate: mint the replacement FIRST, then revoke the old key.
// Revoking first meant any mint failure (createSubscription rejects a row
// with no name, for one) left the caller holding nothing: old key dead, new
// key never issued, 502 with no way back. In this order a failed mint is
diff --git a/api/v1/_catalog.js b/api/v1/_catalog.js
index 841a2107c..f76349144 100644
--- a/api/v1/_catalog.js
+++ b/api/v1/_catalog.js
@@ -19,7 +19,7 @@ export const API_META = {
base_url: '/api/v1',
description:
'One API for the three.ws platform: 3D generation, market & narrative intelligence, ' +
- 'sentiment, and on-chain agent capabilities — one key, one rate-limit budget, one usage ledger.',
+ 'sentiment, and on-chain agent capabilities: one key, one rate-limit budget, one usage ledger.',
auth: {
scheme: 'Bearer',
description:
@@ -55,10 +55,10 @@ export const CATALOG = [
path: '/api/v1/ai/text-to-3d',
auth: 'public',
summary:
- 'Free text→3D — the only text-to-mesh lane in the agent-payments ecosystem; textured GLB ' +
+ 'Free text→3D: the only text-to-mesh lane in the agent-payments ecosystem; textured GLB ' +
'from a prompt, no key, no wallet. Draft tier runs on the NVIDIA NIM TRELLIS lane; free ' +
'per-IP quota of 10/day, then 429 pointing at the paid /api/x402/forge tiers.',
- params: { prompt: 'string — describe a single object or character (3–1000 chars, required)' },
+ params: { prompt: 'string: describe a single object or character (3-1000 chars, required)' },
},
{
id: 'v1.ai.image',
@@ -66,12 +66,12 @@ export const CATALOG = [
path: '/api/v1/ai/image',
auth: 'public',
summary:
- 'Text→image for agents over x402 — 5 free images/day per IP, then $0.02 USDC/image, ' +
+ 'Text→image for agents over x402: 5 free images/day per IP, then $0.02 USDC/image, ' +
'no API key. Runs on NVIDIA NIM / Google Vertex lanes; returns a durable image URL.',
params: {
- prompt: 'string — image description (required, 3–2000 chars)',
- aspect_ratio: 'string — 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 (default 1:1)',
- seed: 'number — optional deterministic seed (honored on NIM/Replicate lanes)',
+ prompt: 'string: image description (required, 3-2000 chars)',
+ aspect_ratio: 'string: 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 (default 1:1)',
+ seed: 'number: optional deterministic seed (honored on NIM/Replicate lanes)',
},
},
{
@@ -80,7 +80,7 @@ export const CATALOG = [
path: '/api/v1/sentiment',
auth: 'public',
summary: 'Classify text sentiment (Positive / Negative / Neutral) with a deterministic score.',
- params: { text: 'string — the text to score (required)' },
+ params: { text: 'string: the text to score (required)' },
},
{
id: 'v1.market.intel',
@@ -90,9 +90,9 @@ export const CATALOG = [
scope: 'agents:read',
summary: 'Recent narrative / market intelligence items, momentum-ranked.',
params: {
- limit: 'number 1–50 (default 20)',
- category: 'string — filter by category (optional)',
- chain: 'string — filter by chain (optional)',
+ limit: 'number 1-50 (default 20)',
+ category: 'string: filter by category (optional)',
+ chain: 'string: filter by chain (optional)',
},
},
{
@@ -103,10 +103,10 @@ export const CATALOG = [
scope: 'agents:read',
summary: 'Momentum-ranked crypto projects with narrative scores.',
params: {
- limit: 'number 1–50 (default 20)',
+ limit: 'number 1-50 (default 20)',
page: 'number (default 1)',
- names: 'string — comma-separated project names to filter (optional)',
- chain: 'string — filter by chain (optional)',
+ names: 'string: comma-separated project names to filter (optional)',
+ chain: 'string: filter by chain (optional)',
},
},
{
@@ -119,7 +119,7 @@ export const CATALOG = [
'(eip155:<chainId>:<registry>/<tokenId>).',
params: {
caip:
- 'path — CAIP agent ref, its "/" passed as a real path separator ' +
+ 'path: CAIP agent ref, its "/" passed as a real path separator ' +
'(eip155:8453:0x8004A169.../1); encoded colons are fine, an encoded slash is rejected',
},
},
@@ -129,13 +129,13 @@ export const CATALOG = [
path: '/api/v1/ai/tts',
auth: 'public',
summary:
- 'Text-to-speech (neural Magpie voices) — 10 free calls/day per IP (≤500 chars), ' +
+ 'Text-to-speech (neural Magpie voices): 10 free calls/day per IP (≤500 chars), ' +
'then $0.005 USDC/call via x402. GET ?voices=1 lists voices. Returns base64 WAV/PCM.',
params: {
- text: 'string — text to synthesize (required, ≤4096 chars; free tier ≤500)',
- voice: 'string — voice id (optional, default nova)',
- format: 'string — "wav" | "pcm" (optional, default wav)',
- language: 'string — BCP-47 tag (optional, default en-US)',
+ text: 'string: text to synthesize (required, ≤4096 chars; free tier ≤500)',
+ voice: 'string: voice id (optional, default nova)',
+ format: 'string: "wav" | "pcm" (optional, default wav)',
+ language: 'string: BCP-47 tag (optional, default en-US)',
},
},
{
@@ -144,13 +144,13 @@ export const CATALOG = [
path: '/api/v1/ai/asr',
auth: 'public',
summary:
- 'Speech-to-text (NVIDIA Riva) — 5 free clips/day per IP (≤60s), then $0.01 USDC/clip ' +
+ 'Speech-to-text (NVIDIA Riva): 5 free clips/day per IP (≤60s), then $0.01 USDC/clip ' +
'via x402. Accepts base64 JSON or raw audio/* bytes; returns transcript + confidence.',
params: {
- audio: 'string — base64 audio in a JSON body, or raw bytes with an audio/* Content-Type (required)',
- format: 'string — wav | pcm | flac | ogg (optional)',
- language: 'string — BCP-47 tag (optional, default en-US)',
- words: 'string — "1" for word-level timestamps (optional)',
+ audio: 'string: base64 audio in a JSON body, or raw bytes with an audio/* Content-Type (required)',
+ format: 'string: wav | pcm | flac | ogg (optional)',
+ language: 'string: BCP-47 tag (optional, default en-US)',
+ words: 'string: "1" for word-level timestamps (optional)',
},
},
{
@@ -160,10 +160,10 @@ export const CATALOG = [
auth: 'public',
summary:
'Rug-check any Solana token in one free call: authority status, holder concentration, ' +
- 'liquidity depth — on-chain facts, no invented scores. Composes getAccountInfo + ' +
+ 'liquidity depth: on-chain facts, no invented scores. Composes getAccountInfo + ' +
'getTokenLargestAccounts + DexScreener into a report agents weigh themselves; 20/min per IP.',
params: {
- address: 'string — base58 Solana mint address (required; EVM 0x… returns 400)',
+ address: 'string: base58 Solana mint address (required; EVM 0x… returns 400)',
},
},
{
@@ -172,13 +172,13 @@ export const CATALOG = [
path: '/api/v1/resolve',
auth: 'public',
summary:
- 'Free name resolution — a high-frequency agent primitive. Resolve a .eth name to its ' +
+ 'Free name resolution: a high-frequency agent primitive. Resolve a .eth name to its ' +
'Ethereum address via ENS, or a .sol name to its Solana owner via SNS; reverse-resolve an ' +
'address back to its primary name in either direction. No key, no wallet; 30/min per IP.',
params: {
- name: 'string — a name ending in .eth (ENS) or .sol (SNS) to resolve (required unless address is passed)',
- address: 'string — 0x… Ethereum or base58 Solana address to reverse-resolve (required unless name is passed)',
- chain: 'string — "ethereum" | "solana", optional hint validated against address (auto-detected from format when omitted)',
+ name: 'string: a name ending in .eth (ENS) or .sol (SNS) to resolve (required unless address is passed)',
+ address: 'string: 0x… Ethereum or base58 Solana address to reverse-resolve (required unless name is passed)',
+ chain: 'string: "ethereum" | "solana", optional hint validated against address (auto-detected from format when omitted)',
},
},
{
@@ -228,11 +228,11 @@ export const CATALOG = [
summary:
'The 24/7 Robinhood Chain tokenized-equity board: live Chainlink NAV vs. deepest Uniswap ' +
'DEX price, premium/discount, uiMultiplier, 24h volume, and liquidity for every Stock ' +
- 'Token — one on-chain multicall, never 95 RPC calls. Free, keyless; 60/min per IP.',
+ 'Token: one on-chain multicall, never 95 RPC calls. Free, keyless; 60/min per IP.',
params: {
- q: 'string — filter by symbol or name substring (optional)',
- sort: 'string — "symbol" | "volume" | "premium" | "liquidity" (default symbol)',
- dir: 'string — "asc" | "desc" (default desc, ignored for symbol)',
+ q: 'string: filter by symbol or name substring (optional)',
+ sort: 'string: "symbol" | "volume" | "premium" | "liquidity" (default symbol)',
+ dir: 'string: "asc" | "desc" (default desc, ignored for symbol)',
},
},
{
@@ -243,8 +243,8 @@ export const CATALOG = [
summary:
'One Robinhood Chain Stock Token in depth: Chainlink NAV + recent round history, every ' +
'DEX pair, premium/discount, holders, recent transfers, and contract links. Display-only ' +
- '— carries the US-persons eligibility disclosure. Free, keyless; 60/min per IP.',
- params: { symbol: 'string — Stock Token ticker, e.g. "AAPL" (required)' },
+ '- carries the US-persons eligibility disclosure. Free, keyless; 60/min per IP.',
+ params: { symbol: 'string: Stock Token ticker, e.g. "AAPL" (required)' },
},
{
id: 'v1.robinhood.coins',
@@ -255,8 +255,8 @@ export const CATALOG = [
'Robinhood Chain memecoin screener (NOXA + The Odyssey launchpads) via CoinGecko ' +
'categories: price, market cap, 24h/7d change, 7d sparkline. Free, keyless; 60/min per IP.',
params: {
- category: 'string — "meme" | "stocks-ecosystem" | "ecosystem" (default meme)',
- sort: 'string — "market_cap" | "volume" | "gainers" | "losers" (default market_cap)',
+ category: 'string: "meme" | "stocks-ecosystem" | "ecosystem" (default meme)',
+ sort: 'string: "market_cap" | "volume" | "gainers" | "losers" (default market_cap)',
},
},
{
@@ -268,7 +268,7 @@ export const CATALOG = [
'One Robinhood Chain coin in depth: DexScreener market data (price, mcap, FDV, ' +
'liquidity, volume, pools) + Blockscout holders/transfers/contract links. Non-security ' +
'token, no eligibility gate. Free, keyless; 60/min per IP.',
- params: { address: 'string — 0x… token contract address (required)' },
+ params: { address: 'string: 0x… token contract address (required)' },
},
{
id: 'v1.robinhood.launches',
@@ -279,7 +279,7 @@ export const CATALOG = [
'Recent Robinhood Chain launchpad activity (NOXA instant + The Odyssey bonding-curve), ' +
'read from on-chain logs and enriched with DexScreener market data, newest first. ' +
'Free, keyless; 60/min per IP.',
- params: { limit: 'number 1–60 (default 40)' },
+ params: { limit: 'number 1-60 (default 40)' },
},
{
id: 'v1.pump.search',
@@ -291,8 +291,8 @@ export const CATALOG = [
'pump.fun-fallback). Pairs with trending/curve/launches/whales below to round out the free ' +
'pump.fun family under /api/v1. No key; 60/min per IP.',
params: {
- q: 'string — token name, symbol, or mint to search for (required)',
- limit: 'number 1–20 (default 8)',
+ q: 'string: token name, symbol, or mint to search for (required)',
+ limit: 'number 1-20 (default 8)',
},
},
{
@@ -301,14 +301,14 @@ export const CATALOG = [
path: '/api/v1/pump/trending',
auth: 'public',
summary:
- 'Free, momentum-ranked "what\'s hot right now" feed for Solana tokens — fuses windowed volume, ' +
+ 'Free, momentum-ranked "what\'s hot right now" feed for Solana tokens, fuses windowed volume, ' +
'buy pressure, a volume-spike signal, and price change across pump.fun, DexScreener, and ' +
- '(best-effort) GMGN smart money into one 0–100 score. Same engine as GET /api/crypto/trending, ' +
+ '(best-effort) GMGN smart money into one 0-100 score. Same engine as GET /api/crypto/trending, ' +
'capped slimmer for this door. No key; 60/min per IP.',
params: {
- window: 'string — "5m" | "1h" | "24h" (default "1h") — trade window the score measures',
- limit: 'number 1–25 (default 20)',
- source: 'string — "pumpfun" | "all" (default "all") — "pumpfun" restricts to the pump.fun board',
+ window: 'string: "5m" | "1h" | "24h" (default "1h"), trade window the score measures',
+ limit: 'number 1-25 (default 20)',
+ source: 'string: "pumpfun" | "all" (default "all"), "pumpfun" restricts to the pump.fun board',
},
},
{
@@ -317,11 +317,11 @@ export const CATALOG = [
path: '/api/v1/pump/curve',
auth: 'public',
summary:
- 'Free bonding-curve / graduation status for a pump.fun mint — % to graduation, SOL in the ' +
+ 'Free bonding-curve / graduation status for a pump.fun mint, % to graduation, SOL in the ' +
'curve, tokens remaining, market cap, and whether it has migrated to an AMM (Raydium / ' +
'PumpSwap). Same engine as GET /api/crypto/bonding. No key; 60/min per IP.',
params: {
- mint: 'string — base58 Solana pump.fun mint address (required), e.g. FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump ($THREE)',
+ mint: 'string: base58 Solana pump.fun mint address (required), e.g. FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump ($THREE)',
},
},
{
@@ -331,14 +331,14 @@ export const CATALOG = [
auth: 'public',
summary:
'Free, paginated feed of every coin launched THROUGH three.ws (not a generic pump.fun-wide ' +
- 'feed — the platform\'s own launch directory), joined with the launching agent. Same query as ' +
+ 'feed: the platform\'s own launch directory), joined with the launching agent. Same query as ' +
'the /launches page. No key; 60/min per IP.',
params: {
- limit: 'number 1–100 (default 24)',
+ limit: 'number 1-100 (default 24)',
offset: 'number (default 0)',
- network: 'string — "mainnet" | "devnet" (default "mainnet")',
- agent_id: 'string — uuid, restrict to one launching agent (optional)',
- min_tier: 'string — "prime" | "strong" | "lean" | "watch" | "avoid", oracle conviction floor (optional)',
+ network: 'string: "mainnet" | "devnet" (default "mainnet")',
+ agent_id: 'string: uuid, restrict to one launching agent (optional)',
+ min_tier: 'string: "prime" | "strong" | "lean" | "watch" | "avoid", oracle conviction floor (optional)',
},
},
{
@@ -348,14 +348,14 @@ export const CATALOG = [
auth: 'public',
summary:
'Free, paginated feed of every generated 3D asset minted as a Metaplex Core NFT THROUGH ' +
- 'three.ws — the NFT analogue of GET /api/v1/pump/launches. Each entry carries baked ' +
- 'provenance, royalty terms, remix lineage (parent_mint), and — for a remix — the real ' +
+ 'three.ws: the NFT analogue of GET /api/v1/pump/launches. Each entry carries baked ' +
+ 'provenance, royalty terms, remix lineage (parent_mint), and, for a remix, the real ' +
'royalty settlement routed to the source creator. No key; 60/min per IP.',
params: {
- limit: 'number 1–100 (default 24)',
+ limit: 'number 1-100 (default 24)',
offset: 'number (default 0)',
- network: 'string — "mainnet" | "devnet" (default "mainnet")',
- agent_id: 'string — uuid, restrict to one creating agent (optional)',
+ network: 'string: "mainnet" | "devnet" (default "mainnet")',
+ agent_id: 'string: uuid, restrict to one creating agent (optional)',
},
},
{
@@ -364,14 +364,14 @@ export const CATALOG = [
path: '/api/v1/pump/whales',
auth: 'public',
summary:
- 'Free whale / large-buy detection across pump.fun — facts only (which wallets moved how much ' +
+ 'Free whale / large-buy detection across pump.fun, facts only (which wallets moved how much ' +
'SOL, and when), no invented bullish/bearish signal. The read version of the whale-activity ' +
'oracle behind the paid /api/x402/pump-agent-audit; same scan engine as GET /api/crypto/whales. ' +
'No key; 60/min per IP.',
params: {
- mint: 'string — base58 Solana mint; omit for market-wide top whale wallets, or scope to one token (optional)',
- limit: 'number 1–25 (default 5)',
- minSol: 'number — single-buy SOL threshold to qualify as a whale (default 5)',
+ mint: 'string: base58 Solana mint; omit for market-wide top whale wallets, or scope to one token (optional)',
+ limit: 'number 1-25 (default 5)',
+ minSol: 'number: single-buy SOL threshold to qualify as a whale (default 5)',
},
},
];
diff --git a/api/v1/agents/[...caip].js b/api/v1/agents/[...caip].js
index 5f7511c9b..64a5255cf 100644
--- a/api/v1/agents/[...caip].js
+++ b/api/v1/agents/[...caip].js
@@ -13,7 +13,7 @@
*
* GET /api/v1/agents/eip155:8453:0x8004A169.../1
*
- * Percent-encoding the colons is fine (`eip155%3A8453%3A0x8004A169.../1`) —
+ * Percent-encoding the colons is fine (`eip155%3A8453%3A0x8004A169.../1`) -
* the router decodes each segment. Percent-encoding the SLASH is not: the API
* dispatcher rejects any segment that decodes to contain "/" or "\", because
* that is exactly how "%2f..%2f..%2fvite.config" would smuggle a traversal past
diff --git a/api/v1/market/projects.js b/api/v1/market/projects.js
index 529645f8f..3b48bd652 100644
--- a/api/v1/market/projects.js
+++ b/api/v1/market/projects.js
@@ -1,4 +1,4 @@
-// GET /api/v1/market/projects — momentum-ranked crypto projects.
+// GET /api/v1/market/projects: momentum-ranked crypto projects.
//
// Unified-API surface over the aixbt bridge (api/_lib/aixbt.js). Like
// /api/v1/market/intel, this consumes the global aixbt ceiling on top of the
@@ -14,12 +14,12 @@ export default defineEndpoint({
auth: 'optional',
scope: 'agents:read',
handler: async ({ query }) => {
- // See api/v1/market/intel.js — thrown as the canonical missing-env error
+ // See api/v1/market/intel.js: thrown as the canonical missing-env error
// so wrap() names it to the client instead of sanitizing the message away.
if (!aixbtEnabled()) throw new Error('Missing required env var: AIXBT_API_KEY');
const g = await limits.aixbtGlobal();
- if (!g.success) fail(429, 'rate_limited', 'market intelligence is busy — retry shortly');
+ if (!g.success) fail(429, 'rate_limited', 'market intelligence is busy, retry shortly');
let result;
try {
@@ -30,7 +30,7 @@ export default defineEndpoint({
chain: query.chain,
});
} catch (err) {
- // See api/v1/market/intel.js — one shared classifier so this door and
+ // See api/v1/market/intel.js: one shared classifier so this door and
// /api/aixbt/* can never disagree about whose fault a failure is.
const mapped = mapAixbtFailure(err);
if (!mapped) throw err;
diff --git a/api/vanity/bounties.js b/api/vanity/bounties.js
index ed3af9f06..0b081ffc8 100644
--- a/api/vanity/bounties.js
+++ b/api/vanity/bounties.js
@@ -1,10 +1,10 @@
-// /api/vanity/bounties — the x402 grind-bounty market.
+// /api/vanity/bounties: the x402 grind-bounty market.
//
// A decentralized, secret-blind, pay-for-results market for HARD vanity Solana
// addresses. A requester posts a pattern and escrows an x402 USDC bounty; a fleet
// of independent workers grind in parallel and race to find a matching key. The
// FIRST worker to submit a verified, sealed, pattern-matching claim is paid the
-// bounty on-chain — but the found secret is sealed to the requester's X25519 key,
+// bounty on-chain, but the found secret is sealed to the requester's X25519 key,
// so the worker earns the bounty yet never sees the wallet. If a bounty expires
// unfilled, its escrow is refunded to the requester.
//
@@ -26,17 +26,17 @@
// POST ?action=reveal → requester fetches the sealed envelope
// for a settled bounty by proving control of the X25519 key (a
// signature is not possible over X25519, so this returns the sealed
-// envelope to anyone — it is useless without the private key — and
+// envelope to anyone: it is useless without the private key, and
// the open happens entirely client-side).
//
// Money + key safety (see vanity-bounty-store.js + vanity-bounty-payout.js):
// • escrow is funded by a real x402 USDC payment before the bounty goes live;
// • a worker is paid ONLY after an atomic open→settled compare-and-set marks the
-// bounty for that exact claim — never two workers, never a losing/unverified
+// bounty for that exact claim: never two workers, never a losing/unverified
// claim, never plaintext;
// • payout + refund are exactly-once (recorded tx short-circuits a re-send) and
// mutually exclusive (settle XOR refund);
-// • the worker path is secret-blind by construction — the only thing it may
+// • the worker path is secret-blind by construction, the only thing it may
// submit is a sealed envelope addressed to the requester (verified server-side
// before paying); the operator never holds the plaintext key either.
@@ -145,9 +145,9 @@ function buildEscrowRequirements(resourceUrl, priceAtomics) {
}
const ESCROW_DESCRIPTION =
- 'three.ws Grind-Bounty Market — escrow a USDC bounty for a HARD Solana vanity ' +
+ 'three.ws Grind-Bounty Market: escrow a USDC bounty for a HARD Solana vanity ' +
'address and a fleet of independent workers grinds it in parallel. The first worker ' +
- 'to submit a verified key matching your pattern is paid automatically — but the found ' +
+ 'to submit a verified key matching your pattern is paid automatically, but the found ' +
'secret is ECIES-sealed to YOUR X25519 key, so the worker earns the bounty yet never ' +
'sees the wallet. Unfilled bounties refund on expiry. Pay-per-post in USDC on Base or ' +
'Solana mainnet. Set prefix/suffix/ignoreCase, amount (USDC atomic units), recipient ' +
@@ -168,9 +168,9 @@ const ESCROW_INPUT_SCHEMA = {
suffix: { type: 'string', description: 'Base58 suffix the address must end with.' },
ignoreCase: { type: 'string', enum: ['0', '1', 'true', 'false'] },
amount: { type: 'string', description: 'Bounty in USDC atomic units (6 decimals). Min 50000 ($0.05).' },
- recipient: { type: 'string', description: 'Your 32-byte X25519 public key (Base58/Base64url/hex) — the found secret is sealed to it.' },
+ recipient: { type: 'string', description: 'Your 32-byte X25519 public key (Base58/Base64url/hex), the found secret is sealed to it.' },
refundAddress: { type: 'string', description: 'Solana address refunded if the bounty expires unfilled.' },
- expiryHours: { type: 'string', description: 'Hours until the bounty expires + refunds. 1–720, default 48.' },
+ expiryHours: { type: 'string', description: 'Hours until the bounty expires + refunds. 1-720, default 48.' },
label: { type: 'string', description: 'Optional public label for the board.' },
},
};
@@ -245,7 +245,7 @@ function parseCreate(url) {
// Validate + canonicalize an X25519 key to Base58 (parseX25519Key accepts
// Base58/Base64url/hex; we re-encode to Base58 so the stored recipient and the
-// claim's envelope.recipient — which sealed-envelope.js also encodes as Base58 —
+// claim's envelope.recipient: which sealed-envelope.js also encodes as Base58 -
// compare equal regardless of the input encoding the requester used).
function bs58X25519(key) {
const bytes = parseX25519Key(key, 'recipient'); // throws a clean 400 on bad shape
@@ -264,7 +264,7 @@ async function handleGet(req, res, url) {
const view = (url.searchParams.get('view') || 'board').toLowerCase();
- // quote and config are pure computation — no Redis, no try-catch needed.
+ // quote and config are pure computation: no Redis, no try-catch needed.
if (view === 'quote') {
const pattern = normalizeBountyPattern({
prefix: url.searchParams.get('prefix') || '',
@@ -359,10 +359,10 @@ async function handleCreate(req, res, url) {
return error(res, err.status || 400, err.code || 'validation_error', err.message);
}
- // Without a payout wallet the platform can neither pay a winner nor refund —
+ // Without a payout wallet the platform can neither pay a winner nor refund -
// refuse to take escrow it couldn't return. Fail BEFORE the payment challenge.
if (!payoutConfigured()) {
- return error(res, 503, 'payout_unconfigured', 'the bounty market payout wallet is not configured — posting is temporarily unavailable');
+ return error(res, 503, 'payout_unconfigured', 'the bounty market payout wallet is not configured, posting is temporarily unavailable');
}
const resourceUrl = resolveResourceUrl(req, ROUTE);
@@ -393,7 +393,7 @@ async function handleCreate(req, res, url) {
// Only requests carrying a payment proof reach the facilitator /verify round-trip,
// so gate exactly here with the shared critical x402-verify limiters (per-IP +
// global). Without this, one cheap junk-X-PAYMENT request amplifies into one
- // outbound facilitator call at our expense — the same protection paidEndpoint()
+ // outbound facilitator call at our expense: the same protection paidEndpoint()
// applies, which this hand-rolled handler would otherwise skip.
const vIp = await limits.x402VerifyIp(clientIp(req));
if (!vIp.success) return rateLimited(res, vIp);
@@ -428,7 +428,7 @@ async function handleCreate(req, res, url) {
// board and to workers, and refused by both the claim and the refund
// compare-and-set. Only a settled escrow promotes it (activateBounty). Without
// that gate a settle failure would leave a live bounty backed by nothing, and
- // the platform would pay its winner — or its expiry refund — out of pocket.
+ // the platform would pay its winner, or its expiry refund, out of pocket.
const nonce = bytesToHex(randomSeed());
const id = deriveBountyId({ recipient: parsed.recipient, pattern: parsed.pattern, amountAtomics: parsed.amountAtomics, nonce });
const now = Date.now();
@@ -447,7 +447,7 @@ async function handleCreate(req, res, url) {
createdAt: now,
expiresAt: now + parsed.expiryHours * 3600_000,
status: 'escrow_pending',
- // Escrow audit trail — proves the requester funded it. Not exposed publicly.
+ // Escrow audit trail: proves the requester funded it. Not exposed publicly.
escrowPayer: verified.payer || null,
};
@@ -465,7 +465,7 @@ async function handleCreate(req, res, url) {
settled = await settlePayment({ verified });
} catch (err) {
await voidBounty({ id, reason: `escrow settle failed: ${err.message}` }).catch(() => {});
- return error(res, err.status || 502, err.code || 'settle_failed', `${err.message} — no bounty was posted; retry with a fresh payment`);
+ return error(res, err.status || 502, err.code || 'settle_failed', `${err.message}, no bounty was posted; retry with a fresh payment`);
}
// Escrow collected: promote the bounty to live + indexed in one atomic step.
@@ -491,7 +491,7 @@ async function handleCreate(req, res, url) {
bounty: await getBounty(id),
escrow: { funded: true, txHash: settled.transaction || null, payer: settled.payer || verified.payer || null, network: settled.network || null },
boardUrl: `${PUBLIC_ORIGIN}/vanity/bounties#${id}`,
- notice: 'Save your X25519 PRIVATE key — it is the ONLY way to open the sealed wallet when a worker finds it. three.ws never sees it.',
+ notice: 'Save your X25519 PRIVATE key: it is the ONLY way to open the sealed wallet when a worker finds it. three.ws never sees it.',
});
const contentType = 'application/json; charset=utf-8';
@@ -533,14 +533,14 @@ async function handleClaim(req, res) {
// Reject fast on a closed/expired bounty before doing crypto work.
if (record.status !== 'open') {
- return json(res, 409, { claimed: false, status: record.status, reason: `bounty is ${record.status} — too late`, winnerAddress: record.winnerAddress || null });
+ return json(res, 409, { claimed: false, status: record.status, reason: `bounty is ${record.status}, too late`, winnerAddress: record.winnerAddress || null });
}
if (record.expiresAt && Date.now() > record.expiresAt) {
return json(res, 409, { claimed: false, status: 'expired', reason: 'bounty expired before this claim' });
}
// Secret-blind anti-cheat: verify the address matches the pattern AND the
- // sealed envelope is addressed to the requester — WITHOUT ever decrypting it.
+ // sealed envelope is addressed to the requester: WITHOUT ever decrypting it.
const verification = verifyClaimEnvelope(record, { address, sealedSecret });
if (!verification.ok) {
const failed = verification.checks.filter((c) => !c.pass).map((c) => c.id);
@@ -574,7 +574,7 @@ async function handleClaim(req, res) {
} catch (err) {
// The bounty is settled to this worker, but payout failed (RPC hiccup,
// unfunded wallet). The worker can re-submit the SAME claim to retry payout
- // without re-racing — the atomic claim already locked them in as the winner.
+ // without re-racing: the atomic claim already locked them in as the winner.
return json(res, 502, {
claimed: true,
paid: false,
@@ -597,7 +597,7 @@ async function handleClaim(req, res) {
alreadyPaid: payout.alreadyPaid,
explorerUrl: `https://solscan.io/tx/${payout.payoutTx}`,
bounty: fresh,
- notice: 'You earned the bounty without ever seeing the wallet secret — it is sealed to the requester. The requester opens it with their X25519 private key.',
+ notice: 'You earned the bounty without ever seeing the wallet secret, it is sealed to the requester. The requester opens it with their X25519 private key.',
});
}
@@ -620,17 +620,17 @@ async function handleRefund(req, res) {
if (!record) return error(res, 404, 'not_found', 'no bounty with that id');
// Atomic open→refunded compare-and-set, only for EXPIRED bounties. Mutually
- // exclusive with settlement — a settled bounty can never be refunded.
+ // exclusive with settlement: a settled bounty can never be refunded.
const eligibility = await markRefundable(bountyId);
if (eligibility === 'missing') return error(res, 404, 'not_found', 'bounty disappeared');
if (eligibility === 'ineligible') {
const fresh = await getBounty(bountyId);
- const why = fresh?.status === 'settled' ? 'bounty was already won — no refund' : 'bounty has not expired yet';
+ const why = fresh?.status === 'settled' ? 'bounty was already won, no refund' : 'bounty has not expired yet';
return json(res, 409, { refunded: false, status: fresh?.status, reason: why });
}
// Refund destination is BOUND to the address recorded when the bounty was
- // funded — never a value supplied in this request. Refund is unauthenticated
+ // funded: never a value supplied in this request. Refund is unauthenticated
// (it needs only an expired bounty id, and expired ids are listed on the public
// board), so honoring a body-supplied `refundAddress` would let anyone redirect
// every expired escrow to their own wallet. A bounty funded without a refund
@@ -677,10 +677,10 @@ async function handleReveal(req, res) {
const record = await getBountyRecord(bountyId);
if (!record) return error(res, 404, 'not_found', 'no bounty with that id');
if (record.status !== 'settled' || !record.sealedSecret) {
- return json(res, 409, { revealed: false, status: record.status, reason: 'bounty is not settled yet — no sealed wallet to reveal' });
+ return json(res, 409, { revealed: false, status: record.status, reason: 'bounty is not settled yet, no sealed wallet to reveal' });
}
- // The sealed envelope is useless without the requester's X25519 PRIVATE key —
+ // The sealed envelope is useless without the requester's X25519 PRIVATE key -
// it is ECIES ciphertext addressed to `record.recipient`. Returning it to any
// caller leaks nothing: only the private-key holder can open it. The open
// happens entirely client-side (openSealed), so the operator never sees the key.
@@ -693,7 +693,7 @@ async function handleReveal(req, res) {
sealedScheme: SEALED_ENVELOPE_SCHEME,
settledAt: record.settledAt,
explorerUrl: `https://solscan.io/account/${record.winnerAddress}`,
- notice: 'Open this envelope client-side with your X25519 private key (openSealed). three.ws cannot — it never held your private key.',
+ notice: 'Open this envelope client-side with your X25519 private key (openSealed). three.ws cannot, it never held your private key.',
});
}
diff --git a/api/walk/pilot.js b/api/walk/pilot.js
index c8e45fc49..d71526df3 100644
--- a/api/walk/pilot.js
+++ b/api/walk/pilot.js
@@ -1,10 +1,10 @@
-// POST /api/walk/pilot — the "brain" for the Walk Avatar's page-piloting mode.
+// POST /api/walk/pilot: the "brain" for the Walk Avatar's page-piloting mode.
//
// The Chrome extension's content script captures a compact snapshot of the
// interactive elements on the page the user is looking at, plus the user's
// natural-language task and the history of steps taken so far. This endpoint
// asks an LLM for the SINGLE next action to take, returned as strict JSON, and
-// the content script executes it on the real page — then calls again with the
+// the content script executes it on the real page: then calls again with the
// updated snapshot. A ReAct-style observe→plan→act loop, with the model on the
// server (our keys, free-tier fallback) and the hands in the browser.
//
@@ -94,14 +94,14 @@ Rules:
- To search, "type" into the search box with "submit": true.
- NEVER type into password fields or enter credentials, payment card numbers, or secrets. If the task requires signing in or paying, use "ask" to hand control back to the user.
- Use "ask" when you genuinely need a decision or information only the user has (which of several results, confirmation of a risky/destructive/irreversible step, a value you don't know).
-- Set "done": true with action "finish" and a "summary" when the task is complete, OR when it cannot be completed — explain why in the summary.
+- Set "done": true with action "finish" and a "summary" when the task is complete, OR when it cannot be completed, explain why in the summary.
- Keep "say" under ~12 words, warm and concise. The avatar is a companion, not a robot.
- Be decisive and efficient. Avoid repeating an action that already appears in the history with the same result.`;
function buildUserPrompt(b) {
const lines = [];
lines.push(`TASK: ${b.instruction}`);
- lines.push(`PAGE: ${b.title || '(untitled)'} — ${b.url || '(unknown url)'}`);
+ lines.push(`PAGE: ${b.title || '(untitled)'}: ${b.url || '(unknown url)'}`);
lines.push(`STEP: ${b.step}`);
if (b.answer) lines.push(`USER JUST ANSWERED: ${b.answer}`);
if (b.history.length) {
@@ -112,7 +112,7 @@ function buildUserPrompt(b) {
}
lines.push('\nINTERACTIVE ELEMENTS ON THE PAGE:');
if (!b.elements.length) {
- lines.push('(none captured — consider scrolling or waiting)');
+ lines.push('(none captured: consider scrolling or waiting)');
} else {
for (const e of b.elements) {
const bits = [`[${e.ref}] <${e.tag || '?'}`];
@@ -201,12 +201,12 @@ export default wrap(async (req, res) => {
if (cors(req, res, { origins: '*', methods: 'POST,OPTIONS' })) return;
if (!method(req, res, ['POST'])) return;
- // Optional identity — only used for spend attribution + a higher rate bucket.
+ // Optional identity: only used for spend attribution + a higher rate bucket.
let userId = null;
try {
const bearer = extractBearer(req);
const user = bearer ? await authenticateBearer(bearer) : await getSessionUser(req);
- // authenticateBearer returns { userId }, getSessionUser returns { id } —
+ // authenticateBearer returns { userId }, getSessionUser returns { id } -
// read both, or an API-key caller plans anonymously and their LLM spend is
// neither attributed nor held to their daily cap.
userId = user?.userId || user?.id || user?.sub || null;
@@ -253,7 +253,7 @@ export default wrap(async (req, res) => {
// Never strand the loop: fall back to handing control to the user.
return json(res, 200, {
thought: 'planner returned an unparseable response',
- say: "I'm not sure how to proceed — could you guide me?",
+ say: "I'm not sure how to proceed: could you guide me?",
done: false,
action: { type: 'ask', question: 'I had trouble reading the page. What should I do next?' },
model: completion.model,
diff --git a/api/webhooks/solana-pay.js b/api/webhooks/solana-pay.js
index 015fb759f..9c20d7a2c 100644
--- a/api/webhooks/solana-pay.js
+++ b/api/webhooks/solana-pay.js
@@ -57,7 +57,7 @@ export default wrap(async (req, res) => {
// Solana settles by scanning the chain for the reference and ignores this. An
// EVM row has no on-chain reference to scan, so without the settlement hash the
- // confirm can only ever answer 'pending' — the same tx_hash the buyer's
+ // confirm can only ever answer 'pending': the same tx_hash the buyer's
// /confirm endpoint takes, accepted here so an EVM purchase routed through the
// webhook is not a permanently unconfirmable dead path.
const rawTxHash = body?.tx_hash ?? body?.txHash;
diff --git a/tests/traders-preview.test.js b/tests/traders-preview.test.js
index f76d0a4ca..763cf44af 100644
--- a/tests/traders-preview.test.js
+++ b/tests/traders-preview.test.js
@@ -1,4 +1,4 @@
-// Contract tests for GET /api/traders/preview — the public wallet track-record
+// Contract tests for GET /api/traders/preview: the public wallet track-record
// read behind /claim-wallet.
//
// Four defects this endpoint shipped with, each pinned below:
@@ -14,7 +14,7 @@
// reputation read filtered on network, the coin read never did.
// 3. `claimable` required a wallet_reputation row, so a wallet with thousands
// of indexed pump.fun trades rendered as "no record found" whenever the
-// rollup scorer hadn't graded it yet — which is the normal state for a
+// rollup scorer hadn't graded it yet: which is the normal state for a
// wallet the indexer just picked up.
// 4. Win/loss counted every non-positive pnl, so an untouched open bag was a
// realized loss: a sniper holding 60 fresh positions read "0 wins / 60
@@ -151,7 +151,7 @@ describe('the classifier the outage contract branches on', () => {
});
});
-describe('GET /api/traders/preview — input validation', () => {
+describe('GET /api/traders/preview: input validation', () => {
it('rejects a missing wallet with a 400 JSON error, never a stack trace', async () => {
const res = await run('/api/traders/preview');
expect(res._json.status).toBe(400);
@@ -168,7 +168,7 @@ describe('GET /api/traders/preview — input validation', () => {
});
});
-describe('GET /api/traders/preview — outage honesty', () => {
+describe('GET /api/traders/preview: outage honesty', () => {
it('propagates a connectivity failure instead of publishing an empty record', async () => {
dbQueue = [CONN_ERROR];
await expect(run(`/api/traders/preview?wallet=${WALLET}`)).rejects.toThrow(/connecting to database/);
@@ -192,7 +192,7 @@ describe('GET /api/traders/preview — outage honesty', () => {
});
});
-describe('GET /api/traders/preview — network scoping', () => {
+describe('GET /api/traders/preview: network scoping', () => {
it('scopes the coin read to the requested network, not just the reputation read', async () => {
dbQueue = [[], []];
await run(`/api/traders/preview?wallet=${WALLET}&network=devnet`);
@@ -211,7 +211,7 @@ describe('GET /api/traders/preview — network scoping', () => {
});
});
-describe('GET /api/traders/preview — claimability', () => {
+describe('GET /api/traders/preview: claimability', () => {
it('is claimable on indexed trades alone, before the rollup has graded the wallet', async () => {
dbQueue = [[], [coinRow('MintAAAA')]];
const res = await run(`/api/traders/preview?wallet=${WALLET}`);
@@ -237,7 +237,7 @@ describe('GET /api/traders/preview — claimability', () => {
});
});
-describe('GET /api/traders/preview — realized vs open accounting', () => {
+describe('GET /api/traders/preview: realized vs open accounting', () => {
// Three positions, hand-computed:
// WIN bought 1 SOL, sold 3 SOL, fully exited → closed, +2 SOL, roi +2
// LOSS bought 2 SOL, sold 1 SOL, fully exited → closed, −1 SOL, roi −0.5
diff --git a/tests/world-store.test.js b/tests/world-store.test.js
index aced16a5f..d358fa504 100644
--- a/tests/world-store.test.js
+++ b/tests/world-store.test.js
@@ -23,7 +23,7 @@ import { verifyWorldServiceToken } from '../api/_lib/world-service-auth.js';
// In-memory backend mirroring the production CAS contract exactly: an INSERT
// happens only when no row exists (regardless of ifMatch); an UPDATE commits only
-// when ifMatch is '*' or equals the stored etag — otherwise it reports no commit.
+// when ifMatch is '*' or equals the stored etag: otherwise it reports no commit.
function makeBackend() {
const rows = new Map();
const blobs = new Map();
@@ -140,7 +140,7 @@ describe('world-store: round-trip + concurrency', () => {
it('rejects a stale write with ConflictError', async () => {
const v1 = await store.saveWorld({ worldId: 'w', doc: { n: 1 }, writer: 's' });
await store.saveWorld({ worldId: 'w', doc: { n: 2 }, ifMatch: v1.etag, writer: 's' });
- // v1.etag is now stale — a second writer holding it must lose.
+ // v1.etag is now stale: a second writer holding it must lose.
await expect(
store.saveWorld({ worldId: 'w', doc: { n: 99 }, ifMatch: v1.etag, writer: 's' }),
).rejects.toBeInstanceOf(ConflictError);
@@ -216,7 +216,7 @@ describe('world-store: large-doc R2 offload', () => {
// The save permission gate (api/world/[action].js) only needs the owner column,
// so it reads metadata rather than the whole document. These lock in that the
// cheap read returns the same index values loadWorld does and never touches the
-// blob store — the regression that would silently restore an R2 GET plus a 2 MB
+// blob store: the regression that would silently restore an R2 GET plus a 2 MB
// JSON.parse on every autosave of a large build.
describe('world-store: loadWorldMeta', () => {
let backend;