Automated maintenance update - Mo 30 Mär 2026 07:52:40 CEST
All checks were successful
CLI Tests / test-cli (push) Successful in 1m30s
Documentation Validation / validate-docs (push) Successful in 26s
Integration Tests / test-service-integration (push) Successful in 1m0s
Python Tests / test-python (push) Successful in 1m16s
Security Scanning / security-scan (push) Successful in 1m3s
All checks were successful
CLI Tests / test-cli (push) Successful in 1m30s
Documentation Validation / validate-docs (push) Successful in 26s
Integration Tests / test-service-integration (push) Successful in 1m0s
Python Tests / test-python (push) Successful in 1m16s
Security Scanning / security-scan (push) Successful in 1m3s
This commit is contained in:
88
cli/requirements.txt
Normal file
88
cli/requirements.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
# AITBC Central Virtual Environment Requirements
|
||||
# This file contains all Python dependencies for AITBC services
|
||||
# Merged from all subdirectory requirements files
|
||||
|
||||
# Core Web Framework
|
||||
fastapi>=0.115.0
|
||||
uvicorn[standard]>=0.32.0
|
||||
gunicorn>=22.0.0
|
||||
|
||||
# Database & ORM
|
||||
sqlalchemy>=2.0.0
|
||||
sqlalchemy[asyncio]>=2.0.47
|
||||
sqlmodel>=0.0.37
|
||||
alembic>=1.18.0
|
||||
aiosqlite>=0.20.0
|
||||
asyncpg>=0.29.0
|
||||
|
||||
# Configuration & Environment
|
||||
pydantic>=2.12.0
|
||||
pydantic-settings>=2.13.0
|
||||
python-dotenv>=1.2.0
|
||||
|
||||
# Rate Limiting & Security
|
||||
slowapi>=0.1.9
|
||||
limits>=5.8.0
|
||||
prometheus-client>=0.24.0
|
||||
|
||||
# HTTP Client & Networking
|
||||
httpx>=0.28.0
|
||||
requests>=2.32.0
|
||||
aiohttp>=3.9.0
|
||||
|
||||
# Cryptocurrency & Blockchain
|
||||
cryptography>=46.0.0
|
||||
pynacl>=1.5.0
|
||||
ecdsa>=0.19.0
|
||||
base58>=2.1.1
|
||||
web3>=6.11.0
|
||||
eth-account>=0.13.0
|
||||
|
||||
# Data Processing
|
||||
pandas>=2.2.0
|
||||
numpy>=1.26.0
|
||||
|
||||
# Development & Testing
|
||||
pytest>=8.0.0
|
||||
pytest-asyncio>=0.24.0
|
||||
black>=24.0.0
|
||||
flake8>=7.0.0
|
||||
|
||||
# CLI Tools
|
||||
click>=8.1.0
|
||||
rich>=13.0.0
|
||||
typer>=0.12.0
|
||||
click-completion>=0.5.2
|
||||
tabulate>=0.9.0
|
||||
colorama>=0.4.4
|
||||
keyring>=23.0.0
|
||||
|
||||
# JSON & Serialization
|
||||
orjson>=3.10.0
|
||||
msgpack>=1.1.0
|
||||
python-multipart>=0.0.6
|
||||
|
||||
# Logging & Monitoring
|
||||
structlog>=24.1.0
|
||||
sentry-sdk>=2.0.0
|
||||
|
||||
# Utilities
|
||||
python-dateutil>=2.9.0
|
||||
pytz>=2024.1
|
||||
schedule>=1.2.0
|
||||
aiofiles>=24.1.0
|
||||
pyyaml>=6.0
|
||||
|
||||
# Async Support
|
||||
asyncio-mqtt>=0.16.0
|
||||
websockets>=13.0.0
|
||||
|
||||
# Image Processing (for AI services)
|
||||
pillow>=10.0.0
|
||||
opencv-python>=4.9.0
|
||||
|
||||
# Additional Dependencies
|
||||
redis>=5.0.0
|
||||
psutil>=5.9.0
|
||||
tenseal
|
||||
web3>=6.11.0
|
||||
@@ -115,13 +115,13 @@ def send_transaction(from_wallet: str, to_address: str, amount: float, fee: floa
|
||||
|
||||
# Create transaction
|
||||
transaction = {
|
||||
"sender": sender_address,
|
||||
"recipient": to_address,
|
||||
"value": int(amount),
|
||||
"from": sender_address,
|
||||
"to": to_address,
|
||||
"amount": int(amount),
|
||||
"fee": int(fee),
|
||||
"nonce": 0, # In real implementation, get current nonce
|
||||
"type": "transfer",
|
||||
"payload": {}
|
||||
"payload": "0x",
|
||||
"chain_id": "ait-mainnet"
|
||||
}
|
||||
|
||||
# Sign transaction (simplified)
|
||||
@@ -131,7 +131,7 @@ def send_transaction(from_wallet: str, to_address: str, amount: float, fee: floa
|
||||
|
||||
# Submit transaction
|
||||
try:
|
||||
response = requests.post(f"{rpc_url}/sendTx", json=transaction)
|
||||
response = requests.post(f"{rpc_url}/rpc/transaction", json=transaction)
|
||||
if response.status_code == 200:
|
||||
result = response.json()
|
||||
print(f"Transaction submitted successfully")
|
||||
@@ -596,10 +596,42 @@ def get_transactions(wallet_name: str, keystore_dir: Path = DEFAULT_KEYSTORE_DIR
|
||||
return []
|
||||
|
||||
|
||||
def get_balance(wallet_name: str, rpc_url: str = DEFAULT_RPC_URL) -> Optional[Dict]:
|
||||
"""Get wallet balance"""
|
||||
try:
|
||||
# Get wallet address
|
||||
wallet_path = DEFAULT_KEYSTORE_DIR / f"{wallet_name}.json"
|
||||
if not wallet_path.exists():
|
||||
print(f"Wallet {wallet_name} not found")
|
||||
return None
|
||||
|
||||
with open(wallet_path) as f:
|
||||
wallet_data = json.load(f)
|
||||
address = wallet_data["address"]
|
||||
|
||||
# Get account info from RPC
|
||||
response = requests.get(f"{rpc_url}/rpc/accounts/{address}")
|
||||
if response.status_code == 200:
|
||||
account_info = response.json()
|
||||
return {
|
||||
"wallet_name": wallet_name,
|
||||
"address": address,
|
||||
"balance": account_info["balance"],
|
||||
"nonce": account_info["nonce"]
|
||||
}
|
||||
else:
|
||||
print(f"Error getting balance: {response.text}")
|
||||
return None
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
return None
|
||||
|
||||
|
||||
def get_chain_info(rpc_url: str = DEFAULT_RPC_URL) -> Optional[Dict]:
|
||||
"""Get blockchain information"""
|
||||
try:
|
||||
response = requests.get(f"{rpc_url}/rpc/info")
|
||||
# Use the head endpoint to get chain info
|
||||
response = requests.get(f"{rpc_url}/rpc/head")
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user