@capxul/mcp 2.3.0 → 2.3.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.
Files changed (2) hide show
  1. package/dist/main.mjs +9 -6
  2. package/package.json +5 -5
package/dist/main.mjs CHANGED
@@ -240,7 +240,7 @@ function normalizeEmail(email) {
240
240
  }
241
241
  //#endregion
242
242
  //#region package.json
243
- var version$2 = "2.3.0";
243
+ var version$2 = "2.3.1";
244
244
  //#endregion
245
245
  //#region ../../packages/errors/src/errors.ts
246
246
  const CAPXUL_ERROR_CODES = [
@@ -7824,11 +7824,14 @@ async function executePersonalPayment(deps, payment, signal, requestKey) {
7824
7824
  function isAborted$1(signal) {
7825
7825
  return signal?.aborted === true;
7826
7826
  }
7827
+ function canonicalJson(value) {
7828
+ const canonical = JSON.stringify(value, (_key, item) => item !== null && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.entries(item).sort(([left], [right]) => left.localeCompare(right))) : item);
7829
+ if (canonical === void 0) throw new TypeError("Payment intent must be JSON data");
7830
+ return canonical;
7831
+ }
7827
7832
  /** Return one stable fingerprint for one JSON payment intent. */
7828
7833
  async function fingerprintPaymentIntent(intent) {
7829
- const canonical = JSON.stringify(intent, (_key, value) => value !== null && typeof value === "object" && !Array.isArray(value) ? Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))) : value);
7830
- if (canonical === void 0) throw new TypeError("Payment intent must be JSON data");
7831
- return keccak256(toBytes(canonical));
7834
+ return keccak256(toBytes(canonicalJson(intent)));
7832
7835
  }
7833
7836
  async function executePrepared(deps, prepare, expectedRequest, signal) {
7834
7837
  if (isAborted$1(signal)) return {
@@ -8853,7 +8856,7 @@ async function recoverRawDigestSigner(input) {
8853
8856
  }
8854
8857
  //#endregion
8855
8858
  //#region ../../packages/sdk/package.json
8856
- var version = "2.3.0";
8859
+ var version = "2.3.1";
8857
8860
  //#endregion
8858
8861
  //#region ../../packages/observability/src/engineering.ts
8859
8862
  const SAFE_TRACED_HEADER_NAMES = [
@@ -38446,7 +38449,7 @@ async function execute(deps, orgId, command, signal) {
38446
38449
  } }));
38447
38450
  if (!prepared.ok) return prepared;
38448
38451
  const expectedSafe = deriveCapxulSafeAddress({ email: session.email });
38449
- if (prepared.value.chainId !== deps.chainId || prepared.value.signerAddress.toLowerCase() !== signerAddress.toLowerCase() || prepared.value.userOpSenderSafe.toLowerCase() !== expectedSafe.toLowerCase() || prepared.value.operation !== command.operation || prepared.value.orgId !== orgId || JSON.stringify(prepared.value.command) !== JSON.stringify(command)) return {
38452
+ if (prepared.value.chainId !== deps.chainId || prepared.value.signerAddress.toLowerCase() !== signerAddress.toLowerCase() || prepared.value.userOpSenderSafe.toLowerCase() !== expectedSafe.toLowerCase() || prepared.value.operation !== command.operation || prepared.value.orgId !== orgId || canonicalJson(prepared.value.command) !== canonicalJson(command)) return {
38450
38453
  ok: false,
38451
38454
  error: Errors.invalidInput("permission", "prepared authority mismatch")
38452
38455
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/mcp",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "private": false,
5
5
  "description": "Capxul MCP server for auth, Account readiness, identity, Organizations, relationships, requests, destinations, and testnet funding over Streamable HTTP.",
6
6
  "keywords": [
@@ -47,12 +47,12 @@
47
47
  "typescript": "npm:@typescript/typescript6@6.0.2",
48
48
  "vite": "npm:@voidzero-dev/vite-plus-core@0.1.23",
49
49
  "vite-plus": "0.1.23",
50
- "@capxul/backend": "0.2.3",
50
+ "@capxul/backend": "0.2.4",
51
51
  "@capxul/config": "0.2.0",
52
- "@capxul/sdk": "2.3.0",
52
+ "@capxul/sdk": "2.3.1",
53
53
  "@capxul/types": "0.2.0",
54
- "@capxul/typescript-config": "0.0.0",
55
- "@capxul/wire": "0.4.0"
54
+ "@capxul/wire": "0.4.0",
55
+ "@capxul/typescript-config": "0.0.0"
56
56
  },
57
57
  "scripts": {
58
58
  "dev": "vp exec tsx src/main.ts serve",