Context
Lens is currently an x402 resource server — a seller. src/middleware/x402.ts builds an x402ResourceServer around an HTTPFacilitatorClient pointed at https://facilitator.stellar.org, and delegates both verify and settle to it.
We are going to implement the other side of that interface: a facilitator, served from Lens.
The contract is not guesswork — it is published and typed in @x402/core:
interface FacilitatorClient {
verify(paymentPayload: PaymentPayload, paymentRequirements: PaymentRequirements): Promise<VerifyResponse>;
settle(paymentPayload: PaymentPayload, paymentRequirements: PaymentRequirements): Promise<SettleResponse>;
getSupported(): Promise<SupportedResponse>;
}
HTTPFacilitatorClient calls exactly three routes off its base URL: POST {url}/verify, POST {url}/settle, GET {url}/supported.
This issue: GET /supported
Start here because it moves no money and holds no keys — it is pure metadata, and it is the route every client hits first to decide whether we can serve them at all.
Return the payment kinds and extensions this facilitator supports, shaped as SupportedResponse from @x402/core. At minimum the exact scheme on Stellar, for both networks — the RFP requires mainnet and testnet, and Lens is already dual-network (docs/DUAL_NETWORK.md), so read the same config rather than inventing a second source of truth.
Where to look
node_modules/@x402/core/dist/cjs/**/*.d.ts — SupportedResponse, PaymentPayload, PaymentRequirements are all typed there. Read them; do not infer the shape from blog posts.
src/middleware/x402.ts — how Lens registers ExactStellarScheme today.
- The real
https://facilitator.stellar.org/supported is live. Call it and match its shape.
Acceptance criteria
Drips Wave · Complexity: Easy · 100 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
Lens is currently an x402 resource server — a seller.
src/middleware/x402.tsbuilds anx402ResourceServeraround anHTTPFacilitatorClientpointed athttps://facilitator.stellar.org, and delegates bothverifyandsettleto it.We are going to implement the other side of that interface: a facilitator, served from Lens.
The contract is not guesswork — it is published and typed in
@x402/core:HTTPFacilitatorClientcalls exactly three routes off its base URL:POST {url}/verify,POST {url}/settle,GET {url}/supported.This issue:
GET /supportedStart here because it moves no money and holds no keys — it is pure metadata, and it is the route every client hits first to decide whether we can serve them at all.
Return the payment kinds and extensions this facilitator supports, shaped as
SupportedResponsefrom@x402/core. At minimum theexactscheme on Stellar, for both networks — the RFP requires mainnet and testnet, and Lens is already dual-network (docs/DUAL_NETWORK.md), so read the same config rather than inventing a second source of truth.Where to look
node_modules/@x402/core/dist/cjs/**/*.d.ts—SupportedResponse,PaymentPayload,PaymentRequirementsare all typed there. Read them; do not infer the shape from blog posts.src/middleware/x402.ts— how Lens registersExactStellarSchemetoday.https://facilitator.stellar.org/supportedis live. Call it and match its shape.Acceptance criteria
GET /supportedreturns a validSupportedResponse, type-checked against@x402/corerather than hand-rolledfacilitator.stellar.org/supported(include the comparison in the PR)Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk