@tanakayuto/intmax402-client 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/client.js +4 -0
  2. package/package.json +9 -9
package/dist/client.js CHANGED
@@ -14,6 +14,10 @@ class INTMAX402Client {
14
14
  initialized = false;
15
15
  intmaxClient = null;
16
16
  constructor(options) {
17
+ // Validate private key before creating wallet
18
+ if (!ethers_1.ethers.isHexString(options.privateKey, 32)) {
19
+ throw new Error("Invalid private key: must be a 32-byte hex string (0x-prefixed)");
20
+ }
17
21
  this.wallet = new ethers_1.ethers.Wallet(options.privateKey);
18
22
  this.environment = options.environment || "testnet";
19
23
  }
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@tanakayuto/intmax402-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "clean": "rm -rf dist",
9
+ "typecheck": "tsc --noEmit"
10
+ },
6
11
  "dependencies": {
7
- "@tanakayuto/intmax402-core": "0.2.0",
12
+ "@tanakayuto/intmax402-core": "^0.2.6",
8
13
  "ethers": "^6.0.0",
9
14
  "intmax2-server-sdk": "^1.5.2"
10
15
  },
@@ -33,10 +38,5 @@
33
38
  "express",
34
39
  "web3",
35
40
  "zk"
36
- ],
37
- "scripts": {
38
- "build": "tsc",
39
- "clean": "rm -rf dist",
40
- "typecheck": "tsc --noEmit"
41
- }
42
- }
41
+ ]
42
+ }