state_get_account_info

This method returns a JSON representation of an Account from the network. The block_identifier must refer to a Block after the Account's creation, or the method will return an empty response.

This method will use 15 Compute Units.


Reference: Here

Parameters

  1. public_key - string - hex-encoded cryptographic public key, including the algorithm tag prefix

  2. block_identifier - object the block identifier hash or height [BlockIdentifier]

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "state_get_account_info",
  "params": [
    "02037bed6c33ada4c36ecbc68c221f78fbbb468fe9d76864e5d7f3fb42923d92a8a8",
    {
      "Hash": "d0bcdf216a8059aafbc21c565c1fe5a79a7d88d60d264491316df6569ed89308"
    }
  ]
}

Returns

  • api_version - string RPC API version

  • account - object [Account]

    • account_hash - 32-byte hash derived from a supported PublicKey. Its role is to standardize keys that can vary in length

    • action_thresholds - hresholds that have to be met when executing an action of a certain type

      • deployment - integer

      • key_management - integer

    • associated_keys - list of keys granted limited permissions to an Account, for purposes such as multisig

      • account_hash - 32-byte hash derived from a supported PublicKey. Its role is to standardize keys that can vary in length

      • weight - integer

  • merkle_proof - string A merkle proof is a construction created using a merkle trie that allows verification of the associated hashes

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "account": {
      "account_hash": "account-hash-e94daaff79c2ab8d9c31d9c3058d7d0a0dd31204a5638dc1451fa67b2e3fb88c",
      "action_thresholds": {
        "deployment": 1,
        "key_management": 1
      },
      "associated_keys": [
        {
          "account_hash": "account-hash-e94daaff79c2ab8d9c31d9c3058d7d0a0dd31204a5638dc1451fa67b2e3fb88c",
          "weight": 1
        }
      ],
      "main_purse": "uref-09480c3248ef76b603d386f3f4f8a5f87f597d4eaffd475433f861af187ab5db-007",
      "named_keys": []
    },
    "api_version": "1.4.13",
    "merkle_proof": "01000000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625016ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a72536147614625000000003529cde5c621f857f75f3810611eb4af3f998caaa9d4a3413cf799f99c67db0307010000006ef2e0949ac76e55812421f755abe129b6244fe7168b77f47a7253614761462501010102000000006e06000000000074769d28aac597a36a03a932d4b43e4f10bf0403ee5c41dd035102553f5773631200b9e173e8f05361b681513c14e25e3138639eb03232581db7557c9e8dbbc83ce94500226a9a7fe4f2b7b88d5103a4fc7400f02bf89c860c9ccdd56951a2afe9be0e0267006d820fb5676eb2960e15722f7725f3f8f41030078f8b2e44bf0dc03f71b176d6e800dc5ae9805068c5be6da1a90b2528ee85db0609cc0fb4bd60bbd559f497a98b67f500e1e3e846592f4918234647fca39830b7e1e6ad6f5b7a99b39af823d82ba1873d000003000000010186ff500f287e9b53f823ae1582b1fa429dfede28015125fd233a31ca04d5012002015cc42669a55467a1fdf49750772bfc1aed59b9b085558eb81510e9b015a7c83b0301e3cf4a34b1db6bfa58808b686cb8fe21ebe0c1bcbcee522649d2b135fe510fe3"
  }
}
curl https://mainnet.casper.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"id":1,"jsonrpc":"2.0","method":"state_get_account_info","params":[]}'

Last updated