Skip to content

v0.0.19

Choose a tag to compare

@limone-eth limone-eth released this 17 Feb 18:21
· 44 commits to main since this release

What's new

x402 Payment Protocol

  • createFacilitatorClient() — client for payment verification and on-chain settlement
  • createMemoryX402SessionStore() — in-memory pay-once session store
  • encodeX402Header() / decodeX402Header() — Base64 header encoding
  • processX402Payment() — verify + settle pipeline

Middleware x402 Support

All four framework wrappers now accept an optional x402 config:

  • Express: siwaMiddleware({ x402 }) + siwaCors({ x402: true })
  • Next.js: withSiwa(handler, { x402 }) + siwaOptions({ x402: true })
  • Hono: siwaMiddleware({ x402 }) + siwaCors({ x402: true })
  • Fastify: siwaAuth({ x402 }) + siwaPlugin({ x402: true })

Pay-Once Sessions (SIWX)

  • Sessions keyed by (address, resource.url) for route isolation
  • Configurable TTL with pluggable X402SessionStore interface
  • First request requires payment; subsequent requests pass through

Types

  • X402Config, PaymentRequirements, PaymentPayload, PaymentRequired
  • X402Payment, FacilitatorClient, X402SessionStore, X402Session