@yerofey/cryptowallet-cli 1.13.0 → 1.14.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/cli.js +4 -0
- package/package.json +2 -2
- package/src/Method.js +25 -10
- package/src/options.js +1 -0
package/cli.js
CHANGED
|
@@ -19,6 +19,10 @@ import Method from './src/Method.js';
|
|
|
19
19
|
return new Method('version').init();
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
if (options.donate) {
|
|
23
|
+
return new Method('donate').init();
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
const chain = options.chain.toUpperCase() || '';
|
|
23
27
|
if (supportedChains.includes(chain)) {
|
|
24
28
|
return new Method('wallet', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yerofey/cryptowallet-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Crypto wallet generator CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/yerofey/cryptowallet-cli",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"lint": "pnpm exec eslint src/*.js",
|
|
22
|
-
"postinstall": "
|
|
22
|
+
"postinstall": "cw --donate",
|
|
23
23
|
"test": "ava"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
package/src/Method.js
CHANGED
|
@@ -6,16 +6,8 @@ import { log, supportedChains, loadJson } from './utils.js';
|
|
|
6
6
|
import { generateMnemonicString } from './Wallet.js';
|
|
7
7
|
import CW from './CW.js';
|
|
8
8
|
|
|
9
|
-
const {
|
|
10
|
-
|
|
11
|
-
green,
|
|
12
|
-
blueBright,
|
|
13
|
-
greenBright,
|
|
14
|
-
yellow,
|
|
15
|
-
red,
|
|
16
|
-
magenta,
|
|
17
|
-
white,
|
|
18
|
-
} = chalk;
|
|
9
|
+
const { blue, green, blueBright, greenBright, yellow, red, magenta, white } =
|
|
10
|
+
chalk;
|
|
19
11
|
|
|
20
12
|
const pkg = await loadJson(
|
|
21
13
|
`${path.dirname(import.meta.url)}/../package.json`.replace('file://', '')
|
|
@@ -32,6 +24,7 @@ class Method {
|
|
|
32
24
|
_initializeMethods() {
|
|
33
25
|
return {
|
|
34
26
|
_: () => {},
|
|
27
|
+
donate: this._donate.bind(this),
|
|
35
28
|
list: this._list.bind(this),
|
|
36
29
|
mnemonic: this._mnemonic.bind(this),
|
|
37
30
|
version: this._version.bind(this),
|
|
@@ -380,6 +373,28 @@ class Method {
|
|
|
380
373
|
}
|
|
381
374
|
}
|
|
382
375
|
|
|
376
|
+
_donate() {
|
|
377
|
+
console.log(`
|
|
378
|
+
──────────────────────────────────────────────────────
|
|
379
|
+
Thank you for installing CW!
|
|
380
|
+
|
|
381
|
+
If you'd like to support this project, consider making
|
|
382
|
+
a donation. Your support is greatly appreciated!
|
|
383
|
+
|
|
384
|
+
Donate Crypto:
|
|
385
|
+
- USDT: TCW9eaRWjpivZvnZ5DwgbWxPRpoZNWbuPe
|
|
386
|
+
- BTC: bc1qcwamquntxshqsjcra6vryftrfd9z57j02g3ywq
|
|
387
|
+
- ETH: 0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
|
|
388
|
+
- DOGE: DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh
|
|
389
|
+
|
|
390
|
+
Donate via PayPal:
|
|
391
|
+
- https://paypal.me/Jerofej
|
|
392
|
+
|
|
393
|
+
Thank you for your support!
|
|
394
|
+
──────────────────────────────────────────────────────
|
|
395
|
+
`);
|
|
396
|
+
}
|
|
397
|
+
|
|
383
398
|
async init() {
|
|
384
399
|
return (this.callMethods[this.name] || this.callMethods['_'])();
|
|
385
400
|
}
|
package/src/options.js
CHANGED