Files
aitbc/scripts/workflow/04_create_wallet.sh
aitbc 893ac594b0
All checks were successful
Integration Tests / test-service-integration (push) Successful in 49s
Documentation Validation / validate-docs (push) Successful in 15s
Security Scanning / security-scan (push) Successful in 1m15s
Python Tests / test-python (push) Successful in 1m18s
fix: correct transaction field mapping and standardize genesis path resolution in PoA consensus
🔧 Transaction Field Mapping:
• Change sender field from "sender" to "from" in transaction parsing
• Change recipient field from nested "payload.to" to direct "to"
• Change value field from nested "payload.amount" to direct "amount"
• Align transaction structure with RPC endpoint format

📁 Genesis File Path Resolution:
• Use standardized /var/lib/aitbc/data/{chain_id}/genesis.json path
• Remove
2026-03-30 08:13:57 +02:00

40 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Wallet Creation Script for AITBC
# This script creates a new wallet on the aitbc follower node using enhanced CLI
set -e # Exit on any error
echo "=== AITBC Wallet Creation (Enhanced CLI) ==="
echo "1. Pre-creation verification..."
echo "=== Current wallets on aitbc ==="
/opt/aitbc/aitbc-cli list
echo "2. Creating new wallet on aitbc..."
/opt/aitbc/aitbc-cli create --name aitbc-user --password-file /var/lib/aitbc/keystore/.password
# Get wallet address using CLI
WALLET_ADDR=$(/opt/aitbc/aitbc-cli balance --name aitbc-user 2>/dev/null | grep "Address:" | awk '{print $2}' || echo "")
echo "New wallet address: $WALLET_ADDR"
# Verify wallet was created successfully using CLI
echo "3. Post-creation verification..."
echo "=== Updated wallet list ==="
/opt/aitbc/aitbc-cli list | grep aitbc-user || echo "Wallet not found in list"
echo "=== New wallet details ==="
/opt/aitbc/aitbc-cli balance --name aitbc-user
echo "=== All wallets summary ==="
/opt/aitbc/aitbc-cli list
echo "4. Cross-node verification..."
echo "=== Network status (local) ==="
/opt/aitbc/aitbc-cli network 2>/dev/null || echo "Network status not available"
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."