@faremeter/fetch
v0.17.0
Published
HTTP fetch wrapper that automatically handles 402 Payment Required responses with x402 protocol
Downloads
2,109
Readme
@faremeter/fetch
HTTP fetch wrapper that automatically handles 402 Payment Required responses with the x402 protocol.
Installation
pnpm install @faremeter/fetchFeatures
- 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
API Reference
Examples
See working examples in the faremeter repository:
Related Packages
- @faremeter/rides - High-level SDK
- @faremeter/payment-solana - Solana payment handler
- @faremeter/payment-evm - EVM payment handler
- @faremeter/middleware - Server-side middleware
License
LGPL-3.0-only
