x402-proxy 0.8.1 → 0.8.2

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,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.2] - 2026-03-24
11
+
12
+ ### Fixed
13
+ - JSON request bodies sent without explicit `Content-Type` header now auto-detect as `application/json` instead of defaulting to `text/plain` - fixes servers rejecting JSON bodies on payment retry
14
+
10
15
  ## [0.8.1] - 2026-03-24
11
16
 
12
17
  ### Added
@@ -214,7 +219,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
214
219
  - `appendHistory` / `readHistory` / `calcSpend` - JSONL transaction history
215
220
  - Re-exports from `@x402/fetch`, `@x402/svm`, `@x402/evm`
216
221
 
217
- [Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.8.1...HEAD
222
+ [Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.8.2...HEAD
223
+ [0.8.2]: https://github.com/cascade-protocol/x402-proxy/compare/v0.8.1...v0.8.2
218
224
  [0.8.1]: https://github.com/cascade-protocol/x402-proxy/compare/v0.8.0...v0.8.1
219
225
  [0.8.0]: https://github.com/cascade-protocol/x402-proxy/compare/v0.7.1...v0.8.0
220
226
  [0.7.1]: https://github.com/cascade-protocol/x402-proxy/compare/v0.7.0...v0.7.1
package/dist/bin/cli.js CHANGED
@@ -473,6 +473,10 @@ Examples:
473
473
  if (idx > 0) headers.set(h.slice(0, idx).trim(), h.slice(idx + 1).trim());
474
474
  }
475
475
  const method = flags.method || "GET";
476
+ if (flags.body && !headers.has("Content-Type")) {
477
+ const trimmed = flags.body.trimStart();
478
+ if (trimmed.startsWith("{") || trimmed.startsWith("[")) headers.set("Content-Type", "application/json");
479
+ }
476
480
  const init = {
477
481
  method,
478
482
  headers: Object.fromEntries(headers.entries())
@@ -839,7 +843,7 @@ Add to your MCP client config (Claude, Cursor, etc.):
839
843
  }
840
844
  const remoteClient = new Client({
841
845
  name: "x402-proxy",
842
- version: "0.8.1"
846
+ version: "0.8.2"
843
847
  });
844
848
  const x402Mcp = new x402MCPClient(remoteClient, x402PaymentClient, {
845
849
  autoPayment: true,
@@ -877,7 +881,7 @@ Add to your MCP client config (Claude, Cursor, etc.):
877
881
  }
878
882
  const localServer = new Server({
879
883
  name: "x402-proxy",
880
- version: "0.8.1"
884
+ version: "0.8.2"
881
885
  }, { capabilities: {
882
886
  tools: tools.length > 0 ? {} : void 0,
883
887
  resources: remoteResources.length > 0 ? {} : void 0
@@ -972,7 +976,7 @@ Add to your MCP client config (Claude, Cursor, etc.):
972
976
  }));
973
977
  const remoteClient = new Client({
974
978
  name: "x402-proxy",
975
- version: "0.8.1"
979
+ version: "0.8.2"
976
980
  });
977
981
  await connectTransport(remoteClient);
978
982
  const mppClient = McpClient.wrap(remoteClient, { methods: wrappedMethods });
@@ -987,7 +991,7 @@ Add to your MCP client config (Claude, Cursor, etc.):
987
991
  }
988
992
  const localServer = new Server({
989
993
  name: "x402-proxy",
990
- version: "0.8.1"
994
+ version: "0.8.2"
991
995
  }, { capabilities: {
992
996
  tools: tools.length > 0 ? {} : void 0,
993
997
  resources: remoteResources.length > 0 ? {} : void 0
@@ -1199,7 +1203,7 @@ const routes = buildRouteMap({
1199
1203
  });
1200
1204
  const app = buildApplication(routes, {
1201
1205
  name: "x402-proxy",
1202
- versionInfo: { currentVersion: "0.8.1" },
1206
+ versionInfo: { currentVersion: "0.8.2" },
1203
1207
  scanner: { caseStyle: "allow-kebab-for-camel" }
1204
1208
  });
1205
1209
 
@@ -726,7 +726,7 @@ function createWalletCommand(ctx) {
726
726
  try {
727
727
  const snap = await getWalletSnapshot(ctx.rpcUrl, walletAddress, ctx.historyPath);
728
728
  const solscanUrl = `https://solscan.io/account/${walletAddress}`;
729
- const lines = [`x402-proxy v0.8.1`];
729
+ const lines = [`x402-proxy v0.8.2`];
730
730
  const defaultModel = ctx.allModels[0];
731
731
  if (defaultModel) lines.push("", `**Model** - ${defaultModel.name} (${defaultModel.provider})`);
732
732
  lines.push("", `**[Wallet](${solscanUrl})**`, `\`${walletAddress}\``);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x402-proxy",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "curl for x402 paid APIs. Auto-pays any endpoint on Base, Solana, and Tempo. Also works as an OpenClaw plugin.",
5
5
  "type": "module",
6
6
  "sideEffects": false,