Adena Docs
  • Intro
  • â„šī¸User Guide
    • Download
    • Sign In
      • Connect Hardware Wallet
        • Ledger
        • Keystone
      • Set Up Air-gap Account
        • Air-gap Account
      • Advanced options
        • Create New Wallet
        • Import Wallet
        • Sign In With Google
    • Sidebar Menu
      • Account Details
      • Add Account
      • Settings
        • Connected Apps
        • Address Book
        • Change Network
        • Security & Privacy
          • Change Password
          • Reveal Seed Phrase
          • Export Private Key
          • Remove Account
          • Reset Wallet
        • About Adena
    • Wallet
      • Deposit
      • Send
        • Hardware Wallets
        • Air-gap Accounts
        • Advanced Accounts
      • Manage Tokens
    • NFTs
      • Asset Details
      • Manage Collectables
      • Deposit NFT
      • Send NFT
    • Explore
    • History
    • Web3 Interactions
      • Connect to a Dapp
      • Approve a Transaction
      • Add a Network
      • Switch Networks
  • đŸ› ī¸Integrations
    • Detect Wallet
    • Establish Connection
    • Get Account Info
    • Transactions
      • Sign & Send a Transaction
      • Sign Amino
      • Sign a Transaction
    • Network
      • Add a Custom Network
      • Switch Network
    • Detect Events
      • Detect an Account Change
      • Detect a Network Change
    • Use Adena Wallet SDK
      • JavaScript
    • Errors
    • Displaying Your App
    • Sample Usage
  • 📚Resources
    • FAQ
    • Audits
    • Brand Assets
      • Download Logo
      • Style Guide
      • Components
Powered by GitBook
On this page
  1. Integrations

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"
   },
}
PreviousEstablish ConnectionNextTransactions

Last updated 6 months ago

đŸ› ī¸