x402-proxy 0.9.3 → 0.10.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.10.0] - 2026-04-01
11
+
12
+ ### Added
13
+ - `serve` command - local HTTP proxy server for paid inference endpoints, auto-detects wallet and preferred network
14
+ - `claude` command - run Claude Code through a paid local proxy with `ANTHROPIC_BASE_URL` auto-configured
15
+ - `--model` flag on `claude` command (default: `minimax/minimax-m2.7`) - sets `ANTHROPIC_CUSTOM_MODEL_OPTION` for non-Anthropic models
16
+ - MPP payment support in OpenClaw plugin - inference proxy and `x_request` tool now handle both x402 (Solana) and MPP (Tempo/Base) protocols
17
+ - `/x_send` slash command with confirmation flow (5-min TTL) for USDC transfers from the OpenClaw gateway
18
+ - Default Surf provider config - plugin works out of the box without explicit provider configuration
19
+ - `defaults.ts` module with provider config types, resolution logic, and built-in model catalog
20
+ - Dual-wallet support in OpenClaw plugin - EVM and Solana addresses resolved independently
21
+ - `addressForNetwork` and `parseMppAmount` exported as shared helpers from `tools.ts`
22
+
23
+ ### Changed
24
+ - OpenClaw plugin migrated to `definePluginEntry` SDK (from hand-rolled types)
25
+ - `x_balance` tool renamed to `x_wallet` (alias: `x_balance`)
26
+ - `x_payment` tool renamed to `x_request` (alias: `x_payment`) with x402/MPP protocol branching
27
+ - `/x_wallet` command: `send` subcommand now redirects to `/x_send`
28
+ - Inference proxy route handler renamed from `createX402RouteHandler` to `createInferenceProxyRouteHandler`
29
+ - SSE token tracking deduplicated into `createSseTracker()` helper shared by x402 and MPP paths
30
+ - Replaced hardcoded `"eip155:4217"` with imported `TEMPO_NETWORK` constant
31
+ - `serve` and `claude` commands handle their own SIGINT/SIGTERM (CLI entry point skips default handler for them)
32
+ - Wallet loading in plugin uses proper promise dedup (`walletLoadPromise`) instead of boolean flag
33
+ - Providers sorted once in route handler closure instead of per-request
34
+
35
+ ### Fixed
36
+ - `preferredNetwork === "undefined"` string comparison in serve command replaced with proper `preferredNetwork || undefined` check
37
+
38
+ ## [0.9.4] - 2026-03-27
39
+
40
+ ### Fixed
41
+ - All example URLs migrated from legacy individual service subdomains (`twitter.surf.cascade.fyi`, `web.surf.cascade.fyi`, `inference.surf.cascade.fyi`) to unified `surf.cascade.fyi/api/v1/` endpoints across CLI help text, README, SKILL.md, and OpenClaw plugin docs
42
+
10
43
  ## [0.9.3] - 2026-03-26
11
44
 
12
45
  ### Fixed
@@ -295,7 +328,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
295
328
  - `appendHistory` / `readHistory` / `calcSpend` - JSONL transaction history
296
329
  - Re-exports from `@x402/fetch`, `@x402/svm`, `@x402/evm`
297
330
 
298
- [Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.3...HEAD
331
+ [Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.0...HEAD
332
+ [0.10.0]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.4...v0.10.0
333
+ [0.9.4]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.3...v0.9.4
299
334
  [0.9.3]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.2...v0.9.3
300
335
  [0.9.2]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.1...v0.9.2
301
336
  [0.9.1]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.0...v0.9.1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ## Quick Start
6
6
 
7
7
  ```bash
8
- npx x402-proxy https://twitter.surf.cascade.fyi/users/cascade_fyi
8
+ npx x402-proxy -X POST -d '{"ref":"CoinbaseDev"}' https://surf.cascade.fyi/api/v1/twitter/user
9
9
  ```
10
10
 
11
11
  That's it. The endpoint returns 402, x402-proxy pays and streams the response.
@@ -52,14 +52,14 @@ openclaw mcp set surf '{"command":"npx","args":["-y","x402-proxy","mcp","https:/
52
52
  Works like curl. Response body streams to stdout, payment info goes to stderr.
53
53
 
54
54
  ```bash
55
- # GET request
56
- $ npx x402-proxy https://twitter.surf.cascade.fyi/users/cascade_fyi
55
+ # POST request
56
+ $ npx x402-proxy -X POST -d '{"ref":"CoinbaseDev"}' https://surf.cascade.fyi/api/v1/twitter/user
57
57
 
58
58
  # POST with body and headers (curl-style short flags: -X, -H, -d)
59
59
  $ npx x402-proxy -X POST \
60
60
  -H "Content-Type: application/json" \
61
61
  -d '{"url":"https://x402.org"}' \
62
- https://web.surf.cascade.fyi/v1/crawl
62
+ https://surf.cascade.fyi/api/v1/web/crawl
63
63
 
64
64
  # Force a specific network
65
65
  $ npx x402-proxy --network base https://api.example.com/data
@@ -71,7 +71,7 @@ $ npx x402-proxy --verbose https://api.example.com/data
71
71
  $ npx x402-proxy --protocol mpp \
72
72
  -X POST -H "Content-Type: application/json" \
73
73
  -d '{"model":"minimax/minimax-m2.5","stream":true,"messages":[{"role":"user","content":"Hello"}]}' \
74
- https://inference.surf.cascade.fyi/v1/chat/completions
74
+ https://surf.cascade.fyi/api/v1/inference/v1/chat/completions
75
75
 
76
76
  # Pipe-safe
77
77
  $ npx x402-proxy https://api.example.com/data | jq '.results'
@@ -81,6 +81,8 @@ $ npx x402-proxy https://api.example.com/data | jq '.results'
81
81
 
82
82
  ```bash
83
83
  $ npx x402-proxy <url> # paid HTTP request (default command)
84
+ $ npx x402-proxy serve # local paid inference proxy server
85
+ $ npx x402-proxy claude # run Claude Code through a paid local proxy
84
86
  $ npx x402-proxy mcp <url> # MCP stdio proxy for agents
85
87
  $ npx x402-proxy mcp add <name> <url> # install MCP server into your AI client
86
88
  $ npx x402-proxy setup # onboarding wizard
@@ -141,9 +143,11 @@ See the [library API docs](https://github.com/cascade-protocol/x402-proxy/tree/m
141
143
 
142
144
  ## OpenClaw Plugin
143
145
 
144
- x402-proxy ships as an [OpenClaw](https://openclaw.dev) plugin, giving your gateway automatic x402 payment capabilities. Registers `x_balance` and `x_payment` tools, `/x_wallet` command, and an HTTP route proxy for upstream x402 endpoints.
146
+ x402-proxy ships as an [OpenClaw](https://openclaw.dev) plugin, giving your gateway automatic x402 and MPP payment capabilities. Registers `x_wallet` and `x_request` tools (aliased as `x_balance`/`x_payment`), `/x_wallet` and `/x_send` commands, and an HTTP route proxy for upstream inference endpoints.
145
147
 
146
- Configure providers and models in OpenClaw plugin settings. Uses the standard wallet resolution (env vars or `wallet.json`).
148
+ By default, the plugin registers a built-in `surf` provider at `/x402-proxy/v1` that points at `https://surf.cascade.fyi/api/v1/inference` and prefers MPP. Uses the standard wallet resolution (env vars or `wallet.json`).
149
+
150
+ For MPP-backed inference, make sure the wallet source includes an EVM key as well as Solana. `npx x402-proxy setup` does this automatically.
147
151
 
148
152
  ## License
149
153