@quackai/q402-mcp 0.8.39 → 0.8.40
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 +9 -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.
|
|
214
|
+
version: "0.8.40",
|
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quackai/q402-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.40",
|
|
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": [
|