@yerofey/cryptowallet-cli 1.35.0 â 1.36.0
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 -0
- package/package.json +2 -1
- package/src/Method.js +28 -1
- package/src/options.js +1 -0
package/README.md
CHANGED
|
@@ -167,6 +167,7 @@ $ cw -l
|
|
|
167
167
|
- `-P` or `--prefix-sensitive`: Specify desired prefix of the wallet address (**case-sensitive**)
|
|
168
168
|
- `-s` or `--suffix`: Specify desired suffix for the wallet address (**case-insensitive**)
|
|
169
169
|
- `-S` or `--suffix-sensitive`: Specify desired suffix for the wallet address (**case-sensitive**)
|
|
170
|
+
- `-q` or `--qr`: Display QR code with the generated wallet address (works only without `-n` argument)
|
|
170
171
|
- `-v` or `--version`: Display current version of CW tool
|
|
171
172
|
|
|
172
173
|
**Currently not necessary options:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yerofey/cryptowallet-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "Crypto wallet generator CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/yerofey/cryptowallet-cli",
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
"ethereum-bip84": "0.0.3",
|
|
134
134
|
"ethereum-cryptography": "^3.0.0",
|
|
135
135
|
"ethereum-mnemonic-privatekey-utils": "1.0.5",
|
|
136
|
+
"qrcode-terminal": "^0.12.0",
|
|
136
137
|
"tezos-sign": "1.4.1",
|
|
137
138
|
"tonweb": "^0.0.66",
|
|
138
139
|
"tronweb": "6.0.0"
|
package/src/Method.js
CHANGED
|
@@ -4,6 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import clipboardy from 'clipboardy';
|
|
5
5
|
import columnify from 'columnify';
|
|
6
6
|
import CsvWriter from 'csv-writer';
|
|
7
|
+
import qr from 'qrcode-terminal';
|
|
7
8
|
import { log, supportedChains, loadJson } from './utils.js';
|
|
8
9
|
import { generateMnemonicString } from './Wallet.js';
|
|
9
10
|
import CW from './CW.js';
|
|
@@ -204,6 +205,7 @@ class Method {
|
|
|
204
205
|
)}\n`
|
|
205
206
|
);
|
|
206
207
|
}
|
|
208
|
+
|
|
207
209
|
linesCount += 1;
|
|
208
210
|
}
|
|
209
211
|
|
|
@@ -211,6 +213,28 @@ class Method {
|
|
|
211
213
|
let matchingWalletsIndexes = [];
|
|
212
214
|
let outputData = {};
|
|
213
215
|
if (cw.wallet.addresses !== undefined) {
|
|
216
|
+
// show QR code if flag is set
|
|
217
|
+
if (displayAsText && cw.options.qr) {
|
|
218
|
+
if (cw.options.number === undefined || cw.options.number == 1) {
|
|
219
|
+
log(`đˇ QR code for the wallet address:`);
|
|
220
|
+
qr.generate(
|
|
221
|
+
cw.wallet.addresses[0].address,
|
|
222
|
+
{ small: true },
|
|
223
|
+
(qrcode) => {
|
|
224
|
+
const paddedQRCode = qrcode
|
|
225
|
+
.split('\n') // Split QR code into lines
|
|
226
|
+
.map((line) => ` ${line}`) // Add padding to each line
|
|
227
|
+
.join('\n'); // Join lines back into a single string
|
|
228
|
+
log(paddedQRCode); // Print the padded QR code
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
} else {
|
|
232
|
+
// not supported for multiple wallets
|
|
233
|
+
log(`âšī¸ It's not supported to display QR code for multiple wallets yet`);
|
|
234
|
+
log();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
214
238
|
// private key
|
|
215
239
|
if (cw.wallet.privateExtendedKey && cw.options.geek) {
|
|
216
240
|
log(`đ ${cw.wallet.privateExtendedKey}`);
|
|
@@ -497,7 +521,10 @@ class Method {
|
|
|
497
521
|
}
|
|
498
522
|
|
|
499
523
|
// should be activated (only for specific chains)
|
|
500
|
-
if (
|
|
524
|
+
if (
|
|
525
|
+
cw.row.requiresActivation !== undefined &&
|
|
526
|
+
cw.row.requiresActivation
|
|
527
|
+
) {
|
|
501
528
|
log(
|
|
502
529
|
blue(
|
|
503
530
|
`đ ${cw.row.title} (${cw.row.network}) requires wallet activation in order to use it (just make a small value transaction to itself)`
|
package/src/options.js
CHANGED
|
@@ -31,6 +31,7 @@ program.option(
|
|
|
31
31
|
'-P, --prefix-sensitive <prefix>',
|
|
32
32
|
'Desired wallet prefix (case-sensitive)'
|
|
33
33
|
);
|
|
34
|
+
program.option('-q, --qr', 'Display QR Code for the wallet address');
|
|
34
35
|
program.option('-s, --suffix <suffix>', 'Desired wallet suffix');
|
|
35
36
|
program.option(
|
|
36
37
|
'-S, --suffix-sensitive <suffix>',
|