🔧 CLI Restructuring:
• Rename cli/simple_wallet.py to cli/aitbc_cli.py for better naming consistency
• Update aitbc-cli launcher to call aitbc_cli.py instead of simple_wallet.py
• Maintain all existing wallet functionality and command structure
• Preserve compatibility with /opt/aitbc/cli installation path
57 lines
2.4 KiB
Bash
Executable File
57 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# AITBC Enterprise Automation Script
|
|
# This script demonstrates advanced enterprise features
|
|
|
|
set -e
|
|
|
|
echo "=== AITBC Enterprise Automation Demo ==="
|
|
|
|
# 1. Batch Transaction Processing
|
|
echo "1. Batch Transaction Processing"
|
|
echo "Creating sample batch file..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py sample
|
|
|
|
echo "Processing batch transactions (demo mode)..."
|
|
# Note: This would normally require actual wallet passwords
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py batch --file sample_batch.json --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 2. Mining Operations
|
|
echo -e "\n2. Mining Operations"
|
|
echo "Starting mining with genesis wallet..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine start --wallet aitbc1genesis --threads 2
|
|
|
|
echo "Checking mining status..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine status
|
|
|
|
echo "Stopping mining..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine stop
|
|
|
|
# 3. Marketplace Operations
|
|
echo -e "\n3. Marketplace Operations"
|
|
echo "Listing marketplace items..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py market list
|
|
|
|
echo "Creating marketplace listing (demo)..."
|
|
# Note: This would normally require actual wallet details
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py market create --wallet seller --type 'Digital Art' --price 1000 --description 'Beautiful NFT artwork' --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 4. AI Service Operations
|
|
echo -e "\n4. AI Service Operations"
|
|
echo "Submitting AI compute job (demo)..."
|
|
# Note: This would normally require actual wallet details
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py ai submit --wallet client --type 'text-generation' --prompt 'Generate a poem about blockchain' --payment 50 --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 5. Cross-Node Operations
|
|
echo -e "\n5. Cross-Node Operations"
|
|
echo "Checking network status on aitbc1..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/aitbc_cli.py network
|
|
|
|
echo "Checking network status on aitbc..."
|
|
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/aitbc_cli.py network'
|
|
|
|
echo "Running batch operations on aitbc..."
|
|
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py sample'
|
|
|
|
echo -e "\n✅ Enterprise Automation Demo Completed!"
|
|
echo "All advanced features are ready for production use."
|