@quackai/q402-mcp 0.8.39 → 0.8.41

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/dist/index.js +15 -8
  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
  // package.json
212
212
  var package_default = {
213
213
  name: "@quackai/q402-mcp",
214
- version: "0.8.39",
214
+ version: "0.8.41",
215
215
  description: "MCP server for Q402 \u2014 gasless USDC/USDT/RLUSD payments on 11 EVM chains + Chainlink CCIP USDC bridge on the eth/avax/arbitrum triangle, callable from Claude (Desktop / Code), OpenAI Codex CLI, and any other Model Context Protocol client.",
216
216
  mcpName: "io.github.bitgett/q402-mcp",
217
217
  keywords: [
@@ -1142,6 +1142,12 @@ async function runPay(input) {
1142
1142
  to: input.to.toLowerCase(),
1143
1143
  amount: input.amount,
1144
1144
  token: input.token,
1145
+ // Bind the settlement RAIL. On Base the same (to, amount, token) settles
1146
+ // very differently under q402 (EIP-7702) vs x402 (EIP-3009) — different
1147
+ // signature scheme, gas path, and wallet-state constraints. Consenting to a
1148
+ // Q402-rail preview must NOT authorise an x402 execution on the same token,
1149
+ // so a rail change invalidates the consent and forces a fresh preview.
1150
+ rail: input.rail ?? "q402",
1145
1151
  // Bind the funding source too — the user is consenting to spend from THIS
1146
1152
  // wallet, so a different walletMode/walletId needs a fresh preview.
1147
1153
  wm: effectiveMode,
@@ -1157,13 +1163,14 @@ async function runPay(input) {
1157
1163
  if (!consent.ok) {
1158
1164
  const splitNote = input.hookParams?.splits ? ` \u2014 split ${input.hookParams.splits.length} ways; funds go to the split recipients, not ${input.to}` : "";
1159
1165
  const fromNote = senderWallet ? ` from ${senderWallet.addressShort}` : "";
1166
+ const railNote = input.rail === "x402" ? " via the x402 (EIP-3009) rail" : "";
1160
1167
  return {
1161
1168
  result: failureResult("consent"),
1162
1169
  guardsApplied: [...guardsApplied, "two_phase_consent"],
1163
1170
  senderWallet,
1164
1171
  needsConsent: {
1165
1172
  status: "needs_confirmation",
1166
- preview: `Send ${input.amount} ${input.token} to ${input.to} on ${chain.key}${fromNote}${splitNote}. Confirm with the user, then re-call q402_pay with the same args plus consentToken="${consent.expected}".`,
1173
+ preview: `Send ${input.amount} ${input.token} to ${input.to} on ${chain.key}${railNote}${fromNote}${splitNote}. Confirm with the user, then re-call q402_pay with the same args plus consentToken="${consent.expected}".`,
1167
1174
  consentToken: consent.expected
1168
1175
  }
1169
1176
  };
@@ -3505,7 +3512,7 @@ async function runBridgeGasTank(_input) {
3505
3512
  // src/tools/yield-reserves.ts
3506
3513
  import { z as z14 } from "zod";
3507
3514
  var YieldReservesInputSchema = z14.object({
3508
- chain: z14.enum(["bnb"]).optional().describe("Optional chain filter. Q402 Yield is BNB-only today \u2014 only 'bnb' is accepted. Omit to list all supported chains.")
3515
+ chain: z14.enum(["bnb", "base"]).optional().describe("Optional chain filter. Aave markets on 'bnb', Morpho (MetaMorpho) markets on 'base'. Omit to list all supported chains.")
3509
3516
  });
3510
3517
  var YIELD_RESERVES_TOOL = {
3511
3518
  name: "q402_yield_reserves",
@@ -3515,8 +3522,8 @@ var YIELD_RESERVES_TOOL = {
3515
3522
  properties: {
3516
3523
  chain: {
3517
3524
  type: "string",
3518
- enum: ["bnb"],
3519
- description: "Optional chain filter. Q402 Yield is BNB-only today \u2014 only 'bnb' is accepted. Omit for all supported chains."
3525
+ enum: ["bnb", "base"],
3526
+ description: "Optional chain filter. Aave markets on 'bnb', Morpho markets on 'base'. Omit for all supported chains."
3520
3527
  }
3521
3528
  },
3522
3529
  additionalProperties: false
@@ -3577,7 +3584,7 @@ var YieldPositionsInputSchema = z15.object({
3577
3584
  walletId: z15.string().optional().describe(
3578
3585
  "Optional Agent Wallet address whose positions to read (max 10 per owner). Omit and the server defaults to the owner's default wallet (resolved from the API key); Q402_AGENT_WALLET_ADDRESS env fills it in when set."
3579
3586
  ),
3580
- chain: z15.enum(["bnb"]).optional().describe("Optional chain filter. Q402 Yield is BNB-only today \u2014 only 'bnb' is accepted. Omit for all supported chains.")
3587
+ chain: z15.enum(["bnb", "base"]).optional().describe("Optional chain filter. Aave positions on 'bnb', Morpho positions on 'base'. Omit for all supported chains.")
3581
3588
  });
3582
3589
  var YIELD_POSITIONS_TOOL = {
3583
3590
  name: "q402_yield_positions",
@@ -3591,8 +3598,8 @@ var YIELD_POSITIONS_TOOL = {
3591
3598
  },
3592
3599
  chain: {
3593
3600
  type: "string",
3594
- enum: ["bnb"],
3595
- description: "Optional chain filter. Q402 Yield is BNB-only today \u2014 only 'bnb' is accepted. Omit for all supported chains."
3601
+ enum: ["bnb", "base"],
3602
+ description: "Optional chain filter. Aave positions on 'bnb', Morpho positions on 'base'. Omit for all supported chains."
3596
3603
  }
3597
3604
  },
3598
3605
  additionalProperties: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quackai/q402-mcp",
3
- "version": "0.8.39",
3
+ "version": "0.8.41",
4
4
  "description": "MCP server for Q402 — gasless USDC/USDT/RLUSD payments on 11 EVM chains + Chainlink CCIP USDC bridge on the eth/avax/arbitrum triangle, 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": [