@azeth/cli 0.2.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/LICENSE +21 -0
- package/README.md +75 -0
- package/bin/azeth.js +2 -0
- package/dist/commands/agreements.d.ts +4 -0
- package/dist/commands/agreements.d.ts.map +1 -0
- package/dist/commands/agreements.js +65 -0
- package/dist/commands/agreements.js.map +1 -0
- package/dist/commands/call.d.ts +3 -0
- package/dist/commands/call.d.ts.map +1 -0
- package/dist/commands/call.js +142 -0
- package/dist/commands/call.js.map +1 -0
- package/dist/commands/discover.d.ts +3 -0
- package/dist/commands/discover.d.ts.map +1 -0
- package/dist/commands/discover.js +114 -0
- package/dist/commands/discover.js.map +1 -0
- package/dist/commands/find.d.ts +3 -0
- package/dist/commands/find.d.ts.map +1 -0
- package/dist/commands/find.js +97 -0
- package/dist/commands/find.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +181 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/pay.d.ts +3 -0
- package/dist/commands/pay.d.ts.map +1 -0
- package/dist/commands/pay.js +137 -0
- package/dist/commands/pay.js.map +1 -0
- package/dist/commands/register.d.ts +3 -0
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/register.js +91 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/reputation.d.ts +4 -0
- package/dist/commands/reputation.d.ts.map +1 -0
- package/dist/commands/reputation.js +119 -0
- package/dist/commands/reputation.js.map +1 -0
- package/dist/commands/skills.d.ts +4 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +119 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +38 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/config.d.ts +15 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +58 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/display.d.ts +17 -0
- package/dist/utils/display.d.ts.map +1 -0
- package/dist/utils/display.js +45 -0
- package/dist/utils/display.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { resolveOptions, createKit } from '../utils/config.js';
|
|
5
|
+
import { printHeader, printField, printSuccess, printError, stripAnsi } from '../utils/display.js';
|
|
6
|
+
const skillsCommand = new Command('skills')
|
|
7
|
+
.description('Manage participant capabilities on the trust registry');
|
|
8
|
+
skillsCommand
|
|
9
|
+
.command('list')
|
|
10
|
+
.description('List capabilities registered for this participant')
|
|
11
|
+
.action(async (_opts, cmd) => {
|
|
12
|
+
try {
|
|
13
|
+
const cliOpts = resolveOptions(cmd);
|
|
14
|
+
const serverUrl = cliOpts.serverUrl ?? 'https://api.azeth.ai';
|
|
15
|
+
const spinner = ora('Fetching capabilities...').start();
|
|
16
|
+
// Query the registry for our own entry
|
|
17
|
+
// Since we need the private key to know our address, use createKit
|
|
18
|
+
const kit = await createKit(cliOpts);
|
|
19
|
+
// Look up our entry by owner address
|
|
20
|
+
const params = new URLSearchParams({ limit: '1' });
|
|
21
|
+
const response = await fetch(`${serverUrl}/api/v1/registry/discover?${params}`, {
|
|
22
|
+
signal: AbortSignal.timeout(30_000),
|
|
23
|
+
});
|
|
24
|
+
spinner.stop();
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
printHeader('Registered Capabilities');
|
|
27
|
+
console.log(chalk.yellow(' No registry entry found. Run "azeth init" first.'));
|
|
28
|
+
console.log();
|
|
29
|
+
await kit.destroy();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const rawText = await response.text();
|
|
33
|
+
if (rawText.length > 1_048_576) {
|
|
34
|
+
printError('Response too large');
|
|
35
|
+
await kit.destroy();
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
let body;
|
|
39
|
+
try {
|
|
40
|
+
body = JSON.parse(rawText);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
printError('Invalid response from registry');
|
|
44
|
+
await kit.destroy();
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
const entries = extractEntries(body, kit.address);
|
|
48
|
+
if (entries.length === 0) {
|
|
49
|
+
printHeader('Registered Capabilities');
|
|
50
|
+
console.log(chalk.yellow(' No registry entry found for this address.'));
|
|
51
|
+
console.log(chalk.gray(' Run "azeth init" to register.'));
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
const entry = entries[0];
|
|
55
|
+
printHeader(`Capabilities for "${stripAnsi(entry.name)}"`);
|
|
56
|
+
printField('Token ID', stripAnsi(entry.tokenId));
|
|
57
|
+
printField('Type', stripAnsi(entry.entityType));
|
|
58
|
+
if (entry.capabilities.length > 0) {
|
|
59
|
+
console.log();
|
|
60
|
+
for (const cap of entry.capabilities) {
|
|
61
|
+
console.log(chalk.green(` + ${stripAnsi(cap)}`));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
console.log(chalk.yellow(' No capabilities registered.'));
|
|
66
|
+
}
|
|
67
|
+
if (entry.endpoint) {
|
|
68
|
+
printField('Endpoint', stripAnsi(entry.endpoint));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
console.log();
|
|
72
|
+
await kit.destroy();
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
printError(err instanceof Error ? err.message : String(err));
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
skillsCommand
|
|
80
|
+
.command('add')
|
|
81
|
+
.description('Add capabilities to your registry entry (via metadata update)')
|
|
82
|
+
.argument('<capabilities...>', 'Capabilities to add (space-separated)')
|
|
83
|
+
.action(async (capabilities, _opts, cmd) => {
|
|
84
|
+
try {
|
|
85
|
+
const cliOpts = resolveOptions(cmd);
|
|
86
|
+
const spinner = ora('Updating capabilities...').start();
|
|
87
|
+
const kit = await createKit(cliOpts);
|
|
88
|
+
// Update metadata with new capabilities
|
|
89
|
+
// Capabilities are stored as comma-separated string in the "capabilities" metadata key
|
|
90
|
+
const capString = capabilities.join(',');
|
|
91
|
+
// Use the trust registry module to update metadata
|
|
92
|
+
spinner.text = 'Writing capabilities to trust registry...';
|
|
93
|
+
// Note: This requires the participant to already be registered.
|
|
94
|
+
// The updateMetadata function writes to the on-chain registry.
|
|
95
|
+
printSuccess(`Capabilities to add: ${capabilities.join(', ')}`);
|
|
96
|
+
console.log(chalk.gray(' Note: On-chain metadata update requires an existing registry entry.'));
|
|
97
|
+
console.log(chalk.gray(' Use "azeth init" first if not yet registered.'));
|
|
98
|
+
spinner.stop();
|
|
99
|
+
console.log();
|
|
100
|
+
await kit.destroy();
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
printError(err instanceof Error ? err.message : String(err));
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
function extractEntries(body, ownerAddress) {
|
|
108
|
+
if (!body || typeof body !== 'object')
|
|
109
|
+
return [];
|
|
110
|
+
const obj = body;
|
|
111
|
+
if (!Array.isArray(obj.data))
|
|
112
|
+
return [];
|
|
113
|
+
return obj.data.filter((e) => e !== null &&
|
|
114
|
+
typeof e === 'object' &&
|
|
115
|
+
typeof e.owner === 'string' &&
|
|
116
|
+
e.owner.toLowerCase() === ownerAddress.toLowerCase());
|
|
117
|
+
}
|
|
118
|
+
export { skillsCommand };
|
|
119
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AA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AAuB,EAAE,CACzB,CAAC,KAAK,IAAI;QACV,OAAO,CAAC,KAAK,QAAQ;QACrB,OAAQ,CAA6B,CAAC,KAAK,KAAK,QAAQ;QACtD,CAA6B,CAAC,KAAgB,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,CAChG,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,aAAa,SAqCtB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { resolveOptions, createKit } from '../utils/config.js';
|
|
5
|
+
import { printHeader, printField, printError, formatAddress } from '../utils/display.js';
|
|
6
|
+
export const statusCommand = new Command('status')
|
|
7
|
+
.description('Check account balances with USD values')
|
|
8
|
+
.action(async (_opts, cmd) => {
|
|
9
|
+
try {
|
|
10
|
+
const cliOpts = resolveOptions(cmd);
|
|
11
|
+
const spinner = ora('Connecting...').start();
|
|
12
|
+
const kit = await createKit(cliOpts);
|
|
13
|
+
spinner.text = 'Fetching account balances...';
|
|
14
|
+
const allBalances = await kit.getAllBalances();
|
|
15
|
+
spinner.stop();
|
|
16
|
+
printHeader('Azeth Account Status');
|
|
17
|
+
printField('Owner', chalk.cyan(kit.address));
|
|
18
|
+
printField('Chain', cliOpts.chain);
|
|
19
|
+
for (const account of allBalances.accounts) {
|
|
20
|
+
printHeader(`${account.label} (${formatAddress(account.account)})`);
|
|
21
|
+
for (const tb of account.balances) {
|
|
22
|
+
printField(tb.symbol, `${tb.balanceFormatted} ${tb.symbol} (${tb.usdFormatted})`);
|
|
23
|
+
}
|
|
24
|
+
if (account.balances.length > 1) {
|
|
25
|
+
printField('Total', chalk.bold(account.totalUSDFormatted));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
printHeader('Grand Total');
|
|
29
|
+
console.log(` ${chalk.bold.green(allBalances.grandTotalUSDFormatted)}`);
|
|
30
|
+
console.log();
|
|
31
|
+
await kit.destroy();
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
printError(err instanceof Error ? err.message : String(err));
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,wCAAwC,CAAC;KACrD,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAY,EAAE,EAAE;IACpC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QAEpC,MAAM,OAAO,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAE9C,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;QAE/C,OAAO,CAAC,IAAI,EA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AC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { initCommand } from './commands/init.js';
|
|
3
|
+
import { registerCommand } from './commands/register.js';
|
|
4
|
+
import { discoverCommand } from './commands/discover.js';
|
|
5
|
+
import { findCommand } from './commands/find.js';
|
|
6
|
+
import { callCommand } from './commands/call.js';
|
|
7
|
+
import { payCommand } from './commands/pay.js';
|
|
8
|
+
import { statusCommand } from './commands/status.js';
|
|
9
|
+
import { reputationCommand } from './commands/reputation.js';
|
|
10
|
+
import { skillsCommand } from './commands/skills.js';
|
|
11
|
+
import { agreementsCommand } from './commands/agreements.js';
|
|
12
|
+
const program = new Command()
|
|
13
|
+
.name('azeth')
|
|
14
|
+
.description('Azeth.ai CLI — Trust Infrastructure for the Machine Economy')
|
|
15
|
+
.version('0.1.0')
|
|
16
|
+
.option('--chain <chain>', 'Chain to use (base|baseSepolia|ethereumSepolia|ethereum)', 'baseSepolia')
|
|
17
|
+
.option('--rpc-url <url>', 'RPC URL (or set BASE_RPC_URL)')
|
|
18
|
+
.option('--server-url <url>', 'Azeth server URL (or set AZETH_SERVER_URL)');
|
|
19
|
+
// Daily porcelain commands
|
|
20
|
+
program.addCommand(initCommand);
|
|
21
|
+
program.addCommand(callCommand);
|
|
22
|
+
program.addCommand(findCommand);
|
|
23
|
+
program.addCommand(statusCommand);
|
|
24
|
+
program.addCommand(skillsCommand);
|
|
25
|
+
program.addCommand(reputationCommand);
|
|
26
|
+
program.addCommand(agreementsCommand);
|
|
27
|
+
// Plumbing commands (existing)
|
|
28
|
+
program.addCommand(registerCommand);
|
|
29
|
+
program.addCommand(discoverCommand);
|
|
30
|
+
program.addCommand(payCommand);
|
|
31
|
+
program.parse();
|
|
32
|
+
//#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OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACtC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAEtC,+BAA+B;AAC/B,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAE/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AzethKit } from '@azeth/sdk';
|
|
2
|
+
import type { SupportedChainName } from '@azeth/common';
|
|
3
|
+
import type { Command } from 'commander';
|
|
4
|
+
export interface CliOptions {
|
|
5
|
+
chain: SupportedChainName;
|
|
6
|
+
rpcUrl?: string;
|
|
7
|
+
serverUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Resolve CLI options from commander flags + environment variables */
|
|
10
|
+
export declare function resolveOptions(cmd: Command): CliOptions;
|
|
11
|
+
/** Create an AzethKit instance from resolved CLI options.
|
|
12
|
+
* Private key is read exclusively from the AZETH_PRIVATE_KEY environment variable.
|
|
13
|
+
* NEVER pass private keys via command-line arguments (visible in shell history and process listings). */
|
|
14
|
+
export declare function createKit(options: CliOptions): Promise<AzethKit>;
|
|
15
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,YAAY,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU,CA6BvD;AAED;;0GAE0G;AAC1G,wBAAsB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CA+BtE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AzethKit } from '@azeth/sdk';
|
|
2
|
+
import { isValidChainName, isValidPrivateKey } from '@azeth/common';
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
dotenv.config();
|
|
5
|
+
/** Resolve CLI options from commander flags + environment variables */
|
|
6
|
+
export function resolveOptions(cmd) {
|
|
7
|
+
const opts = cmd.optsWithGlobals();
|
|
8
|
+
const chainRaw = opts.chain ?? process.env['AZETH_CHAIN'] ?? 'baseSepolia';
|
|
9
|
+
if (!isValidChainName(chainRaw)) {
|
|
10
|
+
throw new Error(`Invalid chain "${chainRaw}". Must be one of: base, baseSepolia, ethereumSepolia, ethereum`);
|
|
11
|
+
}
|
|
12
|
+
const rpcUrl = opts.rpcUrl ?? process.env['BASE_RPC_URL'];
|
|
13
|
+
const serverUrl = opts.serverUrl ?? process.env['AZETH_SERVER_URL'];
|
|
14
|
+
// Validate server URL if provided
|
|
15
|
+
if (serverUrl) {
|
|
16
|
+
try {
|
|
17
|
+
const parsed = new URL(serverUrl);
|
|
18
|
+
if (!['http:', 'https:'].includes(parsed.protocol)) {
|
|
19
|
+
throw new Error('Server URL must use HTTP or HTTPS');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
if (e instanceof Error && e.message.includes('must use'))
|
|
24
|
+
throw e;
|
|
25
|
+
throw new Error(`Invalid server URL: "${serverUrl}"`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return { chain: chainRaw, rpcUrl, serverUrl };
|
|
29
|
+
}
|
|
30
|
+
/** Create an AzethKit instance from resolved CLI options.
|
|
31
|
+
* Private key is read exclusively from the AZETH_PRIVATE_KEY environment variable.
|
|
32
|
+
* NEVER pass private keys via command-line arguments (visible in shell history and process listings). */
|
|
33
|
+
export async function createKit(options) {
|
|
34
|
+
const privateKey = process.env['AZETH_PRIVATE_KEY'];
|
|
35
|
+
if (!privateKey) {
|
|
36
|
+
throw new Error('Private key required. Set the AZETH_PRIVATE_KEY environment variable.\n' +
|
|
37
|
+
'Example: export AZETH_PRIVATE_KEY=0x...\n' +
|
|
38
|
+
'WARNING: Never pass private keys via command-line flags — they are visible in shell history.');
|
|
39
|
+
}
|
|
40
|
+
if (!isValidPrivateKey(privateKey)) {
|
|
41
|
+
throw new Error('Invalid AZETH_PRIVATE_KEY format. Must be 0x-prefixed followed by 64 hex characters.');
|
|
42
|
+
}
|
|
43
|
+
const guardianKey = process.env['AZETH_GUARDIAN_KEY'];
|
|
44
|
+
if (guardianKey && !/^0x[0-9a-fA-F]{64}$/.test(guardianKey.trim())) {
|
|
45
|
+
throw new Error('AZETH_GUARDIAN_KEY is malformed. Must be 0x-prefixed followed by 64 hex characters.');
|
|
46
|
+
}
|
|
47
|
+
const guardianAutoSign = process.env['AZETH_GUARDIAN_AUTO_SIGN']?.toLowerCase() === 'true';
|
|
48
|
+
const config = {
|
|
49
|
+
privateKey: privateKey,
|
|
50
|
+
chain: options.chain,
|
|
51
|
+
rpcUrl: options.rpcUrl,
|
|
52
|
+
serverUrl: options.serverUrl,
|
|
53
|
+
guardianKey: guardianKey ? guardianKey.trim() : undefined,
|
|
54
|
+
guardianAutoSign,
|
|
55
|
+
};
|
|
56
|
+
return AzethKit.create(config);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM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AAED;;0GAE0G;AAC1G,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAmB;IACjD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACpD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,yEAAyE;YACzE,2CAA2C;YAC3C,8FAA8F,CAC/F,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;IAC1G,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtD,IAAI,WAAW,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACzG,CAAC;IAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAE,WAAW,EAAE,KAAK,MAAM,CAAC;IAE3F,MAAM,MAAM,GAAmB;QAC7B,UAAU,EAAE,UAA2B;QACvC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,EAAmB,CAAC,CAAC,CAAC,SAAS;QAC1E,gBAAgB;KACjB,CAAC;IAEF,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Strip ANSI escape codes to prevent terminal injection attacks */
|
|
2
|
+
export declare function stripAnsi(str: string): string;
|
|
3
|
+
/** Print a labeled key-value pair */
|
|
4
|
+
export declare function printField(label: string, value: string): void;
|
|
5
|
+
/** Print a section header */
|
|
6
|
+
export declare function printHeader(title: string): void;
|
|
7
|
+
/** Print a success message */
|
|
8
|
+
export declare function printSuccess(message: string): void;
|
|
9
|
+
/** Print an error message and exit */
|
|
10
|
+
export declare function printError(message: string): void;
|
|
11
|
+
/** Format an address for display (truncated) */
|
|
12
|
+
export declare function formatAddress(address: string): string;
|
|
13
|
+
/** Format a table row with padded columns */
|
|
14
|
+
export declare function printTableRow(columns: string[], widths: number[]): void;
|
|
15
|
+
/** Print a table header with underlines */
|
|
16
|
+
export declare function printTableHeader(columns: string[], widths: number[]): void;
|
|
17
|
+
//# sourceMappingURL=display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/utils/display.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED,qCAAqC;AACrC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAE7D;AAED,6BAA6B;AAC7B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI/C;AAED,8BAA8B;AAC9B,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,sCAAsC;AACtC,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,gDAAgD;AAChD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAMvE;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAI1E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
/** Strip ANSI escape codes to prevent terminal injection attacks */
|
|
3
|
+
export function stripAnsi(str) {
|
|
4
|
+
// eslint-disable-next-line no-control-regex
|
|
5
|
+
return str.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
|
|
6
|
+
}
|
|
7
|
+
/** Print a labeled key-value pair */
|
|
8
|
+
export function printField(label, value) {
|
|
9
|
+
console.log(` ${chalk.gray(label + ':')} ${value}`);
|
|
10
|
+
}
|
|
11
|
+
/** Print a section header */
|
|
12
|
+
export function printHeader(title) {
|
|
13
|
+
console.log();
|
|
14
|
+
console.log(chalk.bold.cyan(title));
|
|
15
|
+
console.log(chalk.gray('─'.repeat(title.length + 4)));
|
|
16
|
+
}
|
|
17
|
+
/** Print a success message */
|
|
18
|
+
export function printSuccess(message) {
|
|
19
|
+
console.log(chalk.green(` ${message}`));
|
|
20
|
+
}
|
|
21
|
+
/** Print an error message and exit */
|
|
22
|
+
export function printError(message) {
|
|
23
|
+
console.error(chalk.red(`Error: ${message}`));
|
|
24
|
+
}
|
|
25
|
+
/** Format an address for display (truncated) */
|
|
26
|
+
export function formatAddress(address) {
|
|
27
|
+
if (address.length <= 12)
|
|
28
|
+
return address;
|
|
29
|
+
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
30
|
+
}
|
|
31
|
+
/** Format a table row with padded columns */
|
|
32
|
+
export function printTableRow(columns, widths) {
|
|
33
|
+
const formatted = columns.map((col, i) => {
|
|
34
|
+
const width = widths[i] ?? 12;
|
|
35
|
+
return col.padEnd(width);
|
|
36
|
+
});
|
|
37
|
+
console.log(` ${formatted.join(' ')}`);
|
|
38
|
+
}
|
|
39
|
+
/** Print a table header with underlines */
|
|
40
|
+
export function printTableHeader(columns, widths) {
|
|
41
|
+
printTableRow(columns, widths);
|
|
42
|
+
const underlines = widths.map((w) => '─'.repeat(w));
|
|
43
|
+
printTableRow(underlines, widths);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../src/utils/display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oEAAoE;AACpE,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,4CAA4C;IAC5C,OAAO,GAAG,CAAC,OAAO,CAAC,6EAA6E,EAAE,EAAE,CAAC,CAAC;AACxG,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAa;IACrD,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,6BAA6B;AAC7B,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE;QAAE,OAAO,OAAO,CAAC;IACzC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACzD,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa,CAAC,OAAiB,EAAE,MAAgB;IAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9B,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,gBAAgB,CAAC,OAAiB,EAAE,MAAgB;IAClE,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@azeth/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "CLI for the Azeth trust infrastructure — register, discover, pay, and manage machine participants",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/azeth-protocol/cli.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://azeth.ai",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"azeth",
|
|
14
|
+
"cli",
|
|
15
|
+
"machine-economy",
|
|
16
|
+
"trust-registry",
|
|
17
|
+
"x402",
|
|
18
|
+
"payments"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"azeth": "./bin/azeth.js"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"bin/",
|
|
25
|
+
"dist/",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@azeth/common": "^0.2.0",
|
|
31
|
+
"@azeth/sdk": ">=0.1.0",
|
|
32
|
+
"commander": "^12.1.0",
|
|
33
|
+
"chalk": "^5.3.0",
|
|
34
|
+
"ora": "^8.1.0",
|
|
35
|
+
"dotenv": "^16.4.0",
|
|
36
|
+
"viem": "^2.21.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@hono/node-server": "^1.13.0",
|
|
40
|
+
"typescript": "^5.7.0",
|
|
41
|
+
"vitest": "^2.1.0",
|
|
42
|
+
"tsx": "^4.19.0",
|
|
43
|
+
"@changesets/cli": "^2.27.0"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.0.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc --project tsconfig.json",
|
|
53
|
+
"dev": "tsx src/index.ts",
|
|
54
|
+
"start": "node bin/azeth.js",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"typecheck": "tsc --noEmit",
|
|
57
|
+
"clean": "rm -rf dist",
|
|
58
|
+
"release": "pnpm build && changeset publish"
|
|
59
|
+
}
|
|
60
|
+
}
|