You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Seller side helpers so a resource server can declare discovery metadata correctly, including per parameter descriptions that make an endpoint legible to an agent, with minimal boilerplate."
And from §3.6, the UX bar:
"A developer should get from docs to a paid, discoverable endpoint appearing in the Bazaar in well under an hour."
Why per-parameter descriptions matter more than they sound
The buyer is software. An agent choosing between two price feeds cannot open your docs — it has only what the listing declares. An endpoint described as GET /price/:assetA/:assetB is nearly useless to it; one that declares what assetA accepts, what the response contains, and what it costs is selectable. Metadata quality is what ranking in #129 has to rank on — poor descriptions cap search quality no matter how good the retrieval is.
Scope
Helpers a resource server can use to declare discovery metadata with minimal ceremony:
Declare a resource, its parameters with descriptions, its pricing and its network
Validate locally, before anything is sent, so a seller finds out their metadata is malformed at development time rather than from an EXTENSION-RESPONSES header in production
Cover both HTTP endpoints and MCP tools
Dogfood it
Lens is itself an x402 seller — src/middleware/x402.ts gates /price, /pools, /candles, /ws. Use these helpers to make Lens's own endpoints discoverable. If declaring metadata for our own price feed is awkward, it will be awkward for everyone else, and we will find that out before shipping rather than after. That also makes Lens the first listing in its own Bazaar, which is a reasonable demo in its own right.
Acceptance criteria
A resource server can declare a discoverable, priced endpoint in a few lines
Per-parameter descriptions are first-class, not an afterthought
Local validation catches malformed metadata before it is sent
Both HTTP and MCP resource types supported
Lens's own gated routes are declared using it, and appear in the catalog
A developer following the README gets from nothing to a listed endpoint in well under an hour — say in the PR how long it actually took someone who had not seen it before
Drips Wave · Complexity: Medium · 150 points
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Context
From §3.2 of the RFP:
And from §3.6, the UX bar:
Why per-parameter descriptions matter more than they sound
The buyer is software. An agent choosing between two price feeds cannot open your docs — it has only what the listing declares. An endpoint described as
GET /price/:assetA/:assetBis nearly useless to it; one that declares whatassetAaccepts, what the response contains, and what it costs is selectable. Metadata quality is what ranking in #129 has to rank on — poor descriptions cap search quality no matter how good the retrieval is.Scope
Helpers a resource server can use to declare discovery metadata with minimal ceremony:
EXTENSION-RESPONSESheader in productionDogfood it
Lens is itself an x402 seller —
src/middleware/x402.tsgates/price,/pools,/candles,/ws. Use these helpers to make Lens's own endpoints discoverable. If declaring metadata for our own price feed is awkward, it will be awkward for everyone else, and we will find that out before shipping rather than after. That also makes Lens the first listing in its own Bazaar, which is a reasonable demo in its own right.Acceptance criteria
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk