Skip to content

Add @nirium/express-x402 — x402 micropayment Express middleware (bounty #9) - #23

Open
ChuleBonga wants to merge 1 commit into
nirium-protocol:mainfrom
ChuleBonga:feat/express-x402-middleware
Open

Add @nirium/express-x402 — x402 micropayment Express middleware (bounty #9)#23
ChuleBonga wants to merge 1 commit into
nirium-protocol:mainfrom
ChuleBonga:feat/express-x402-middleware

Conversation

@ChuleBonga

Copy link
Copy Markdown

Bounty #9 — Express.js x402 Micropayment Middleware Helper ($25 USDC)

Implements the nirium.x402Serve({ price, payTo }) helper per acceptance criteria:

  1. Exposes nirium.x402Serve({ price: '0.02', payTo: STELLAR_ADDRESS }).
  2. Returns HTTP 402 Payment Required with x402 v1 requirement when no valid X-PAYMENT header.
  3. Includes Jest unit tests (7 passing).

Package: packages/express-x402 (depends only on express + types). Verifies x402 v1 headers (version, network, signed transaction presence) and gates routes.

Tests: npm i && npx jest -> 7/7 pass. tsc compiles clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant