x402-proxy 0.9.4 → 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 +30 -1
- package/README.md +7 -3
- package/dist/bin/cli.js +1067 -156
- package/dist/openclaw/plugin.d.ts +12 -56
- package/dist/openclaw/plugin.js +946 -196
- package/dist/openclaw.plugin.json +69 -4
- package/dist/{setup-Dp5fS7ob.js → setup-DtKrojW1.js} +1 -1
- package/dist/setup-EX1_teNg.js +3 -0
- package/dist/{status-BZTToWE_.js → status-Bp3X6QEg.js} +2 -2
- package/dist/status-DKNWF6WB.js +3 -0
- package/dist/wallet-Cty0AnYk.js +3 -0
- package/dist/{wallet-CqUc-ZFn.js → wallet-DY0t1t16.js} +6 -3
- package/openclaw.plugin.json +69 -4
- package/package.json +13 -2
- package/skills/SKILL.md +3 -1
- package/skills/references/openclaw-plugin.md +21 -11
- package/dist/setup-B6xRV8Ue.js +0 -3
- package/dist/status-Bj3U-W2M.js +0 -3
- package/dist/wallet-4C9EL4Iv.js +0 -3
- /package/dist/{derive-EDXzwKW2.js → derive-CY0En_Y3.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ 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
|
+
|
|
10
38
|
## [0.9.4] - 2026-03-27
|
|
11
39
|
|
|
12
40
|
### Fixed
|
|
@@ -300,7 +328,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
300
328
|
- `appendHistory` / `readHistory` / `calcSpend` - JSONL transaction history
|
|
301
329
|
- Re-exports from `@x402/fetch`, `@x402/svm`, `@x402/evm`
|
|
302
330
|
|
|
303
|
-
[Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.
|
|
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
|
|
304
333
|
[0.9.4]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.3...v0.9.4
|
|
305
334
|
[0.9.3]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.2...v0.9.3
|
|
306
335
|
[0.9.2]: https://github.com/cascade-protocol/x402-proxy/compare/v0.9.1...v0.9.2
|
package/README.md
CHANGED
|
@@ -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://surf.cascade.fyi/api/v1/inference/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 `
|
|
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
|
-
|
|
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
|
|