Skip to content

railpay-python v0.4.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 20:23
· 6 commits to main since this release
  • Paywall: charge USDG for your own API. It returns the 402, checks the EIP-3009 authorization (recipient, amount, validity window, EIP-712 signature, then the payer's balance and the nonce on-chain), settles it through keyless x402 facilitators (Toll, then Primer) that pay the gas, and reports the request as paid only after the exact USDG transfer is in the receipt. A transfer that is not confirmed yet answers settlement_pending.
  • charge(url, headers) and handle(url, headers, serve) work with any framework.
  • PaymentStore protocol and MemoryStore: one payment unlocks one response. Pass a shared store with an atomic claim() when you run more than one instance.
  • Signatures are recovered the same way the TypeScript SDK (viem) makes them, checked against a cross-implementation test vector.
  • New runtime dependencies: eth-account, eth-utils and anyio.