HTTP fetch wrapper that automatically handles 402 Payment Required responses with the x402 protocol.
pnpm install @faremeter/fetch- Automatic 402 handling - Transparently pays and retries
- Pluggable payment handlers - Support any blockchain
- Multi-chain support - Use multiple handlers simultaneously
- Smart payer selection - Choose based on balance, cost, etc.
- Retry logic - Configurable exponential backoff
- Type-safe - Full TypeScript support
See working examples in the faremeter repository:
- @faremeter/rides - High-level SDK
- @faremeter/payment-solana - Solana payment handler
- @faremeter/payment-evm - EVM payment handler
- @faremeter/middleware - Server-side middleware
LGPL-3.0-only