Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2f90047
Accept MPP method tempo (push mode) when MPP_TEMPO_RECIPIENT is set
claude Oct 4, 2026
6ada795
Clearer /api/explain description for agents
claude Oct 5, 2026
e2c21e4
Merge remote branch (already merged history)
claude Oct 5, 2026
57e398c
Add glama.json to claim the Glama listing
claude Oct 5, 2026
88577ee
Merge remote branch (already merged history)
claude Oct 5, 2026
2eeeeec
MCP registry: clearer description (says when an agent would use it)
claude Oct 5, 2026
ce242d7
Merge remote branch (already merged history)
claude Oct 5, 2026
71f6a3e
Homepage: a row of prices right under the intro
claude Oct 6, 2026
fd7ae48
Merge remote branch (already merged history)
claude Oct 6, 2026
193799b
Usage log: record the network a refused payment was tried on
claude Oct 6, 2026
2d888e4
Merge branch 'claude/x402-agents-solana-payments-nceg9b' of https://g…
claude Oct 6, 2026
322505c
Pay in RLUSD on the XRP Ledger (x402 exact, xrpl:0)
claude Oct 7, 2026
aa35a9d
Merge branch 'claude/x402-agents-solana-payments-nceg9b' of https://g…
claude Oct 7, 2026
633f050
XRPL: also accept payers built on t54's SDK
claude Oct 7, 2026
3033055
Merge remote-tracking branch 'origin/main' into claude/x402-agents-so…
claude Oct 7, 2026
fdab3b3
SEO: canonical tag, robots.txt and sitemap.xml for the homepage
claude Oct 7, 2026
0027283
Merge branch 'claude/x402-agents-solana-payments-nceg9b' of https://g…
claude Oct 7, 2026
823b132
CI: run the tests on every pull request and on main
claude Oct 7, 2026
60e2caa
Merge branch 'claude/x402-agents-solana-payments-nceg9b' of https://g…
claude Oct 7, 2026
d81e01e
Usage log: record why an MPP credential was refused
claude Oct 7, 2026
7a491d3
Merge branch 'claude/x402-agents-solana-payments-nceg9b' of https://g…
claude Oct 7, 2026
84c2f4e
Pay in USDC on Algorand (ALGORAND_PAY_TO)
claude Oct 8, 2026
a6cec2a
Merge remote branch
claude Oct 8, 2026
aa499c8
Name the seller in the 402: x402-merchant extension
claude Oct 9, 2026
7ec7ce1
Merge remote branch (already in main)
claude Oct 9, 2026
9c7b5d0
MCP: output schemas and structured content on every tool
claude Oct 9, 2026
3fdf50f
Merge remote branch (already in main)
claude Oct 9, 2026
80dd8e2
Merge stale remote branch claude/x402-agents-solana-payments-nceg9b
claude Oct 13, 2026
725218e
Discovery: a name and description per resource in /.well-known/x402
claude Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const { describePlainTextCall } = require('./usage');
const { trustProxyHops } = require('./proxy');
const { onPublicHost } = require('./public-host');
const { createMppPay, unlessMppPaid, addMppOffers } = require('./mpp-pay');
const { wellKnown } = require('./well-known');

const app = express();
const PORT = process.env.PORT || 3000;
Expand Down Expand Up @@ -706,26 +707,7 @@ app.all('/mcp', async (req, res) => {
// x402scan and similar indexers read {version: 1, resources: [url, ...]};
// methods, prices and schemas come from /openapi.json (x-payment-info).
const PUBLIC_ORIGIN = 'https://plaintext.fizzl.eu';
const X402_WELL_KNOWN_MANIFEST = {
version: 1,
resources: [`${PUBLIC_ORIGIN}/api/check-wallet`, `${PUBLIC_ORIGIN}/api/explain`],
x402Version: 2,
kind: 'resource-server',
name: 'PlainText — wallet approval translator',
serviceName: 'PlainText',
category: 'security',
iconUrl: `${PUBLIC_ORIGIN}/icon.png`,
tags: ['wallet-security', 'approvals', 'crypto', 'explainer'],
description: "Checks a wallet's token/NFT approvals via GoPlus and explains risk in plain language.",
endpoints: [
{ url: `${PUBLIC_ORIGIN}/api/check-wallet`, method: 'POST', description: 'Explain wallet token approvals in plain language' },
{ url: `${PUBLIC_ORIGIN}/api/explain`, method: 'POST', description: 'What would signing this allow? A SAFE, CAUTION or RISK verdict with a plain-language explanation of a pasted approval, transaction or signature' }
],
openapi: `${PUBLIC_ORIGIN}/openapi.json`,
docs: `${PUBLIC_ORIGIN}/openapi.json`,
contact: 'Fizzl13@protonmail.com',
updated: '2026-09-23T00:00:00Z'
};
const X402_WELL_KNOWN_MANIFEST = wellKnown(PUBLIC_ORIGIN);

// Instructions an AI agent can read and follow ("Connect to plaintext.fizzl.eu/skill.md").
app.get('/skill.md', (_req, res) => res.set('cache-control', 'public, max-age=300').type('text/markdown; charset=utf-8').sendFile(path.join(__dirname, 'public', 'skill.md')));
Expand Down
19 changes: 19 additions & 0 deletions test/well-known.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// /.well-known/x402 (well-known.js): the paid resources as { url, method, name, description }, as the XRPL AI Hub
// reads them, and the endpoints list for existing readers.
const test = require('node:test');
const assert = require('node:assert/strict');
const { wellKnown } = require('../well-known');

test('/.well-known/x402: each paid resource with a short name and a one-line description', () => {
const doc = wellKnown('https://plaintext.fizzl.eu');
assert.equal(doc.version, 1);
assert.equal(doc.name, 'PlainText — wallet approval translator');
assert.deepEqual(doc.resources.map((r) => [r.url, r.method]), [['https://plaintext.fizzl.eu/api/check-wallet', 'POST'], ['https://plaintext.fizzl.eu/api/explain', 'POST']]);
assert.equal(new Set(doc.resources.map((r) => r.name)).size, doc.resources.length, 'names are unique');
for (const r of doc.resources) {
assert.ok(r.name.length > 0 && r.name.length <= 40, r.url);
assert.ok(r.description.length >= 40 && r.description.length <= 200, r.url);
}
assert.deepEqual(doc.endpoints.map((e) => e.url), doc.resources.map((r) => r.url), 'the endpoints list stays');
assert.match(doc.description, /XRP Ledger/);
});
30 changes: 30 additions & 0 deletions well-known.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// /.well-known/x402: the paid resources on this origin, for x402 indexers. Each resource carries a short name and a
// one-line description: the XRPL AI Hub (xrpl-ai.org) lists each resource by those (without them it shows the long
// 402 text). The endpoints list stays for existing readers.
function wellKnown(origin) {
return {
version: 1,
resources: [
{ url: `${origin}/api/check-wallet`, method: 'POST', name: 'Wallet approval check', description: "A wallet's open token and NFT approvals (via GoPlus), with a SAFE, CAUTION or RISK verdict explained in plain language." },
{ url: `${origin}/api/explain`, method: 'POST', name: 'Signature explainer', description: 'What would signing this allow? A SAFE, CAUTION or RISK verdict and a plain-language explanation of a pasted approval, transaction or signature.' },
],
x402Version: 2,
kind: 'resource-server',
name: 'PlainText — wallet approval translator',
serviceName: 'PlainText',
category: 'security',
iconUrl: `${origin}/icon.png`,
tags: ['wallet-security', 'approvals', 'crypto', 'explainer'],
description: "Checks a wallet's token/NFT approvals via GoPlus and explains risk in plain language. Pay in USDC on Base, Solana or Algorand, or RLUSD on the XRP Ledger.",
endpoints: [
{ url: `${origin}/api/check-wallet`, method: 'POST', description: 'Explain wallet token approvals in plain language' },
{ url: `${origin}/api/explain`, method: 'POST', description: 'What would signing this allow? A SAFE, CAUTION or RISK verdict with a plain-language explanation of a pasted approval, transaction or signature' },
],
openapi: `${origin}/openapi.json`,
docs: `${origin}/openapi.json`,
contact: 'Fizzl13@protonmail.com',
updated: '2026-10-13T00:00:00Z',
};
}

module.exports = { wellKnown };
Loading