Some checks failed
CLI Tests / test-cli (push) Failing after 11s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m9s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 2m38s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 27s
Security Scanning / security-scan (push) Has been cancelled
Package Tests / Python package - aitbc-core (push) Successful in 13s
Package Tests / Python package - aitbc-crypto (push) Successful in 9s
Package Tests / Python package - aitbc-sdk (push) Successful in 11s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 8s
Package Tests / JavaScript package - aitbc-token (push) Successful in 27s
Python Tests / test-python (push) Failing after 1m25s
- Route Click commands (agent, ipfs, oracle, etc.) to click_cli module - Add zk, knowledge, bounty, dispute subcommands to agent group - Add AI test submission, power trading, and reputation commands - Add cross-chain transfer and listing commands - Add monitor start/stop/status/alerts commands - Add swarm create/discover/add/distribute/status commands - Update main() to check command type and delegate appropriately - Fix genesis CLI
59 lines
1.4 KiB
Python
59 lines
1.4 KiB
Python
"""Validator commands for AITBC CLI"""
|
|
|
|
import click
|
|
import json
|
|
from utils import output, error, success, warning
|
|
|
|
|
|
@click.group()
|
|
def validator():
|
|
"""Staking validator management commands"""
|
|
pass
|
|
|
|
|
|
@validator.command()
|
|
@click.option("--stake-amount", type=float, required=True, help="Stake amount")
|
|
@click.option("--wallet", required=True, help="Wallet address")
|
|
def init(stake_amount: float, wallet: str):
|
|
"""Initialize validator"""
|
|
import uuid
|
|
output({
|
|
"validator_id": f"validator_{uuid.uuid4().hex[:16]}",
|
|
"wallet": wallet,
|
|
"stake_amount": stake_amount,
|
|
"status": "active"
|
|
})
|
|
|
|
|
|
@validator.command()
|
|
@click.option("--validator-id", required=True, help="Validator ID")
|
|
def status(validator_id: str):
|
|
"""Get validator status"""
|
|
output({
|
|
"validator_id": validator_id,
|
|
"status": "active",
|
|
"stake": 0.0,
|
|
"rewards": 0.0
|
|
})
|
|
|
|
|
|
@validator.command()
|
|
@click.option("--validator-id", required=True, help="Validator ID")
|
|
def deregister(validator_id: str):
|
|
"""Deregister validator"""
|
|
output({
|
|
"validator_id": validator_id,
|
|
"status": "deregistered"
|
|
})
|
|
|
|
|
|
@validator.command()
|
|
@click.option("--validator-id", required=True, help="Validator ID")
|
|
def slashing(validator_id: str):
|
|
"""Get validator slashing status"""
|
|
output({
|
|
"validator_id": validator_id,
|
|
"slashing_history": [],
|
|
"current_penalty": 0.0
|
|
})
|