Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

@faremeter/fetch

HTTP fetch wrapper that automatically handles 402 Payment Required responses with the x402 protocol.

Installation

pnpm install @faremeter/fetch

Features

  • 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

License

LGPL-3.0-only