@yerofey/cryptowallet-cli 1.25.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 +3 -4
- package/src/Wallet.js +15 -4
- package/src/chains/BTC.json +9 -0
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",
|
|
@@ -105,15 +105,14 @@
|
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@binance-chain/javascript-sdk": "^4.2.2",
|
|
107
107
|
"@harmony-js/account": "^0.1.58",
|
|
108
|
-
"@solana/web3.js": "^1.
|
|
109
|
-
"@ton/core": "^0.54.0",
|
|
108
|
+
"@solana/web3.js": "^1.90.0",
|
|
110
109
|
"@ton/crypto": "^3.2.0",
|
|
111
110
|
"@yerofey/dogecoin-bip84": "^0.0.5",
|
|
112
111
|
"@yerofey/litecoin-bip84": "^0.0.5",
|
|
113
112
|
"bip39": "3.1.0",
|
|
114
113
|
"bip84": "0.2.7",
|
|
114
|
+
"bip86": "^0.0.3",
|
|
115
115
|
"bs58": "^5.0.0",
|
|
116
|
-
"buffer": "^6.0.3",
|
|
117
116
|
"chalk": "5.3.0",
|
|
118
117
|
"clipboardy": "^4.0.0",
|
|
119
118
|
"coininfo": "5.2.1",
|
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
|
}
|