crossmint-wallets-mcp 0.1.0 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crossmint-wallets-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server exposing Crossmint smart wallet primitives as tools for Claude Desktop, Continue.dev, Cline, Codex CLI, and any MCP-native client.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "types": "dist/index.d.ts",
11
11
  "files": [
12
12
  "dist",
13
+ "scripts/postinstall.cjs",
13
14
  "README.md",
14
15
  "LICENSE"
15
16
  ],
@@ -53,6 +54,7 @@
53
54
  "node": ">=20.0.0"
54
55
  },
55
56
  "scripts": {
57
+ "postinstall": "node scripts/postinstall.cjs",
56
58
  "build": "tsc",
57
59
  "start": "node dist/mcp/server.js",
58
60
  "dev": "tsc --watch",
@@ -0,0 +1,23 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ // Fix for broken text-encoding-utf-8@1.0.2 package.
5
+ // Its package.json has "main": "lib/encoding.lib" but npm does not
6
+ // install the lib/ directory (pnpm resolves it differently and works).
7
+ // borsh@0.7.0 (via @solana/web3.js) requires it at runtime.
8
+ // Node.js 20+ has TextEncoder/TextDecoder as globals, so we shim it.
9
+
10
+ const dir = path.join(__dirname, "..", "node_modules", "text-encoding-utf-8", "lib");
11
+ const file = path.join(dir, "encoding.lib.js");
12
+
13
+ try {
14
+ if (!fs.existsSync(file)) {
15
+ fs.mkdirSync(dir, { recursive: true });
16
+ fs.writeFileSync(
17
+ file,
18
+ "module.exports = { TextEncoder: globalThis.TextEncoder, TextDecoder: globalThis.TextDecoder };\n"
19
+ );
20
+ }
21
+ } catch (_) {
22
+ // Silently continue — Node.js 20+ may not even hit this code path
23
+ }