cryptoiz-mcp 4.16.10 → 4.16.11

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/index.js +7 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- var VERSION = 'v4.16.10';
2
+ var VERSION = 'v4.16.11';
3
3
  var GATEWAY = 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-x402-gateway';
4
4
  var TOOL_ENDPOINTS = {
5
5
  get_whale_alpha: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-alpha-scanner',
@@ -162,13 +162,15 @@ async function callTool(toolName, args) {
162
162
  if (resp1.status !== 402) throw new Error('Server error ' + resp1.status + ': ' + (await resp1.text()).substring(0, 200));
163
163
 
164
164
  // Step 2: parse payment requirements
165
+ // FIX v4.16.11: detect V2 by extra.feePayer presence (Dexter sponsorship marker),
166
+ // not by header. Per-tool endpoints (mcp-alpha-scanner, mcp-btc-regime, etc.) only
167
+ // serve 402 in body, no payment-required header. Header check stays as fast path.
165
168
  var payReq = null;
166
- var useV2 = false;
167
169
  var prHeader = resp1.headers.get('payment-required');
168
170
  if (prHeader) {
169
171
  try {
170
172
  var arr = JSON.parse(Buffer.from(prHeader, 'base64').toString('utf8'));
171
- if (arr && arr[0]) { payReq = arr[0]; useV2 = true; }
173
+ if (arr && arr[0]) payReq = arr[0];
172
174
  } catch(_e) {}
173
175
  }
174
176
  if (!payReq) {
@@ -176,6 +178,8 @@ async function callTool(toolName, args) {
176
178
  if (b402 && b402.accepts && b402.accepts[0]) payReq = b402.accepts[0];
177
179
  }
178
180
  if (!payReq) throw new Error('No payment requirements in 402');
181
+ // V2 = Dexter sponsored gas = extra.feePayer field present (independent of transport)
182
+ var useV2 = !!(payReq.extra && payReq.extra.feePayer);
179
183
 
180
184
  var amount = parseInt(payReq.maxAmountRequired || payReq.amount || '10000');
181
185
  var hasFeePayer = payReq.extra && payReq.extra.feePayer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "4.16.10",
3
+ "version": "4.16.11",
4
4
  "description": "CryptoIZ MCP Server - Solana DEX whale intelligence via Claude Desktop with x402 USDC micropayments",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",