aether-hub 1.0.3 → 1.0.5
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/sdk.js +537 -381
- package/commands/wallet.js +993 -0
- package/index.js +30 -1
- package/package.json +3 -2
package/index.js
CHANGED
|
@@ -13,10 +13,11 @@ const { init } = require('./commands/init');
|
|
|
13
13
|
const { monitorLoop } = require('./commands/monitor');
|
|
14
14
|
const { logsCommand } = require('./commands/logs');
|
|
15
15
|
const { sdkCommand } = require('./commands/sdk');
|
|
16
|
+
const { walletCommand } = require('./commands/wallet');
|
|
16
17
|
const readline = require('readline');
|
|
17
18
|
|
|
18
19
|
// CLI version
|
|
19
|
-
const VERSION = '1.0.
|
|
20
|
+
const VERSION = '1.0.4';
|
|
20
21
|
|
|
21
22
|
// Parse args early to support flags on commands
|
|
22
23
|
function getCommandArgs() {
|
|
@@ -153,6 +154,34 @@ const COMMANDS = {
|
|
|
153
154
|
description: 'Aether SDK download links and install instructions (JS, Rust, FLUX/ATH tokens)',
|
|
154
155
|
handler: sdkCommand,
|
|
155
156
|
},
|
|
157
|
+
wallet: {
|
|
158
|
+
description: 'Wallet management — create, import, list, default, connect, balance, stake, transfer',
|
|
159
|
+
handler: () => {
|
|
160
|
+
const { walletCommand } = require('./commands/wallet');
|
|
161
|
+
walletCommand();
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
stake: {
|
|
165
|
+
description: 'Stake AETH to a validator — aether stake --validator <addr> --amount <aeth>',
|
|
166
|
+
handler: () => {
|
|
167
|
+
const { walletCommand } = require('./commands/wallet');
|
|
168
|
+
// Intercept argv so walletCommand receives 'stake' as the subcmd
|
|
169
|
+
const originalArgv = process.argv;
|
|
170
|
+
process.argv = [...originalArgv.slice(0, 2), 'wallet', 'stake', ...originalArgv.slice(3)];
|
|
171
|
+
walletCommand();
|
|
172
|
+
process.argv = originalArgv;
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
transfer: {
|
|
176
|
+
description: 'Transfer AETH to another address — aether transfer --to <addr> --amount <aeth>',
|
|
177
|
+
handler: () => {
|
|
178
|
+
const { walletCommand } = require('./commands/wallet');
|
|
179
|
+
const originalArgv = process.argv;
|
|
180
|
+
process.argv = [...originalArgv.slice(0, 2), 'wallet', 'transfer', ...originalArgv.slice(3)];
|
|
181
|
+
walletCommand();
|
|
182
|
+
process.argv = originalArgv;
|
|
183
|
+
},
|
|
184
|
+
},
|
|
156
185
|
validator: {
|
|
157
186
|
description: 'Validator node management',
|
|
158
187
|
handler: () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aether-hub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "AeTHer Validator CLI — tiered validators (Full/Lite/Observer), system checks, onboarding, and node management",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
],
|
|
45
45
|
"preferGlobal": true,
|
|
46
46
|
"dependencies": {
|
|
47
|
+
"bip32": "^5.0.1",
|
|
48
|
+
"bip39": "^3.1.0",
|
|
47
49
|
"bs58": "^6.0.0",
|
|
48
50
|
"tweetnacl": "^1.0.3"
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
|
-
|