@jellylegsai/aether-cli 1.9.2 → 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/IMPLEMENTATION_REPORT.md +319 -0
- package/commands/blockheight.js +230 -0
- package/commands/call.js +981 -0
- package/commands/claim.js +98 -72
- package/commands/deploy.js +959 -0
- package/commands/index.js +2 -0
- package/commands/init.js +33 -49
- package/commands/network-diagnostics.js +706 -0
- package/commands/network.js +412 -429
- package/commands/rewards.js +311 -266
- package/commands/sdk.js +791 -656
- package/commands/slot.js +3 -11
- package/commands/stake.js +581 -516
- package/commands/supply.js +483 -391
- package/commands/token-accounts.js +275 -0
- package/commands/transfer.js +3 -11
- package/commands/unstake.js +3 -11
- package/commands/validator-start.js +681 -323
- package/commands/validator.js +959 -0
- package/commands/validators.js +623 -626
- package/commands/version.js +240 -0
- package/commands/wallet.js +17 -24
- package/cycle-report-issue-116.txt +165 -0
- package/index.js +501 -602
- package/lib/ui.js +623 -0
- package/package.json +10 -3
- package/sdk/index.d.ts +546 -0
- package/sdk/index.js +130 -0
- package/sdk/package.json +2 -1
package/commands/index.js
CHANGED
|
@@ -40,6 +40,7 @@ const nftCommand = require('./nft');
|
|
|
40
40
|
const pingCommand = require('./ping');
|
|
41
41
|
const slotCommand = require('./slot');
|
|
42
42
|
const stakeInfoCommand = require('./stake-info');
|
|
43
|
+
const deployCommand = require('./deploy');
|
|
43
44
|
|
|
44
45
|
module.exports = {
|
|
45
46
|
doctorCommand,
|
|
@@ -83,4 +84,5 @@ module.exports = {
|
|
|
83
84
|
nftCommand,
|
|
84
85
|
pingCommand,
|
|
85
86
|
slotCommand,
|
|
87
|
+
deployCommand,
|
|
86
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
|
-
//
|
|
36
|
-
const C
|
|
37
|
-
|
|
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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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.
|
|
174
|
-
console.log(`${C.dim}
|
|
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(` ${
|
|
167
|
+
console.log(` ${success(msg)}`);
|
|
179
168
|
}
|
|
180
169
|
|
|
181
170
|
function printWarning(msg) {
|
|
182
|
-
console.log(` ${
|
|
171
|
+
console.log(` ${warning(msg)}`);
|
|
183
172
|
}
|
|
184
173
|
|
|
185
174
|
function printError(msg) {
|
|
186
|
-
console.log(` ${
|
|
175
|
+
console.log(` ${error(msg)}`);
|
|
187
176
|
}
|
|
188
177
|
|
|
189
178
|
function printInfo(msg) {
|
|
190
|
-
console.log(` ${
|
|
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.
|
|
434
|
-
console.log(`${C.
|
|
435
|
-
console.log(`${C.
|
|
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(
|
|
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.
|
|
730
|
-
console.log(`
|
|
731
|
-
console.log(`
|
|
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.
|
|
735
|
-
console.log(`
|
|
736
|
-
console.log(`
|
|
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.
|
|
740
|
-
console.log(`
|
|
741
|
-
console.log(`
|
|
742
|
-
console.log(`
|
|
743
|
-
console.log(`
|
|
744
|
-
console.log(`
|
|
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
|
|