@x402r/helpers
v0.0.2
Published
Server-side helpers for x402r refundable payments
Readme
@x402r/helpers
Server-side helpers for x402r refundable payments. Drop-in route helpers for Express, Hono, and other frameworks.
Install
npm install @x402r/helpersUsage
import { refundable } from "@x402r/helpers";
// Express example — protect a route with refundable payments
app.get(
"/api/weather",
refundable("$0.01", {
operatorAddress: "0x...",
refundExpirySeconds: 3600,
}),
(req, res) => {
res.json({ weather: "sunny" });
},
);Links
License
Apache-2.0
