aether-hub 1.0.3 → 1.0.6
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 +1139 -0
- package/index.js +52 -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,54 @@ 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
|
+
},
|
|
185
|
+
tx: {
|
|
186
|
+
description: 'Transaction history — aether tx history --address <addr> [--limit 20] [--json]',
|
|
187
|
+
handler: () => {
|
|
188
|
+
const { walletCommand } = require('./commands/wallet');
|
|
189
|
+
const originalArgv = process.argv;
|
|
190
|
+
process.argv = [...originalArgv.slice(0, 2), 'wallet', 'history', ...originalArgv.slice(3)];
|
|
191
|
+
walletCommand();
|
|
192
|
+
process.argv = originalArgv;
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
history: {
|
|
196
|
+
description: 'Transaction history for an address — alias for tx history',
|
|
197
|
+
handler: () => {
|
|
198
|
+
const { walletCommand } = require('./commands/wallet');
|
|
199
|
+
const originalArgv = process.argv;
|
|
200
|
+
process.argv = [...originalArgv.slice(0, 2), 'wallet', 'history', ...originalArgv.slice(3)];
|
|
201
|
+
walletCommand();
|
|
202
|
+
process.argv = originalArgv;
|
|
203
|
+
},
|
|
204
|
+
},
|
|
156
205
|
validator: {
|
|
157
206
|
description: 'Validator node management',
|
|
158
207
|
handler: () => {
|
|
@@ -220,6 +269,8 @@ Validator CLI v${VERSION}
|
|
|
220
269
|
console.log(' aether-cli monitor # Real-time validator dashboard');
|
|
221
270
|
console.log(' aether-cli validator start # Start validator node');
|
|
222
271
|
console.log(' aether-cli validator status # Check validator status');
|
|
272
|
+
console.log(' aether-cli wallet balance # Query AETH balance');
|
|
273
|
+
console.log(' aether-cli tx history # Show transaction history');
|
|
223
274
|
console.log(' aether-cli --version # Show version');
|
|
224
275
|
console.log('\nDocumentation: https://github.com/jelly-legs-ai/Jelly-legs-unsteady-workshop');
|
|
225
276
|
console.log('Spec: docs/MINING_VALIDATOR_TOOLS.md\n');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aether-hub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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
|
-
|