@kya-os/mcp-i 1.3.0 → 1.3.2

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.
@@ -7,17 +7,15 @@ exports.verifyProofLocally = verifyProofLocally;
7
7
  exports.verifyDIDDocumentLocally = verifyDIDDocumentLocally;
8
8
  exports.createMockProof = createMockProof;
9
9
  const crypto_1 = require("crypto");
10
+ const json_canonicalize_1 = require("json-canonicalize");
10
11
  const test_1 = require("@kya-os/contracts/test");
11
12
  const test_environment_1 = require("./test-environment");
12
13
  const mock_identity_provider_1 = require("./mock-identity-provider");
13
14
  /**
14
- * Canonicalize data using JCS (JSON Canonicalization Scheme)
15
- * For testing, we'll use a simplified version
15
+ * Canonicalize data using JCS (JSON Canonicalization Scheme) RFC 8785
16
16
  */
17
17
  function canonicalizeJSON(data) {
18
- // Simplified JCS implementation for testing
19
- // In production, this would use a proper JCS library
20
- return JSON.stringify(data, Object.keys(data).sort());
18
+ return (0, json_canonicalize_1.canonicalize)(data);
21
19
  }
22
20
  /**
23
21
  * Generate SHA-256 hash with prefix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "The TypeScript MCP framework with identity features built-in",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -36,7 +36,8 @@
36
36
  "build": "cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts && node scripts/fix-esm-imports.js",
37
37
  "test": "vitest",
38
38
  "lint": "eslint src/**/*.ts",
39
- "type-check": "tsc --noEmit"
39
+ "type-check": "tsc --noEmit",
40
+ "prepublishOnly": "npm run build && node ../create-mcpi-app/scripts/validate-no-workspace.js"
40
41
  },
41
42
  "keywords": [
42
43
  "mcp-i",
@@ -70,6 +71,7 @@
70
71
  "glob": "^11.0.2",
71
72
  "handlebars": "^4.7.7",
72
73
  "jose": "^5.2.0",
74
+ "json-canonicalize": "^2.0.0",
73
75
  "json5": "^2.2.3",
74
76
  "jsonwebtoken": "^9.0.2",
75
77
  "memfs": "^4.17.2",
@@ -104,6 +106,7 @@
104
106
  "node": ">=20.0.0"
105
107
  },
106
108
  "peerDependencies": {
109
+ "json-canonicalize": "^2.0.0",
107
110
  "swc-loader": "^0.2.6",
108
111
  "zod": "^3.22.4"
109
112
  },