cryptoiz-mcp 4.15.0 → 4.15.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.
- package/index.js +6 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprot
|
|
|
9
9
|
import { Connection, Keypair, PublicKey, Transaction, SystemProgram, VersionedTransaction, TransactionMessage } from '@solana/web3.js';
|
|
10
10
|
import bs58 from 'bs58';
|
|
11
11
|
|
|
12
|
-
var VERSION = 'v4.15.
|
|
12
|
+
var VERSION = 'v4.15.1';
|
|
13
13
|
var GATEWAY = 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-x402-gateway';
|
|
14
14
|
var RECIPIENT = 'DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX';
|
|
15
15
|
var USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
|
@@ -201,7 +201,8 @@ async function callTool(toolName, args) {
|
|
|
201
201
|
|
|
202
202
|
var amount = parseInt(paymentRequirements.maxAmountRequired || paymentRequirements.amount || '10000');
|
|
203
203
|
var displayAmount = (amount / 1000000).toFixed(4);
|
|
204
|
-
|
|
204
|
+
var hasFeePayer = paymentRequirements.extra && paymentRequirements.extra.feePayer;
|
|
205
|
+
console.error('[cryptoiz-mcp] Payment required: ' + displayAmount + ' USDC for ' + toolName + (hasFeePayer ? ' (V2 Dexter)' : ' (V1 self-pay)'));
|
|
205
206
|
|
|
206
207
|
// Step 3: Build and send payment
|
|
207
208
|
var paymentHeader = '';
|
|
@@ -230,6 +231,9 @@ async function callTool(toolName, args) {
|
|
|
230
231
|
console.error('[cryptoiz-mcp] V2 build failed: ' + e.message + ', falling back to V1');
|
|
231
232
|
useV2 = false;
|
|
232
233
|
}
|
|
234
|
+
} else {
|
|
235
|
+
// No feePayer in requirements — force V1
|
|
236
|
+
useV2 = false;
|
|
233
237
|
}
|
|
234
238
|
|
|
235
239
|
if (!useV2) {
|
package/package.json
CHANGED