@deserialize/multi-vm-wallet 1.5.1 → 1.5.11

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.
@@ -3,7 +3,6 @@ export declare class VMValidation {
3
3
  static validateSeed(seed: string): void;
4
4
  static validateMnemonic(mnemonic: string): void;
5
5
  static validateDerivationPath(path: string, vmType?: 'EVM' | 'SVM'): void;
6
- static validatePassword(password: string, minLength?: number): void;
7
6
  static validateAmount(amount: bigint, label?: string): void;
8
7
  static validateEthereumAddress(address: string, label?: string): void;
9
8
  }
@@ -87,18 +87,6 @@ class VMValidation {
87
87
  }
88
88
  }
89
89
  }
90
- static validatePassword(password, minLength = 8) {
91
- if (typeof password !== 'string') {
92
- throw new Error(`Password must be a string, got: ${typeof password}`);
93
- }
94
- if (password.length < minLength) {
95
- throw new Error(`Password too short. Minimum length: ${minLength}, got: ${password.length}`);
96
- }
97
- const weakPasswords = ['password', '12345678', 'qwerty', 'abc123'];
98
- if (weakPasswords.includes(password.toLowerCase())) {
99
- throw new Error('Password is too weak. Choose a stronger password.');
100
- }
101
- }
102
90
  static validateAmount(amount, label = 'Amount') {
103
91
  if (typeof amount !== 'bigint') {
104
92
  throw new Error(`${label} must be a bigint, got: ${typeof amount}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deserialize/multi-vm-wallet",
3
- "version": "1.5.1",
3
+ "version": "1.5.11",
4
4
  "devDependencies": {
5
5
  "@types/bn.js": "^5.2.0",
6
6
  "@types/crypto-js": "^4.2.2",
@@ -161,23 +161,23 @@ export class VMValidation {
161
161
  * @param minLength - Minimum password length (default: 8)
162
162
  * @throws Error if password is weak
163
163
  */
164
- static validatePassword(password: string, minLength: number = 8): void {
165
- if (typeof password !== 'string') {
166
- throw new Error(`Password must be a string, got: ${typeof password}`);
167
- }
168
-
169
- if (password.length < minLength) {
170
- throw new Error(
171
- `Password too short. Minimum length: ${minLength}, got: ${password.length}`
172
- );
173
- }
174
-
175
- // Check for common weak passwords
176
- const weakPasswords = ['password', '12345678', 'qwerty', 'abc123'];
177
- if (weakPasswords.includes(password.toLowerCase())) {
178
- throw new Error('Password is too weak. Choose a stronger password.');
179
- }
180
- }
164
+ // static validatePassword(password: string, minLength: number = 8): void {
165
+ // if (typeof password !== 'string') {
166
+ // throw new Error(`Password must be a string, got: ${typeof password}`);
167
+ // }
168
+
169
+ // if (password.length < minLength) {
170
+ // throw new Error(
171
+ // `Password too short. Minimum length: ${minLength}, got: ${password.length}`
172
+ // );
173
+ // }
174
+
175
+ // // Check for common weak passwords
176
+ // const weakPasswords = ['password', '12345678', 'qwerty', 'abc123'];
177
+ // if (weakPasswords.includes(password.toLowerCase())) {
178
+ // throw new Error('Password is too weak. Choose a stronger password.');
179
+ // }
180
+ // }
181
181
 
182
182
  /**
183
183
  * Validate amount (bigint)