@quackai/q402-mcp 0.3.6 → 0.3.7

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 +11 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -298,12 +298,6 @@ var TRANSFER_AUTH_TYPES = {
298
298
  { name: "deadline", type: "uint256" }
299
299
  ]
300
300
  };
301
- var AUTHORIZATION_TYPES = {
302
- Authorization: [
303
- { name: "address", type: "address" },
304
- { name: "nonce", type: "uint256" }
305
- ]
306
- };
307
301
  function toRawAmount(amount, decimals) {
308
302
  if (typeof amount !== "string" || amount.trim() === "") {
309
303
  throw new Error('amount must be a non-empty decimal string (e.g. "5.00")');
@@ -325,16 +319,19 @@ function toRawAmount(amount, decimals) {
325
319
  return raw.toString();
326
320
  }
327
321
  async function signAuthorization(wallet, args) {
328
- const domain = { name: "EIP7702Authorization", version: "1", chainId: args.chainId };
329
- const sig = await wallet.signTypedData(domain, AUTHORIZATION_TYPES, {
322
+ const auth = await wallet.authorize({
323
+ chainId: args.chainId,
330
324
  address: args.address,
331
325
  nonce: args.nonce
332
326
  });
333
- const r = sig.slice(0, 66);
334
- const s = "0x" + sig.slice(66, 130);
335
- const v = parseInt(sig.slice(130, 132), 16);
336
- const yParity = v === 27 ? 0 : 1;
337
- return { chainId: args.chainId, address: args.address, nonce: args.nonce, yParity, r, s };
327
+ return {
328
+ chainId: Number(auth.chainId),
329
+ address: auth.address,
330
+ nonce: Number(auth.nonce),
331
+ yParity: auth.signature.yParity,
332
+ r: auth.signature.r,
333
+ s: auth.signature.s
334
+ };
338
335
  }
339
336
  var Q402NodeClient = class _Q402NodeClient {
340
337
  opts;
@@ -776,7 +773,7 @@ var RECEIPT_TOOL = {
776
773
 
777
774
  // src/index.ts
778
775
  var PACKAGE_NAME = "@quackai/q402-mcp";
779
- var PACKAGE_VERSION = "0.3.6";
776
+ var PACKAGE_VERSION = "0.3.7";
780
777
  function jsonText(value) {
781
778
  return { type: "text", text: JSON.stringify(value, null, 2) };
782
779
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quackai/q402-mcp",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "MCP server for Q402 — gasless USDC, USDT, and RLUSD payments across 7 EVM chains, callable directly from Claude Desktop and any other Model Context Protocol client.",
5
5
  "mcpName": "io.github.bitgett/q402-mcp",
6
6
  "keywords": [