Get Account
The Get Account function retrieves an account using its unique wallet address, returning detailed account information encapsulated in the BaseAccount
structure.
This is essential for obtaining ownership details and balances associated with the account address provided.
Method Declaration
async def get_account(self, address: str) -> BaseAccount
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | BaseAccount |
Examples: Python | TypeScript | Rust
Get Account Balance
The Get Account Balance query retrieves the balance of a specified account address for a particular denomination.
This function is crucial for obtaining the current funds available in a wallet within blockchain network.
Method Declaration
async def get_account_balance(
self,
address: str,
denom: str,
) -> bank_query.QueryBalanceResponse
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
denom | query | Denom | true | The denomination of the balance. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Coin |
Get Account Balances
The Get Account Balances method retrieves the balance for a specific wallet address across all currency denominations within the account.
It provides the balance details encapsulated in a response structure, typically including the coin type and respective amounts.
Method Declaration
async def get_account_balances(
self,
address: str,
) -> bank_query.QueryAllBalancesResponse
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | Coin ⛁ | The response containing all account balances. |
Examples: Python | TypeScript | Rust
Get Subaccount
The Get Subaccount
method fetches details of a specific subaccount based on its owner's address and the subaccount's unique number.
It returns information about the subaccount, including its configuration and current status.
Method Declaration
async def get_subaccount(
self,
address: str,
account_number: int,
) -> Optional[subaccount_type.Subaccount]
Unification Plan
- Rust uses
Subaccount
- a wrapper that combinesAddress
withSubaccountNumber
, it's safer to create the same type for Python and TypeScript
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
owner | query | Address | true | The wallet address that owns the subaccount. |
number | query | SubaccountNumber | true | The identifier for the specific subaccount withing the wallet address. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | SubaccountInfo |
Examples: Python | TypeScript | Rust
Get Subaccounts
The Get Subaccounts
function retrieves a comprehensive list of all subaccounts associated with an account, returning structured information encapsulated in a response object.
This aids in managing and viewing details of subaccounts under a main account efficiently.
Method Declaration
async def get_subaccounts(self) -> QuerySubaccountAllResponse
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | SubaccountInfo ⛁ |
Examples: Python | TypeScript | Rust