Skip to content

v0.8.0

Choose a tag to compare

@modulout modulout released this 02 Oct 16:33
· 55 commits to main since this release

Added

  • @p2flux/sdk/paywall — charge AI agents for a route over x402 without an x402 library:
    createPaywall({ apiUrl, recipient, price }) with express() middleware, wrap() for Fetch-API
    handlers, and the framework-neutral guard(). Pay-per-request and prepaid balance; the payment is
    settled before the handler runs and serves one response. A separate entry point: the main client
    is unchanged and byte-identical.
  • Usage pricing — paywall.usage({ url, paymentHeader, maxPrice }, work): the agent signs for at
    most maxPrice (x402 upto), you charge what the request cost.
  • Requests signed as bots (Web Bot Auth) count as agents under agentsOnly; an agent's prepaid
    refund request is answered with its receipt.