Get Account Info

Once your web application successfully connects to Adena, in most cases, you would first want to get information about the connected account. Use the getAccount method to receive a series of data about the account including its address, balance, public key, account number, and sequence.

Code

adena.GetAccount();

Params

Key
Type
Description

-

-

-

Response

Key
Type
Description

code

number

Numeric result code

status

string

Returns success or failure

type

string

Response type

message

string

Descriptive message of the result

data

object

Account Model

Account Model

Key
Type
Description

accountNumber

string

Account number

address

string

Account address

coins

string

Account balance

chainId

string

Current chain's Chain ID

sequence

string

Number of transactions signed by the account

status

string

Returns ACTIVE or IN_ACTIVE

publicKey.@type

string

Public key type

publicKey.value

string

Public key value

Sample Request

adena.GetAccount()

Sample Response

{
   "code": 0,
   "status": "success",
   "type": "GET_ACCOUNT",
   "message": "Get account.",
   "data": {
      //status of the account; inactive if never used
      "status": "ACTIVE",
      //account address
      "address": "g1fnakf9vrd6uqn8qdmp88yam4p0ngy572answ9f",
      //account balance
      "coins": "3618115104ugnot",
      "public_key": {
        //key generation algorithm
        "@type": "/tm.PubKeySecp256k1",
        //public key value
        "value": "A3cWVULHSHC1mwK8o1vfJHKfNMvLEvKU/sHPQoFWRoey"
      },
      //account number
      "account_number": "5547",
      //nonce
      "sequence": "23"
      "chainId": "test3"
   },
}

Last updated