@ghostspeak/cli
Version:
Command-line interface for GhostSpeak AI Agent Commerce Protocol - Production Ready Beta
37 lines (30 loc) âĸ 1.18 kB
text/typescript
import { WalletService } from '../src/services/wallet-service.js';
import { loadConfig } from '../src/utils/config.js';
import chalk from 'chalk';
async function verifyUtils() {
console.log(chalk.cyan('đ Verifying Utility Services...'));
try {
// 1. Config Loading
console.log('1. Verifying Config Loading...');
const config = loadConfig();
console.log('â
Config loaded:', JSON.stringify(config, null, 2));
// 2. Wallet Service
console.log('2. Verifying WalletService...');
const walletService = new WalletService();
try {
const signer = await walletService.getActiveSigner();
if (signer) {
console.log('â
Active wallet found:', signer.address.toString());
} else {
console.log('â ī¸ No active wallet found (expected if fresh install)');
}
} catch (e) {
// It's okay if it fails due to no wallet, as long as the service instantiates
console.log('âšī¸ Wallet check result:', e instanceof Error ? e.message : String(e));
}
} catch (error) {
console.error(chalk.red('â Verification failed:'), error);
process.exit(1);
}
}
void verifyUtils();