cryptoiz-mcp 4.16.11 → 4.16.12

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 +22 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,14 +1,17 @@
1
1
  'use strict';
2
- var VERSION = 'v4.16.11';
2
+ var VERSION = 'v4.16.12';
3
3
  var GATEWAY = 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-x402-gateway';
4
+ // FIX v4.16.12: route ALL paid tools to gateway. Per-tool endpoints (mcp-alpha-scanner etc.)
5
+ // have stale hardcoded fee payer that breaks after Dexter key rotation. Gateway has dynamic
6
+ // fee payer fetched from /supported. Single source of truth = no per-tool drift.
4
7
  var TOOL_ENDPOINTS = {
5
- get_whale_alpha: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-alpha-scanner',
6
- get_whale_divergence: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-divergence',
7
- get_whale_accumulation: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-accumulation',
8
- get_whale_neutral: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-neutral',
9
- get_whale_distribution: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-distribution',
10
- get_btc_regime: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-btc-regime',
11
- get_btc_futures_signal: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-btc-futures',
8
+ get_whale_alpha: GATEWAY,
9
+ get_whale_divergence: GATEWAY,
10
+ get_whale_accumulation: GATEWAY,
11
+ get_whale_neutral: GATEWAY,
12
+ get_whale_distribution: GATEWAY,
13
+ get_btc_regime: GATEWAY,
14
+ get_btc_futures_signal: GATEWAY,
12
15
  get_token_ca: GATEWAY,
13
16
  get_status: GATEWAY,
14
17
  };
@@ -93,18 +96,25 @@ async function buildV2PaymentPayload(amount, feePayerAddr) {
93
96
  transferData.writeUInt32LE(Math.floor(amount / 0x100000000) & 0xFFFFFFFF, 5);
94
97
  transferData[9] = 6;
95
98
  var transferIx = { programId: tokenProgramPk, keys: transferKeys, data: transferData };
96
- // FIX v4.16.10: NO Memo instruction in V2 Dexter scheme_exact_svm whitelist
97
- // only allows ComputeBudget + SPL Token + Lighthouse. Memo would be rejected.
99
+ // FIX v4.16.12: RESTORE Memo instruction in V2 (4-ix tx: Limit+Price+TransferChecked+Memo).
100
+ // Empirical: April 6-8 logs prove V2 with memo accepted by Dexter. Removing memo (v4.16.10)
101
+ // didn't fix anything — the actual bug was Dexter key rotation, fixed in gateway v44.
102
+ // Memo also makes TX visible to x402scan (memo carries x402 nonce marker).
103
+ var memoProgramPk = new PublicKey(MEMO_PROGRAM);
104
+ var nonceBytes = new Uint8Array(16);
105
+ for (var i = 0; i < 16; i++) nonceBytes[i] = Math.floor(Math.random() * 256);
106
+ var nonceHex = Array.from(nonceBytes).map(function(b) { return b.toString(16).padStart(2,'0'); }).join('');
107
+ var memoIx = { programId: memoProgramPk, keys: [], data: Buffer.from('x402:v2:' + nonceHex, 'utf8') };
98
108
  var bh = await conn.getLatestBlockhash('confirmed');
99
109
  var message = new TransactionMessage({
100
110
  payerKey: feePayerPk,
101
111
  recentBlockhash: bh.blockhash,
102
- instructions: [setLimitIx, setPriceIx, transferIx],
112
+ instructions: [setLimitIx, setPriceIx, transferIx, memoIx],
103
113
  }).compileToV0Message();
104
114
  var vtx = new VersionedTransaction(message);
105
115
  vtx.sign([kp]);
106
116
  var txB64 = Buffer.from(vtx.serialize()).toString('base64');
107
- console.error('[cryptoiz-mcp] V2 tx built (Dexter gas-sponsored), 3 ix: limit+price+transferChecked');
117
+ console.error('[cryptoiz-mcp] V2 tx built (Dexter gas-sponsored), 4 ix: limit+price+transferChecked+memo');
108
118
  return txB64;
109
119
  }
110
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "4.16.11",
3
+ "version": "4.16.12",
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",