@yerofey/cryptowallet-cli 1.29.0 → 1.30.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/README.md CHANGED
@@ -184,6 +184,7 @@ $ cw -l
184
184
  - [x] v18.x ✅
185
185
  - [x] v19.x ✅
186
186
  - [x] v20.x ✅
187
+ - [x] v21.x ✅
187
188
 
188
189
  *tested on Ubuntu 22.04 & Mac M1*
189
190
 
@@ -276,7 +277,7 @@ If you find this tool useful and would like to support its development, consider
276
277
  - BNB (BEP20): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
277
278
  - BNB (BEP2): `bnb1gtxfz4kllltaeekw3edfd496gpa3ukpakvzncq`
278
279
  - SOL: `CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju`
279
- - TON: `UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS`
280
+ - TON: `UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0`
280
281
  - DOGE (DOGE): `DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh`
281
282
 
282
283
  **Other Donate Options:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yerofey/cryptowallet-cli",
3
- "version": "1.29.0",
3
+ "version": "1.30.1",
4
4
  "description": "Crypto wallet generator CLI tool",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/yerofey/cryptowallet-cli",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  {
35
35
  "type": "ton",
36
- "url": "ton://transfer/UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS"
36
+ "url": "ton://transfer/UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0"
37
37
  },
38
38
  {
39
39
  "type": "dogecoin",
package/src/Method.js CHANGED
@@ -574,7 +574,7 @@ class Method {
574
574
  - BTC: bc1qcwamquntxshqsjcra6vryftrfd9z57j02g3ywq
575
575
  - ETH: 0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
576
576
  - SOL: CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju
577
- - TON: UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS
577
+ - TON: UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0
578
578
  - DOGE: DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh
579
579
 
580
580
  Donate via PayPal:
package/src/Wallet.js CHANGED
@@ -445,10 +445,14 @@ class Wallet {
445
445
  });
446
446
  } else if (chain == 'SOL') {
447
447
  // Validate mnemonic
448
- if (mnemonicString != '' && !bip39.validateMnemonic(mnemonicString)) {
449
- return {
450
- error: 'mnemonic is not valid',
451
- };
448
+ if (mnemonicString != '') {
449
+ try {
450
+ bip39.validateMnemonic(mnemonicString);
451
+ } catch (error) {
452
+ return {
453
+ error: 'mnemonic is not valid',
454
+ };
455
+ }
452
456
  }
453
457
 
454
458
  let addresses = [];
@@ -563,91 +567,6 @@ class Wallet {
563
567
 
564
568
  return result;
565
569
  }
566
-
567
- // handleBTC() {
568
- // const wallet = CoinKey.createRandom(CoinInfo('BTC').versions);
569
-
570
- // return {
571
- // address: wallet.publicAddress,
572
- // privateKey: wallet.privateWif,
573
- // };
574
- // }
575
-
576
- // handleDOGE() {
577
- // const mnemonic = generateMnemonicString(12);
578
- // const root = fromMnemonicDoge(mnemonic, '');
579
- // const child = root.deriveAccount(0);
580
- // const account = fromZPrvDoge(child);
581
-
582
- // return {
583
- // mnemonic,
584
- // privateExtendedKey: account.getAccountPrivateKey(),
585
- // addresses: [
586
- // {
587
- // index: 0,
588
- // address: account.getAddress(0, false, 44),
589
- // privateKey: account.getPrivateKey(0),
590
- // },
591
- // ],
592
- // };
593
- // }
594
-
595
- // handleEVM() {
596
- // const mnemonic = bip39.generateMnemonic();
597
- // const privateKey = pkutils.getPrivateKeyFromMnemonic(mnemonic);
598
- // const account = Account.fromPrivate('0x' + privateKey);
599
-
600
- // return {
601
- // address: account.address,
602
- // privateKey,
603
- // };
604
- // }
605
-
606
- // handleLTC() {
607
- // const mnemonic = generateMnemonicString(12);
608
- // const root = fromMnemonicLite(mnemonic, '');
609
- // const child = root.deriveAccount(0);
610
- // const account = fromZPrvLite(child);
611
-
612
- // return {
613
- // mnemonic,
614
- // privateExtendedKey: account.getAccountPrivateKey(),
615
- // addresses: [
616
- // {
617
- // index: 0,
618
- // address: account.getAddress(0, false, 44),
619
- // privateKey: account.getPrivateKey(0),
620
- // },
621
- // ],
622
- // };
623
- // }
624
-
625
- // handleSOL() {
626
- // const mnemonic = generateMnemonicString(24);
627
- // const seed = bip39.mnemonicToSeedSync(mnemonic);
628
- // const keypair = SolanaKeypair.fromSeed(seed.slice(0, 32));
629
- // const publicKey = new SolanaPublickey(keypair.publicKey);
630
- // const privateKey = bs58.encode(keypair.secretKey);
631
-
632
- // return {
633
- // address: publicKey.toBase58(),
634
- // privateKey,
635
- // };
636
- // }
637
-
638
- // handleTON() {
639
- // const mnemonic = newTonMnemonic();
640
- // const keyPair = TonMnemonicToPrivateKey(mnemonic);
641
- // const tonweb = new TonWeb();
642
- // const WalletClass = tonweb.wallet.all.v4R2;
643
- // const wallet = new WalletClass(tonweb.provider, keyPair);
644
- // const address = wallet.getAddress();
645
-
646
- // return {
647
- // mnemonic,
648
- // address,
649
- // };
650
- // }
651
570
  }
652
571
 
653
572
  function generateMnemonicString(length = 12) {