@jellylegsai/aether-cli 1.9.1 → 2.0.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/commands/index.js CHANGED
@@ -1,86 +1,88 @@
1
- // Export all command modules
2
- const doctorCommand = require('./doctor');
3
- const initCommand = require('./init');
4
- const validatorStartCommand = require('./validator-start');
5
- const validatorStatusCommand = require('./validator-status');
6
- const validatorInfoCommand = require('./validator-info');
7
- const validatorRegisterCommand = require('./validator-register');
8
- const delegationsCommand = require('./delegations');
9
- const rewardsCommand = require('./rewards');
10
- const walletCommand = require('./wallet');
11
- const balanceCommand = require('./balance');
12
- const transferCommand = require('./transfer');
13
- const txHistoryCommand = require('./tx-history');
14
- const txCommand = require('./tx');
15
- const multisigCommand = require('./multisig');
16
- const claimCommand = require('./claim');
17
- const unstakeCommand = require('./unstake');
18
- const stakeCommand = require('./stake');
19
- const stakePositionsCommand = require('./stake-positions');
20
- const networkCommand = require('./network');
21
- const monitorLoop = require('./monitor');
22
- const logsCommand = require('./logs');
23
- const sdkCommand = require('./sdk');
24
- const sdkTestCommand = require('./sdk-test');
25
- const configCommand = require('./config');
26
- const epochCommand = require('./epoch');
27
- const supplyCommand = require('./supply');
28
- const statusCommand = require('./status');
29
- const validatorsListCommand = require('./validators');
30
- const blockhashCommand = require('./blockhash');
31
- const tpsCommand = require('./tps');
32
- const feesCommand = require('./fees');
33
- const apyCommand = require('./apy');
34
- const broadcastCommand = require('./broadcast');
35
- const accountCommand = require('./account');
36
- const priceCommand = require('./price');
37
- const emergencyCommand = require('./emergency');
38
- const snapshotCommand = require('./snapshot');
39
- const nftCommand = require('./nft');
40
- const pingCommand = require('./ping');
41
- const slotCommand = require('./slot');
42
- const stakeInfoCommand = require('./stake-info');
43
-
44
- module.exports = {
45
- doctorCommand,
46
- initCommand,
47
- validatorStartCommand,
48
- validatorStatusCommand,
49
- validatorInfoCommand,
50
- validatorRegisterCommand,
51
- delegationsCommand,
52
- rewardsCommand,
53
- walletCommand,
54
- balanceCommand,
55
- transferCommand,
56
- txHistoryCommand,
57
- txCommand,
58
- multisigCommand,
59
- claimCommand,
60
- unstakeCommand,
61
- stakeCommand,
62
- stakePositionsCommand,
63
- stakeInfoCommand,
64
- networkCommand,
65
- monitorLoop,
66
- logsCommand,
67
- sdkCommand,
68
- sdkTestCommand,
69
- configCommand,
70
- epochCommand,
71
- supplyCommand,
72
- statusCommand,
73
- validatorsListCommand,
74
- blockhashCommand,
75
- tpsCommand,
76
- feesCommand,
77
- apyCommand,
78
- broadcastCommand,
79
- accountCommand,
80
- priceCommand,
81
- emergencyCommand,
82
- snapshotCommand,
83
- nftCommand,
84
- pingCommand,
85
- slotCommand,
86
- };
1
+ // Export all command modules
2
+ const doctorCommand = require('./doctor');
3
+ const initCommand = require('./init');
4
+ const validatorStartCommand = require('./validator-start');
5
+ const validatorStatusCommand = require('./validator-status');
6
+ const validatorInfoCommand = require('./validator-info');
7
+ const validatorRegisterCommand = require('./validator-register');
8
+ const delegationsCommand = require('./delegations');
9
+ const rewardsCommand = require('./rewards');
10
+ const walletCommand = require('./wallet');
11
+ const balanceCommand = require('./balance');
12
+ const transferCommand = require('./transfer');
13
+ const txHistoryCommand = require('./tx-history');
14
+ const txCommand = require('./tx');
15
+ const multisigCommand = require('./multisig');
16
+ const claimCommand = require('./claim');
17
+ const unstakeCommand = require('./unstake');
18
+ const stakeCommand = require('./stake');
19
+ const stakePositionsCommand = require('./stake-positions');
20
+ const networkCommand = require('./network');
21
+ const monitorLoop = require('./monitor');
22
+ const logsCommand = require('./logs');
23
+ const sdkCommand = require('./sdk');
24
+ const sdkTestCommand = require('./sdk-test');
25
+ const configCommand = require('./config');
26
+ const epochCommand = require('./epoch');
27
+ const supplyCommand = require('./supply');
28
+ const statusCommand = require('./status');
29
+ const validatorsListCommand = require('./validators');
30
+ const blockhashCommand = require('./blockhash');
31
+ const tpsCommand = require('./tps');
32
+ const feesCommand = require('./fees');
33
+ const apyCommand = require('./apy');
34
+ const broadcastCommand = require('./broadcast');
35
+ const accountCommand = require('./account');
36
+ const priceCommand = require('./price');
37
+ const emergencyCommand = require('./emergency');
38
+ const snapshotCommand = require('./snapshot');
39
+ const nftCommand = require('./nft');
40
+ const pingCommand = require('./ping');
41
+ const slotCommand = require('./slot');
42
+ const stakeInfoCommand = require('./stake-info');
43
+ const deployCommand = require('./deploy');
44
+
45
+ module.exports = {
46
+ doctorCommand,
47
+ initCommand,
48
+ validatorStartCommand,
49
+ validatorStatusCommand,
50
+ validatorInfoCommand,
51
+ validatorRegisterCommand,
52
+ delegationsCommand,
53
+ rewardsCommand,
54
+ walletCommand,
55
+ balanceCommand,
56
+ transferCommand,
57
+ txHistoryCommand,
58
+ txCommand,
59
+ multisigCommand,
60
+ claimCommand,
61
+ unstakeCommand,
62
+ stakeCommand,
63
+ stakePositionsCommand,
64
+ stakeInfoCommand,
65
+ networkCommand,
66
+ monitorLoop,
67
+ logsCommand,
68
+ sdkCommand,
69
+ sdkTestCommand,
70
+ configCommand,
71
+ epochCommand,
72
+ supplyCommand,
73
+ statusCommand,
74
+ validatorsListCommand,
75
+ blockhashCommand,
76
+ tpsCommand,
77
+ feesCommand,
78
+ apyCommand,
79
+ broadcastCommand,
80
+ accountCommand,
81
+ priceCommand,
82
+ emergencyCommand,
83
+ snapshotCommand,
84
+ nftCommand,
85
+ pingCommand,
86
+ slotCommand,
87
+ deployCommand,
88
+ };
package/commands/init.js CHANGED
@@ -32,17 +32,9 @@ const https = require('https');
32
32
  const sdkPath = path.join(__dirname, '..', 'sdk', 'index.js');
33
33
  const aether = require(sdkPath);
34
34
 
35
- // ANSI colors
36
- const C = {
37
- reset: '\x1b[0m',
38
- bright: '\x1b[1m',
39
- green: '\x1b[32m',
40
- yellow: '\x1b[33m',
41
- cyan: '\x1b[36m',
42
- red: '\x1b[31m',
43
- dim: '\x1b[2m',
44
- magenta: '\x1b[35m',
45
- };
35
+ // Import UI framework
36
+ const { C, indicators, BRANDING, startSpinner, stopSpinner,
37
+ success, error, warning, info, code, highlight } = require('../lib/ui');
46
38
 
47
39
  const CLI_VERSION = '2.0.0';
48
40
  const DERIVATION_PATH = "m/44'/7777777'/0'/0'";
@@ -154,40 +146,37 @@ async function askMnemonic(rl, promptText) {
154
146
  }
155
147
 
156
148
  // ============================================================================
157
- // Print Helpers
149
+ // Print Helpers - Enhanced with new branding
158
150
  // ============================================================================
159
151
 
160
152
  function printBanner() {
161
- console.log(`
162
- ${C.cyan}╔═══════════════════════════════════════════════════════════════╗
163
- ║ ║
164
- ║ ${C.bright}AETHER VALIDATOR ONBOARDING WIZARD${C.reset}${C.cyan} ║
165
- ║ ${C.dim}v${CLI_VERSION} - Fully wired to SDK${C.reset}${C.cyan} ║
166
- ║ ║
167
- ╚═══════════════════════════════════════════════════════════════╝${C.reset}
168
- `);
153
+ console.log();
154
+ console.log(BRANDING.welcomeBanner);
155
+ console.log();
156
+ console.log(BRANDING.logo);
157
+ console.log();
169
158
  }
170
159
 
171
160
  function printStep(step, total, title) {
172
161
  console.log();
173
- console.log(`${C.yellow}Step ${step}/${total}:${C.reset} ${C.bright}${title}${C.reset}`);
174
- console.log(`${C.dim}${'─'.repeat(60)}${C.reset}`);
162
+ console.log(`${C.cyan}Step ${step}/${total}:${C.reset} ${C.bright}${title}${C.reset}`);
163
+ console.log(`${C.dim} ────────────────────────────────────────────────────────────────${C.reset}`);
175
164
  }
176
165
 
177
166
  function printSuccess(msg) {
178
- console.log(` ${C.green}✓${C.reset} ${msg}`);
167
+ console.log(` ${success(msg)}`);
179
168
  }
180
169
 
181
170
  function printWarning(msg) {
182
- console.log(` ${C.yellow}⚠${C.reset} ${msg}`);
171
+ console.log(` ${warning(msg)}`);
183
172
  }
184
173
 
185
174
  function printError(msg) {
186
- console.log(` ${C.red}✗${C.reset} ${msg}`);
175
+ console.log(` ${error(msg)}`);
187
176
  }
188
177
 
189
178
  function printInfo(msg) {
190
- console.log(` ${C.dim}ℹ${C.reset} ${msg}`);
179
+ console.log(` ${info(msg)}`);
191
180
  }
192
181
 
193
182
  // ============================================================================
@@ -430,10 +419,10 @@ async function setupWallet(rl) {
430
419
  const address = formatAddress(keyPair.publicKey);
431
420
 
432
421
  const words = mnemonic.split(' ');
433
- console.log(`\n${C.red}${C.bright}╔═══════════════════════════════════════════════════════════════╗${C.reset}`);
434
- console.log(`${C.red}${C.bright} YOUR WALLET PASSPHRASE ║${C.reset}`);
435
- console.log(`${C.red}${C.bright}╚═══════════════════════════════════════════════════════════════╝${C.reset}`);
436
- console.log(`\n${C.yellow} Write these words down. They cannot be recovered.${C.reset}\n`);
422
+ console.log(`\n${C.cyan}${C.bright}╔═══════════════════════════════════════════════════════════════╗${C.reset}`);
423
+ console.log(`${C.cyan}${C.bright}║${C.reset} ${C.yellow}${C.bright}YOUR WALLET PASSPHRASE${C.reset} ${C.cyan}${C.bright}║${C.reset}`);
424
+ console.log(`${C.cyan}${C.bright}╚═══════════════════════════════════════════════════════════════╝${C.reset}`);
425
+ console.log(`\n${C.yellow} Write these words down. They cannot be recovered.${C.reset}\n`);
437
426
 
438
427
  for (let i = 0; i < words.length; i += 3) {
439
428
  const line = [];
@@ -713,35 +702,30 @@ async function registerValidator(rl, wallet, identity, tier, rpcUrl, keyPair) {
713
702
  }
714
703
 
715
704
  // ============================================================================
716
- // Completion Summary
705
+ // Completion Summary - Enhanced with new branding
717
706
  // ============================================================================
718
707
 
719
708
  async function printSummary(identity, wallet, tier, badge) {
720
709
  console.log();
721
- console.log(`${C.green}╔═══════════════════════════════════════════════════════════════╗${C.reset}`);
722
- console.log(`${C.green}║ ║${C.reset}`);
723
- console.log(`${C.green}║ ${C.bright}✅ VALIDATOR SETUP COMPLETE${C.reset}${C.green} ║${C.reset}`);
724
- console.log(`${C.green}║ ${C.dim}Tier: ${badge}${C.reset}${C.green} ║${C.reset}`);
725
- console.log(`${C.green}║ ║${C.reset}`);
726
- console.log(`${C.green}╚═══════════════════════════════════════════════════════════════╝${C.reset}`);
710
+ console.log(BRANDING.successBanner(`VALIDATOR SETUP COMPLETE — ${badge}`));
727
711
  console.log();
728
712
 
729
- console.log(`${C.bright}Identity:${C.reset}`);
730
- console.log(` File: validator-identity.json`);
731
- console.log(` Pubkey: ${identity.pubkey}`);
713
+ console.log(`${C.cyan}Identity${C.reset}`);
714
+ console.log(` ${C.dim}File:${C.reset} validator-identity.json`);
715
+ console.log(` ${C.dim}Pubkey:${C.reset} ${code(identity.pubkey)}`);
732
716
  console.log();
733
717
 
734
- console.log(`${C.bright}Wallet:${C.reset}`);
735
- console.log(` Address: ${wallet.address}`);
736
- console.log(` File: ~/.aether/wallets/${wallet.address}.json`);
718
+ console.log(`${C.cyan}Wallet${C.reset}`);
719
+ console.log(` ${C.dim}Address:${C.reset} ${code(wallet.address)}`);
720
+ console.log(` ${C.dim}File:${C.reset} ~/.aether/wallets/${wallet.address}.json`);
737
721
  console.log();
738
722
 
739
- console.log(`${C.bright}Next steps:${C.reset}`);
740
- console.log(` ${C.cyan}aether validator status${C.reset} Check validator status`);
741
- console.log(` ${C.cyan}aether validator start${C.reset} Start the validator node`);
742
- console.log(` ${C.cyan}aether network${C.reset} View network status`);
743
- console.log(` ${C.cyan}aether wallet balance${C.reset} Check wallet balance`);
744
- console.log(` ${C.cyan}aether stake-info <addr>${C.reset} Check stake positions`);
723
+ console.log(`${C.cyan}Next Steps${C.reset}`);
724
+ console.log(` ${C.cyan}aether validator status${C.reset} ${C.dim}Check validator status${C.reset}`);
725
+ console.log(` ${C.cyan}aether validator start${C.reset} ${C.dim}Start the validator node${C.reset}`);
726
+ console.log(` ${C.cyan}aether network${C.reset} ${C.dim}View network status${C.reset}`);
727
+ console.log(` ${C.cyan}aether wallet balance${C.reset} ${C.dim}Check wallet balance${C.reset}`);
728
+ console.log(` ${C.cyan}aether stake-info <addr>${C.reset} ${C.dim}Check stake positions${C.reset}`);
745
729
  console.log();
746
730
  }
747
731