refactor: extract script snippets to reusable scripts
All checks were successful
Documentation Validation / validate-docs (push) Successful in 9s
All checks were successful
Documentation Validation / validate-docs (push) Successful in 9s
- Create modular scripts for multi-node blockchain setup - Extract 6 core setup scripts from workflow documentation - Add master orchestrator script for complete setup - Replace inline code with script references in workflow - Create comprehensive README for script documentation - Copy scripts to aitbc for cross-node execution - Improve maintainability and reusability of setup process Scripts created: - 01_preflight_setup.sh - System preparation - 02_genesis_authority_setup.sh - Genesis node setup - 03_follower_node_setup.sh - Follower node setup - 04_create_wallet.sh - Wallet creation - 05_send_transaction.sh - Transaction sending - 06_final_verification.sh - System verification - setup_multinode_blockchain.sh - Master orchestrator This makes the workflow cleaner and scripts reusable while maintaining all functionality.
This commit is contained in:
24
scripts/workflow/04_create_wallet.sh
Executable file
24
scripts/workflow/04_create_wallet.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Wallet Creation Script for AITBC
|
||||
# This script creates a new wallet on the aitbc follower node
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
echo "=== AITBC Wallet Creation ==="
|
||||
|
||||
# On aitbc, create a new wallet using AITBC simple wallet CLI
|
||||
echo "1. 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"
|
||||
|
||||
# Verify wallet was created successfully
|
||||
echo "2. Verifying wallet creation..."
|
||||
ssh aitbc "python /opt/aitbc/cli/simple_wallet.py list --format json | jq '.[] | select(.name == \"aitbc-user\")'"
|
||||
|
||||
echo "✅ Wallet created successfully!"
|
||||
echo "Wallet name: aitbc-user"
|
||||
echo "Wallet address: $WALLET_ADDR"
|
||||
echo "Wallet is ready to receive AIT coins."
|
||||
Reference in New Issue
Block a user