@faremeter/fetch 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +42 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @faremeter/fetch
2
+
3
+ HTTP fetch wrapper that automatically handles 402 Payment Required responses with the x402 protocol.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm install @faremeter/fetch
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - Automatic 402 handling - Transparently pays and retries
14
+ - Pluggable payment handlers - Support any blockchain
15
+ - Multi-chain support - Use multiple handlers simultaneously
16
+ - Smart payer selection - Choose based on balance, cost, etc.
17
+ - Retry logic - Configurable exponential backoff
18
+ - Type-safe - Full TypeScript support
19
+
20
+ ## API Reference
21
+
22
+ <!-- TSDOC_START -->
23
+
24
+ <!-- TSDOC_END -->
25
+
26
+ ## Examples
27
+
28
+ See working examples in the [faremeter repository](https://github.com/faremeter/faremeter/tree/main/scripts):
29
+
30
+ - [Solana payment example](https://github.com/faremeter/faremeter/blob/main/scripts/solana-example/sol-payment.ts)
31
+ - [EVM payment example](https://github.com/faremeter/faremeter/blob/main/scripts/evm-example/base-sepolia-payment.ts)
32
+
33
+ ## Related Packages
34
+
35
+ - [@faremeter/rides](https://www.npmjs.com/package/@faremeter/rides) - High-level SDK
36
+ - [@faremeter/payment-solana](https://www.npmjs.com/package/@faremeter/payment-solana) - Solana payment handler
37
+ - [@faremeter/payment-evm](https://www.npmjs.com/package/@faremeter/payment-evm) - EVM payment handler
38
+ - [@faremeter/middleware](https://www.npmjs.com/package/@faremeter/middleware) - Server-side middleware
39
+
40
+ ## License
41
+
42
+ LGPL-3.0-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faremeter/fetch",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "HTTP fetch wrapper that automatically handles 402 Payment Required responses with x402 protocol",
5
5
  "keywords": [
6
6
  "faremeter",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "arktype": "2.1.21",
48
- "@faremeter/types": "^0.13.0"
48
+ "@faremeter/types": "^0.14.0"
49
49
  },
50
50
  "tap": {
51
51
  "plugin": [