agentwallet-mcp 1.12.1 → 1.12.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.
Files changed (2) hide show
  1. package/build/index.js +5 -2
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -461,7 +461,7 @@ function resolveChainId(network) {
461
461
  const AddressSchema = z.string().regex(/^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/, 'Must be a 0x-prefixed 40-hex EVM address or a base58 Solana address');
462
462
  const server = new McpServer({
463
463
  name: 'agentwallet',
464
- version: '1.12.1',
464
+ version: '1.12.2',
465
465
  }, {
466
466
  instructions: `AgentWallet gives AI agents their own blockchain wallets. Private keys are encrypted server-side and never exposed — agents sign and broadcast transactions without ever touching raw keys.
467
467
 
@@ -1310,7 +1310,10 @@ server.tool('pay_x402', 'Handle an x402 payment flow. Fetches a URL, and if the
1310
1310
  return jsonResponse({
1311
1311
  status: retryRes.status,
1312
1312
  payment_required: true,
1313
- payment_made: retryRes.status !== 402,
1313
+ // Paid means the endpoint accepted the payment: a settlement receipt, or a success status after the payment header.
1314
+ // A 4xx other than 402 (bad body, auth) means the request failed for another reason; the authorization was
1315
+ // sent but the facilitator normally does not settle a failed request, so it is not reported as paid.
1316
+ payment_made: Boolean(settlement?.success) || (retryRes.status >= 200 && retryRes.status < 300),
1314
1317
  retry_error: retryError,
1315
1318
  payment_method: isUpto ? 'permit2-upto-authorization' : (standardExact ? 'eip3009-authorization' : 'onchain-transfer'),
1316
1319
  approval_id: approvalUsed,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentwallet-mcp",
3
3
  "mcpName": "io.github.hifriendbot/agentwallet",
4
- "version": "1.12.1",
4
+ "version": "1.12.2",
5
5
  "description": "MCP server for AgentWallet: self-custody local signing on EVM and Solana, or hosted wallets. Sign, broadcast, pay x402 invoices, and accept x402 payments.",
6
6
  "type": "module",
7
7
  "main": "build/index.js",