@quackai/q402-mcp 0.7.4 → 0.7.6
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/dist/index.js +79 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -211,7 +211,7 @@ var isValidPrivateKey = (s) => typeof s === "string" && PRIVATE_KEY_RE.test(s);
|
|
|
211
211
|
|
|
212
212
|
// src/version.ts
|
|
213
213
|
var PACKAGE_NAME = "@quackai/q402-mcp";
|
|
214
|
-
var PACKAGE_VERSION = "0.7.
|
|
214
|
+
var PACKAGE_VERSION = "0.7.6";
|
|
215
215
|
|
|
216
216
|
// src/tools/quote.ts
|
|
217
217
|
import { z } from "zod";
|
|
@@ -1193,6 +1193,10 @@ var PAY_TOOL = {
|
|
|
1193
1193
|
enum: ["eoa", "agentic-local", "agentic-server"],
|
|
1194
1194
|
description: `Which wallet to spend from. "eoa" = user's real MetaMask EOA (Q402_PRIVATE_KEY). "agentic-local" = Agent Wallet exported key (Q402_AGENTIC_PRIVATE_KEY). "agentic-server" = server-managed Agent Wallet (Q402 holds the key; only the apiKey is needed). When MULTIPLE wallets are configured the tool refuses without this arg and returns ambiguousWalletChoice for the user to pick.`
|
|
1195
1195
|
},
|
|
1196
|
+
walletId: {
|
|
1197
|
+
type: "string",
|
|
1198
|
+
description: `Server-managed Agent Wallet only (walletMode="agentic-server"). Lowercased Agent Wallet address selecting which of the user's wallets to spend from when they hold more than one (max 10 per owner). Omit to use the user's default wallet. Ignored for the other walletMode values since those modes carry their own signing key.`
|
|
1199
|
+
},
|
|
1196
1200
|
confirm: {
|
|
1197
1201
|
type: "boolean",
|
|
1198
1202
|
const: true,
|
|
@@ -1350,7 +1354,8 @@ async function runBatchPay(input) {
|
|
|
1350
1354
|
} catch {
|
|
1351
1355
|
}
|
|
1352
1356
|
}
|
|
1353
|
-
const
|
|
1357
|
+
const rawScopeRequest = input.keyScope ?? "auto";
|
|
1358
|
+
const scopeRequest = effectiveMode === "agentic-server" && rawScopeRequest === "auto" ? "multichain" : rawScopeRequest;
|
|
1354
1359
|
if (scopeRequest === "trial" && input.recipients.length > RECIPIENT_LIMIT_TRIAL) {
|
|
1355
1360
|
guardsApplied.push("trial_cap_exceeded");
|
|
1356
1361
|
return {
|
|
@@ -2811,6 +2816,16 @@ async function runRecurringList(input = {}) {
|
|
|
2811
2816
|
setupHint: "No live Q402 API key configured. Run q402_doctor to set one up, or open the dashboard to create rules from the UI."
|
|
2812
2817
|
};
|
|
2813
2818
|
}
|
|
2819
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
2820
|
+
return {
|
|
2821
|
+
configured: false,
|
|
2822
|
+
walletId: null,
|
|
2823
|
+
rules: [],
|
|
2824
|
+
count: 0,
|
|
2825
|
+
dashboardUrl,
|
|
2826
|
+
setupHint: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't see recurring rules. Activate a paid plan at https://q402.quackai.ai/payment."
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2814
2829
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
2815
2830
|
try {
|
|
2816
2831
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -2947,6 +2962,16 @@ async function runRecurringCreate(input) {
|
|
|
2947
2962
|
dashboardUrl
|
|
2948
2963
|
};
|
|
2949
2964
|
}
|
|
2965
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
2966
|
+
return {
|
|
2967
|
+
ok: false,
|
|
2968
|
+
walletId: null,
|
|
2969
|
+
rule: null,
|
|
2970
|
+
error: "MULTICHAIN_KEY_REQUIRED",
|
|
2971
|
+
message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't schedule recurring rules. Activate a paid plan at https://q402.quackai.ai/payment.",
|
|
2972
|
+
dashboardUrl
|
|
2973
|
+
};
|
|
2974
|
+
}
|
|
2950
2975
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
2951
2976
|
try {
|
|
2952
2977
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -3036,6 +3061,16 @@ async function runRecurringCancel(input) {
|
|
|
3036
3061
|
dashboardUrl
|
|
3037
3062
|
};
|
|
3038
3063
|
}
|
|
3064
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
3065
|
+
return {
|
|
3066
|
+
ok: false,
|
|
3067
|
+
walletId: null,
|
|
3068
|
+
rule: null,
|
|
3069
|
+
error: "MULTICHAIN_KEY_REQUIRED",
|
|
3070
|
+
message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
|
|
3071
|
+
dashboardUrl
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3039
3074
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
3040
3075
|
try {
|
|
3041
3076
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -3128,6 +3163,18 @@ async function runRecurringFires(input) {
|
|
|
3128
3163
|
setupHint: "No live Q402 API key configured. Run q402_doctor to set one up, or open the dashboard to view fire history from the UI."
|
|
3129
3164
|
};
|
|
3130
3165
|
}
|
|
3166
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
3167
|
+
return {
|
|
3168
|
+
configured: false,
|
|
3169
|
+
walletId: null,
|
|
3170
|
+
ruleId: input.ruleId,
|
|
3171
|
+
rule: null,
|
|
3172
|
+
fires: [],
|
|
3173
|
+
count: 0,
|
|
3174
|
+
dashboardUrl,
|
|
3175
|
+
setupHint: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't see fire history. Activate a paid plan at https://q402.quackai.ai/payment."
|
|
3176
|
+
};
|
|
3177
|
+
}
|
|
3131
3178
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
3132
3179
|
try {
|
|
3133
3180
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -3221,6 +3268,16 @@ async function runRecurringPause(input) {
|
|
|
3221
3268
|
dashboardUrl
|
|
3222
3269
|
};
|
|
3223
3270
|
}
|
|
3271
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
3272
|
+
return {
|
|
3273
|
+
ok: false,
|
|
3274
|
+
walletId: null,
|
|
3275
|
+
rule: null,
|
|
3276
|
+
error: "MULTICHAIN_KEY_REQUIRED",
|
|
3277
|
+
message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
|
|
3278
|
+
dashboardUrl
|
|
3279
|
+
};
|
|
3280
|
+
}
|
|
3224
3281
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
3225
3282
|
try {
|
|
3226
3283
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -3304,6 +3361,16 @@ async function runRecurringResume(input) {
|
|
|
3304
3361
|
dashboardUrl
|
|
3305
3362
|
};
|
|
3306
3363
|
}
|
|
3364
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
3365
|
+
return {
|
|
3366
|
+
ok: false,
|
|
3367
|
+
walletId: null,
|
|
3368
|
+
rule: null,
|
|
3369
|
+
error: "MULTICHAIN_KEY_REQUIRED",
|
|
3370
|
+
message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
|
|
3371
|
+
dashboardUrl
|
|
3372
|
+
};
|
|
3373
|
+
}
|
|
3307
3374
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
3308
3375
|
try {
|
|
3309
3376
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
|
@@ -3387,6 +3454,16 @@ async function runRecurringSkipNext(input) {
|
|
|
3387
3454
|
dashboardUrl
|
|
3388
3455
|
};
|
|
3389
3456
|
}
|
|
3457
|
+
if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
|
|
3458
|
+
return {
|
|
3459
|
+
ok: false,
|
|
3460
|
+
walletId: null,
|
|
3461
|
+
rule: null,
|
|
3462
|
+
error: "MULTICHAIN_KEY_REQUIRED",
|
|
3463
|
+
message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
|
|
3464
|
+
dashboardUrl
|
|
3465
|
+
};
|
|
3466
|
+
}
|
|
3390
3467
|
const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
|
|
3391
3468
|
try {
|
|
3392
3469
|
const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quackai/q402-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "MCP server for Q402 — gasless USDC, USDT, and RLUSD payments across 9 EVM chains, callable from Claude (Desktop / Code), OpenAI Codex CLI, and any other Model Context Protocol client.",
|
|
5
5
|
"mcpName": "io.github.bitgett/q402-mcp",
|
|
6
6
|
"keywords": [
|