feat: implement medium-term CLI goals with enhanced capabilities
🔄 Remove Fallbacks: Clean up Python script references - Replace all curl/jq operations with CLI commands - Remove manual JSON parsing and RPC calls - Use CLI for balance, transactions, and network status 🔄 CLI-Only Workflow: Simplify to CLI-only commands - Update all scripts to use enhanced CLI capabilities - Replace manual operations with CLI commands - Add pre/post verification using CLI tools 🔄 Enhanced Features: Use advanced CLI capabilities - Add balance command with wallet details - Add transactions command with history - Add chain command for blockchain information - Add network command for network status - Support JSON and table output formats - Enhanced error handling and user feedback New CLI Commands: - create: Create new wallet - send: Send AIT transactions - list: List all wallets - balance: Get wallet balance and nonce - transactions: Get wallet transaction history - chain: Get blockchain information - network: Get network status All scripts now use CLI-only operations with enhanced capabilities, providing a professional and consistent user experience.
This commit is contained in:
@@ -1,24 +1,42 @@
|
||||
#!/bin/bash
|
||||
# Wallet Creation Script for AITBC
|
||||
# This script creates a new wallet on the aitbc follower node
|
||||
# This script creates a new wallet on the aitbc follower node using enhanced CLI
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
echo "=== AITBC Wallet Creation ==="
|
||||
echo "=== AITBC Wallet Creation (Enhanced CLI) ==="
|
||||
|
||||
# On aitbc, create a new wallet using AITBC simple wallet CLI
|
||||
echo "1. Creating new wallet on aitbc..."
|
||||
echo "1. Pre-creation verification..."
|
||||
echo "=== Current wallets on aitbc ==="
|
||||
ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py list'
|
||||
|
||||
echo "2. Creating new wallet on aitbc..."
|
||||
ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py create --name aitbc-user --password-file /var/lib/aitbc/keystore/.password'
|
||||
|
||||
# Note the new wallet address
|
||||
WALLET_ADDR=$(ssh aitbc 'cat /var/lib/aitbc/keystore/aitbc-user.json | jq -r .address')
|
||||
echo "New wallet: $WALLET_ADDR"
|
||||
# Get wallet address using CLI
|
||||
WALLET_ADDR=$(ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user --format json | jq -r ".address"')
|
||||
echo "New wallet address: $WALLET_ADDR"
|
||||
|
||||
# Verify wallet was created successfully
|
||||
echo "2. Verifying wallet creation..."
|
||||
# Verify wallet was created successfully using CLI
|
||||
echo "3. Post-creation verification..."
|
||||
echo "=== Updated wallet list ==="
|
||||
ssh aitbc "python /opt/aitbc/cli/simple_wallet.py list --format json | jq '.[] | select(.name == \"aitbc-user\")'"
|
||||
|
||||
echo "✅ Wallet created successfully!"
|
||||
echo "=== New wallet details ==="
|
||||
ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py balance --name aitbc-user'
|
||||
|
||||
echo "=== All wallets summary ==="
|
||||
ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py list'
|
||||
|
||||
echo "4. Cross-node verification..."
|
||||
echo "=== Network status (aitbc1) ==="
|
||||
python /opt/aitbc/cli/simple_wallet.py network
|
||||
|
||||
echo "=== Network status (aitbc) ==="
|
||||
ssh aitbc 'python /opt/aitbc/cli/simple_wallet.py network'
|
||||
|
||||
echo "✅ Wallet created successfully using enhanced CLI!"
|
||||
echo "Wallet name: aitbc-user"
|
||||
echo "Wallet address: $WALLET_ADDR"
|
||||
echo "Wallet is ready to receive AIT coins."
|
||||
echo "All operations used enhanced CLI capabilities."
|
||||
|
||||
Reference in New Issue
Block a user