Skip to Content
API ReferenceAvail Nexus API referenceFetch account state & proof

Fetch Account State & Proof

Use this endpoint to get the state and proof for a specific account against a specific block. Defaults to latest block if no block hash is provided.

Params

  • address: Account address (hex-encoded string)
  • block_hash: Block number to query the account state at (hex-encoded string) (optional)

Response

  • Account state and proof information, including:

** Still need to fill this out **

Example Request

The hex-encoded params must be supplied without the 0x prefix.

CURL
curl "https://dev.nexus.avail.tools/account?app_account_id=31b8a7e9f916616a8ed5eb471a36e018195c319600cbd3bbe726d1c96f03568d"

Sample Response:

{"account": { "statement":[3565896811,2273703815,35198193,3198801644,82397192,115698383,2665578267,2990255432], "state_root":[61,169,180,149,80,170,115,234,7,14,17,89,110,50,100,70,116,95,88,42,69,63,242,180,235,31,42,43,10,37,232,83], "start_nexus_hash":[171,210,245,184,174,12,147,96,28,20,214,127,166,137,132,247,173,51,204,227,46,8,38,99,130,78,209,21,194,66,111,93], "last_proof_height":125671, "height":503 }, "proof":[[57,138,229,89,104,184,73,25,224,115,234,5,140,226,214,164,228,52,181,68,220,138,158,124,39,17,54,68,192,74,76,210],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[30,128,78,239,162,28,77,130,97,248,58,50,7,21,79,133,18,167,93,230,6,34,67,70,80,70,141,218,24,148,2,237],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], "value_hash":[232,203,75,99,182,80,156,206,78,208,244,244,146,103,99,40,48,197,79,114,68,19,167,95,209,50,51,152,178,3,225,116], "nexus_header":{ "parent_hash":[45,148,7,11,7,98,81,171,115,76,113,205,71,107,233,70,134,56,168,8,66,119,195,191,41,12,20,29,215,196,253,78], "prev_state_root":[172,116,232,187,231,149,109,191,98,93,222,199,59,197,230,134,178,175,223,13,51,75,136,250,169,223,215,161,186,249,241,90], "state_root":[172,116,232,187,231,149,109,191,98,93,222,199,59,197,230,134,175,223,13,51,75,136,250,169,223,215,161,186,249,241,90], "tx_root":[110,52,11,156,255,179,122,152,156,165,68,230,187,120,10,44,120,144,29,63,179,55,56,118,133,17,163,6,23,175,160,29], "avail_header_hash":[117,248,152,157,8,59,189,41,217,215,157,159,122,168,255,150,131,171,219,97,31,187,248,131,194,146,146,83,37,26,255,20], "number":144266 }, "account_encoded":"d48b446b8785f787021914f1bea9d6ec04e9480806e56acf9ee17f1bb23bad483da9b49550aa73ea070e11596e326446745f582a453ff2b4eb1f2a2b0a25e853abd2f5b8ae0c93601c14d67fa68984f7ad33cce32e082663824ed115c2426f5d000000000000000000000000000000000000000000000000000000000001eae700000000000000000000000000000000000000000000000000000000000001f7", "proof_hex":["398ae55968b84919e073ea058ce2d6a4e434b544dc8a9e7c27113644c04a4cd2","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","1e804eefa21c4d8261f83a3207154f8512a75de60622434650468dda189402ed","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000"], "value_hash_hex":"e8cb4b63b6509cce4ed0f4f49267632830c54f724413a75fd1323398b203e174", "nexus_state_root_hex":"ac74e8bbe7956dbf625ddec73bc5e686b2afdf0d334b88faa9dfd7a1baf9f15a"}
Last updated on