feat(x402): implement BSV x402 protocol middleware gem#194
feat(x402): implement BSV x402 protocol middleware gem#194
Conversation
Implement the bsv-x402 gem providing Rack middleware for HTTP 402 settlement-gated access using the Merkleworks x402-BSV spec v1.0. Server-side: Rack middleware with route protection, challenge generation, 9-step proof verification, nonce provider interface, challenge store. Client-side: auto-pay HTTP client, transaction builder, proof builder. Protocol: RFC 8785 canonical JSON, base64url encoding, request binding, test vector conformance (challenge-vector-001). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Security Audit Report — bsv-x402 Rack MiddlewareReviewed by: White Hat (automated offensive security review) MEDIUM FindingsM-1 — Unbounded memory growth in
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Extracted to standalone repo: https://github.com/sgbett/x402 — namespace renamed from BSV::X402 to X402. |
Summary
bsv-x402gem implementing the Merkleworks x402-BSV spec v1.0Components
Test plan
bundle exec rake) -- 2036 examples, 0 failuresbundle exec rubocop) -- 42 x402 files, no offencesCloses #97
Generated with Claude Code