Fix CLI wallet balance to query blockchain database and add RPC account endpoint

This commit is contained in:
aitbc
2026-04-13 20:49:57 +02:00
parent 4c300d0d4e
commit c53ecd5349
4 changed files with 9 additions and 4 deletions

View File

@@ -314,7 +314,7 @@ async def get_mempool(chain_id: str = None, limit: int = 100) -> Dict[str, Any]:
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=f"Failed to get mempool: {str(e)}")
@router.get("/accounts/{address}", summary="Get account information")
@router.get("/account/{address}", summary="Get account information")
async def get_account(address: str, chain_id: str = None) -> Dict[str, Any]:
"""Get account information"""
chain_id = get_chain_id(chain_id)
@@ -332,6 +332,12 @@ async def get_account(address: str, chain_id: str = None) -> Dict[str, Any]:
}
@router.get("/accounts/{address}", summary="Get account information (alias)")
async def get_account_alias(address: str, chain_id: str = None) -> Dict[str, Any]:
"""Get account information (alias endpoint)"""
return await get_account(address, chain_id)
@router.get("/transactions", summary="Query transactions")
async def query_transactions(
transaction_type: Optional[str] = None,