From 14fc29aa0c18e6f59948c145e7bb7d52ab056474 Mon Sep 17 00:00:00 2001 From: Eras256 <219895655+Eras256@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:17:18 -0600 Subject: [PATCH] fix(sdk): facilitatorApiKey is required on both networks, not just mainnet The runtime check two lines below the JSDoc comment throws on BOTH networks ("the facilitator rejects unauthenticated servers on testnet too"), but the comment itself said "Mainnet lo exige; testnet no." - directly contradicting the code it describes. Same false claim in the README's quickstart example comment. Build + test verified clean after the change (comment-only, but checked anyway): tsc build passes, 56 jest + 126 node:test all pass. Co-Authored-By: Claude Sonnet 5 --- packages/sdk/README.md | 2 +- packages/sdk/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 2c18ead..499a231 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -189,7 +189,7 @@ import { x402Serve } from 'nirium'; app.use('/premium', x402Serve({ payTo: 'G...', // your Stellar address - where payments land routes: { 'GET /signals': '$0.02' }, - facilitatorApiKey: '...', // required on mainnet; OpenZeppelin Channels by default + facilitatorApiKey: '...', // required on both networks; OpenZeppelin Channels by default })); ``` diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index 257b436..8a9e7e7 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1397,7 +1397,7 @@ export interface X402ServeConfig { network?: 'stellar:testnet' | 'stellar:pubnet'; /** Default: OpenZeppelin Channels, el facilitador canónico de Stellar. */ facilitatorUrl?: string; - /** Mainnet lo exige; testnet no. */ + /** Las dos redes lo exigen - el facilitador rechaza un servidor sin llave también en testnet. */ facilitatorApiKey?: string; facilitatorAuthHeader?: string; appName?: string;