agentwallet-mcp 1.12.0 → 1.12.1

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 +2 -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.0',
464
+ version: '1.12.1',
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
 
@@ -1180,7 +1180,7 @@ server.tool('pay_x402', 'Handle an x402 payment flow. Fetches a URL, and if the
1180
1180
  const wantApproval = request_approval ?? (process.env.AGENTWALLET_APPROVALS !== '0');
1181
1181
  if (approval_id) {
1182
1182
  const a = (await api(`/approvals/${encodeURIComponent(approval_id)}`, 'GET', undefined, skip));
1183
- if (a?.status !== 'approved') {
1183
+ if (a?.status !== 'approved' || Number(a.used) === 1) {
1184
1184
  return jsonResponse({ ...overCap, approval_id, approval_status: a?.status ?? null, error: `Approval ${approval_id} is ${a?.status ?? 'unknown'}, not approved.${a?.error ? ' ' + a.error : ''}` });
1185
1185
  }
1186
1186
  if (String(a.pay_to || '').toLowerCase() !== option.payTo.toLowerCase() || Number(a.chain_id) !== chainId || BigInt(String(a.value || '0')) < BigInt(rawAmount)) {
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.0",
4
+ "version": "1.12.1",
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",