Middleware Domain

Express.js middleware and client utilities for adding cryptographic authentication and micropayment gating to HTTP services. There are two distinct payment paths: @bsv/payment-express-middleware layers payment requirements on top of authenticated Express routes, while @bsv/402-pay is an independent HTTP 402 flow that can work without auth middleware.

Packages

PackagePurpose
@bsv/authFramework-neutral signed, expiry-bound, single-use wallet proofs with an injected replay store.
@bsv/auth-express-middlewareExpress middleware implementing BRC-103 peer-to-peer mutual authentication via BRC-104 HTTP transport.
@bsv/payment-express-middlewareAuthenticated legacy x-bsv-payment middleware with replay-safe payment acceptance.
@bsv/402-payIndependent BRC-121 client and server HTTP 402 flow that does not require auth middleware.