@x402-stellar-bazaar/seller
v0.1.0
Published
Seller helpers: discoverableRoute() makes an Express route paid and Bazaar-discoverable in one call, with startup validation. Ships the x402-stellar-bazaar-validate CLI.
Maintainers
Readme
@x402-stellar-bazaar/seller
Make an Express route paid and discoverable in one call:
import { discoverableRoute } from "@x402-stellar-bazaar/seller";
routes["GET /forecast"] = discoverableRoute({
payTo: "G…YOU",
network: "stellar:testnet",
price: { asset: USDC, amount: "100000" }, // 0.01 / call
description: "7-day forecast for any city",
params: { city: { description: "City to forecast" } },
});Mistakes fail at startup with actionable messages (a parameter without a description, a 34-character service name…). Also ships a CLI that walks your live 402 and reports exactly what a facilitator will catalog, soft-drop, or reject:
npx x402-stellar-bazaar-validate https://api.yours.dev/forecastDocs: https://stellar-bazaar.netlify.app/docs/#sellers
