Accounts
Every address on XYZ Chain has an associated account that tracks its sequence number (nonce), public key, and account number. These are needed for signing transactions.Get Account
Retrieve account details for an address.Response
Response
Key Fields
| Field | Description |
|---|---|
address | The bech32-encoded address (prefix xyz) |
pub_key | The public key, set after the account’s first transaction |
account_number | Unique identifier assigned when the account first receives funds. Used for transaction signing. |
sequence | Transaction counter (nonce). Increments with each successful transaction. Used to prevent replay attacks. |
pub_key is null for accounts that have received tokens but never sent a transaction. The public key is recorded on-chain with the first outgoing transaction.Using Account Info for Signing
When building a transaction, you needaccount_number and sequence from this endpoint:
sequence is stale (another transaction was confirmed since your query), the transaction will fail with code: 32 (account sequence mismatch). Re-query and retry.
List All Accounts
Returns all accounts on the chain. Paginated.Account Types
@type | Description |
|---|---|
/cosmos.auth.v1beta1.BaseAccount | Standard user account |
/cosmos.auth.v1beta1.ModuleAccount | System module account (e.g., bridge, distribution) |
/cosmos.vesting.v1beta1.ContinuousVestingAccount | Account with vesting schedule |