@yerofey/cryptowallet-cli 1.15.1 → 1.16.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.
package/README.md CHANGED
@@ -101,6 +101,7 @@ $ cw -l
101
101
  - `ETH` (Ethereum)
102
102
  - `BNB` (Binance Coin) [BEP2, BEP20, ERC20]
103
103
  - `SOL` (Solana)
104
+ - `TON` (The Open Network)
104
105
  - `DOGE` (Dogecoin) [legacy, segwit, bech32]
105
106
  - `BCH` (Bitcoin Cash)
106
107
  - `LTC` (Litecoin) [legacy, segwit, bech32]
@@ -243,6 +244,8 @@ If you find this tool useful and would like to support its development, consider
243
244
  - Ethereum (ETH): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
244
245
  - BNB (BEP20): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
245
246
  - BNB (BEP2): `bnb1gtxfz4kllltaeekw3edfd496gpa3ukpakvzncq`
247
+ - SON: `CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju`
248
+ - TON: `UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS`
246
249
  - DOGE (DOGE): `DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh`
247
250
 
248
251
  **Other Donate Options:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yerofey/cryptowallet-cli",
3
- "version": "1.15.1",
3
+ "version": "1.16.2",
4
4
  "description": "Crypto wallet generator CLI tool",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/yerofey/cryptowallet-cli",
@@ -48,6 +48,10 @@
48
48
  "binance-smart-chain",
49
49
  "bsc",
50
50
  "bnb",
51
+ "sol",
52
+ "solana",
53
+ "ton",
54
+ "the-open-network",
51
55
  "litecoin",
52
56
  "ltc",
53
57
  "bitcoin-cash",
@@ -59,6 +63,8 @@
59
63
  "trx",
60
64
  "metamask",
61
65
  "trust-wallet",
66
+ "phantom",
67
+ "tonkeeper",
62
68
  "tronlink",
63
69
  "bip39",
64
70
  "bip84",
@@ -70,11 +76,15 @@
70
76
  "@binance-chain/javascript-sdk": "^4.2.2",
71
77
  "@harmony-js/account": "^0.1.58",
72
78
  "@solana/web3.js": "^1.89.1",
79
+ "@ton/core": "^0.54.0",
80
+ "@ton/crypto": "^3.2.0",
81
+ "@ton/ton": "^13.9.0",
73
82
  "@yerofey/dogecoin-bip84": "^0.0.5",
74
83
  "@yerofey/litecoin-bip84": "^0.0.5",
75
84
  "bip39": "3.1.0",
76
85
  "bip84": "0.2.7",
77
86
  "bs58": "^5.0.0",
87
+ "buffer": "^6.0.3",
78
88
  "chalk": "5.3.0",
79
89
  "coininfo": "5.2.1",
80
90
  "coinkey": "3.0.0",
package/src/Method.js CHANGED
@@ -245,7 +245,9 @@ class Method {
245
245
  } else {
246
246
  log(`👛 ${item.address}`);
247
247
  }
248
- log(`🔑 ${item.privateKey}`);
248
+ if (item.privateKey !== undefined) {
249
+ log(`🔑 ${item.privateKey}`);
250
+ }
249
251
  }
250
252
  } else {
251
253
  outputData.wallets = cw.wallet.addresses;
@@ -355,6 +357,8 @@ class Method {
355
357
  if (cw.row.apps !== undefined) {
356
358
  let apps = {
357
359
  metamask: 'MetaMask',
360
+ phantom: 'Phantom',
361
+ tonkeeper: 'Tonkeeper',
358
362
  tronlink: 'TronLink',
359
363
  trustwallet: 'Trust Wallet',
360
364
  'harmony-chrome-ext': 'Harmony Chrome Extension Wallet',
@@ -393,6 +397,8 @@ class Method {
393
397
  - USDT: TCW9eaRWjpivZvnZ5DwgbWxPRpoZNWbuPe
394
398
  - BTC: bc1qcwamquntxshqsjcra6vryftrfd9z57j02g3ywq
395
399
  - ETH: 0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
400
+ - SOL: CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju
401
+ - TON: UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS
396
402
  - DOGE: DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh
397
403
 
398
404
  Donate via PayPal:
package/src/Wallet.js CHANGED
@@ -20,6 +20,8 @@ import tronWeb from 'tronweb';
20
20
  import tezos from 'tezos-sign';
21
21
  import { Keypair as SolanaKeypair, PublicKey as SolanaPublickey } from '@solana/web3.js';
22
22
  import bs58 from 'bs58';
23
+ import { TonClient, WalletContractV4, internal as TonInternal } from "@ton/ton";
24
+ import { mnemonicNew as newTonMnemonic, mnemonicToPrivateKey as TonMnemonicToPrivateKey } from "@ton/crypto";
23
25
  const { red } = chalk;
24
26
 
25
27
  class Wallet {
@@ -445,6 +447,34 @@ class Wallet {
445
447
  },
446
448
  ],
447
449
  });
450
+ } else if (chain == 'TON') {
451
+ // Create a new TON client
452
+ // const client = new TonClient({
453
+ // endpoint: 'https://toncenter.com/api/v2/jsonRPC',
454
+ // });
455
+ // Generate new mnemonics and derive key pair
456
+ const mnemonics = await newTonMnemonic();
457
+ const keyPair = await TonMnemonicToPrivateKey(mnemonics);
458
+ // Define the workchain (usually 0)
459
+ const workchain = 0;
460
+ // Create a new wallet contract instance
461
+ const wallet = WalletContractV4.create({ workchain, publicKey: keyPair.publicKey });
462
+ // const contract = client.open(wallet);
463
+ // Get the wallet address
464
+ const address = wallet.address.toString();
465
+
466
+ // TODO: add support for multiple addresses
467
+ // TODO: add support for new UQ address format
468
+
469
+ Object.assign(result, {
470
+ addresses: [
471
+ {
472
+ index: 0,
473
+ address,
474
+ },
475
+ ],
476
+ mnemonic: mnemonics.join(' '),
477
+ });
448
478
  } else if (chain == 'TRX') {
449
479
  try {
450
480
  const wallet = await tronWeb.createAccount();
@@ -3,5 +3,6 @@
3
3
  "network": "SVM",
4
4
  "startsWith": "",
5
5
  "prefixTest": "[1-9a-zA-Z]",
6
+ "apps": ["phantom", "trustwallet"],
6
7
  "flags": ["p", "s"]
7
8
  }
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "The Open Network",
3
+ "network": "TON",
4
+ "defaultFormat": "V4R2",
5
+ "formats": {
6
+ "V4R2": {
7
+ "format": "V4R2",
8
+ "startsWith": "EQ",
9
+ "prefixTest": "[0-9a-zA-Z-_]",
10
+ "rareSymbols": "[0-9]",
11
+ "apps": ["tonkeeper", "trustwallet"],
12
+ "flags": ["p", "s"]
13
+ }
14
+ }
15
+ }