@yerofey/cryptowallet-cli 1.24.0 → 1.26.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 +1 -1
- package/package.json +9 -8
- package/src/Wallet.js +15 -4
- package/src/chains/BTC.json +9 -0
- package/src/options.js +1 -2
package/README.md
CHANGED
|
@@ -272,7 +272,7 @@ If you find this tool useful and would like to support its development, consider
|
|
|
272
272
|
- Ethereum (ETH): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
|
|
273
273
|
- BNB (BEP20): `0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8`
|
|
274
274
|
- BNB (BEP2): `bnb1gtxfz4kllltaeekw3edfd496gpa3ukpakvzncq`
|
|
275
|
-
-
|
|
275
|
+
- SOL: `CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju`
|
|
276
276
|
- TON: `UQCWYNjNQdRp7lfmehDWA-RgPqipbI3crX3qFN1MDLpgkyCS`
|
|
277
277
|
- DOGE (DOGE): `DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh`
|
|
278
278
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yerofey/cryptowallet-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"description": "Crypto wallet generator CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/yerofey/cryptowallet-cli",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"lint": "pnpm exec eslint src/*.js",
|
|
52
|
-
"test": "ava"
|
|
52
|
+
"test": "ava",
|
|
53
|
+
"update": "ncu -u && pnpm install"
|
|
53
54
|
},
|
|
54
55
|
"files": [
|
|
55
56
|
"cli.js",
|
|
@@ -104,21 +105,20 @@
|
|
|
104
105
|
"dependencies": {
|
|
105
106
|
"@binance-chain/javascript-sdk": "^4.2.2",
|
|
106
107
|
"@harmony-js/account": "^0.1.58",
|
|
107
|
-
"@solana/web3.js": "^1.
|
|
108
|
-
"@ton/core": "^0.54.0",
|
|
108
|
+
"@solana/web3.js": "^1.90.0",
|
|
109
109
|
"@ton/crypto": "^3.2.0",
|
|
110
110
|
"@yerofey/dogecoin-bip84": "^0.0.5",
|
|
111
111
|
"@yerofey/litecoin-bip84": "^0.0.5",
|
|
112
112
|
"bip39": "3.1.0",
|
|
113
113
|
"bip84": "0.2.7",
|
|
114
|
+
"bip86": "^0.0.3",
|
|
114
115
|
"bs58": "^5.0.0",
|
|
115
|
-
"buffer": "^6.0.3",
|
|
116
116
|
"chalk": "5.3.0",
|
|
117
117
|
"clipboardy": "^4.0.0",
|
|
118
118
|
"coininfo": "5.2.1",
|
|
119
119
|
"coinkey": "3.0.0",
|
|
120
120
|
"columnify": "1.6.0",
|
|
121
|
-
"commander": "
|
|
121
|
+
"commander": "12.0.0",
|
|
122
122
|
"csv-writer": "^1.6.0",
|
|
123
123
|
"dotenv": "^16.4.1",
|
|
124
124
|
"ed25519-hd-key": "^1.3.0",
|
|
@@ -130,7 +130,8 @@
|
|
|
130
130
|
"tronweb": "5.3.1"
|
|
131
131
|
},
|
|
132
132
|
"devDependencies": {
|
|
133
|
-
"ava": "^
|
|
134
|
-
"eslint": "^8.
|
|
133
|
+
"ava": "^6.1.1",
|
|
134
|
+
"eslint": "^8.56.0",
|
|
135
|
+
"npm-check-updates": "^16.14.14"
|
|
135
136
|
}
|
|
136
137
|
}
|
package/src/Wallet.js
CHANGED
|
@@ -7,6 +7,8 @@ import CoinInfo from 'coininfo';
|
|
|
7
7
|
import bip39 from 'bip39';
|
|
8
8
|
import bip84 from 'bip84';
|
|
9
9
|
const { fromMnemonic, fromZPrv } = bip84;
|
|
10
|
+
import bip86 from 'bip86';
|
|
11
|
+
const { fromMnemonic: fromMnemonicBip86, fromXPrv } = bip86;
|
|
10
12
|
import ethereumBip from 'ethereum-bip84';
|
|
11
13
|
const { fromMnemonic: fromMnemonicEthereum, fromZPrv: fromZPrvEthereum } =
|
|
12
14
|
ethereumBip;
|
|
@@ -94,7 +96,10 @@ class Wallet {
|
|
|
94
96
|
) {
|
|
95
97
|
if (badSymbolsArray.length === 0) {
|
|
96
98
|
// suggest to generate multiple wallets addresses (if it is supported by the settings)
|
|
97
|
-
if (
|
|
99
|
+
if (
|
|
100
|
+
row.flags.includes('n') &&
|
|
101
|
+
(!options.number || options.number == 1)
|
|
102
|
+
) {
|
|
98
103
|
log(
|
|
99
104
|
yellow(
|
|
100
105
|
'💡 You can speed up the process significantly by generating multiple addresses for each wallet. Example: cw -n 10'
|
|
@@ -279,9 +284,15 @@ class Wallet {
|
|
|
279
284
|
}
|
|
280
285
|
|
|
281
286
|
const mnemonic = mnemonicString || bip39.generateMnemonic();
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
287
|
+
|
|
288
|
+
const root =
|
|
289
|
+
row.format == 'taproot'
|
|
290
|
+
? new fromMnemonicBip86(mnemonic, '')
|
|
291
|
+
: new fromMnemonic(mnemonic, '');
|
|
292
|
+
const child =
|
|
293
|
+
row.format == 'taproot' ? root.deriveAccount(0) : root.deriveAccount(0);
|
|
294
|
+
const account =
|
|
295
|
+
row.format == 'taproot' ? new fromXPrv(child) : new fromZPrv(child);
|
|
285
296
|
|
|
286
297
|
let addresses = [];
|
|
287
298
|
if (number >= 1) {
|
package/src/chains/BTC.json
CHANGED
|
@@ -29,6 +29,15 @@
|
|
|
29
29
|
"path": "m/49'/0",
|
|
30
30
|
"purpose": 49,
|
|
31
31
|
"flags": ["f", "g", "m", "n", "p", "s"]
|
|
32
|
+
},
|
|
33
|
+
"taproot": {
|
|
34
|
+
"format": "taproot",
|
|
35
|
+
"startsWith": "bc1p",
|
|
36
|
+
"prefixTest": "[0-9a-z]",
|
|
37
|
+
"rareSymbols": "[0-9]",
|
|
38
|
+
"path": "m/86'/0",
|
|
39
|
+
"purpose": 86,
|
|
40
|
+
"flags": ["f", "g", "m", "n", "p", "s"]
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
package/src/options.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { program } from 'commander';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
program.option('-b, --chain <ticker>', 'Wallet for specific blockchain', 'EVM');
|
|
3
|
+
program.option('-b <ticker>', 'Wallet for specific blockchain', 'EVM');
|
|
5
4
|
program.option('-c, --chain <ticker>', 'Wallet for specific blockchain', 'EVM');
|
|
6
5
|
program.option('-C, --copy', 'Copy the result to the clipboard');
|
|
7
6
|
program.option(
|