# Structure

The three different account types are Normal, AssetIssue, and Contract. An Account contains 7 parameters:

1. **account\_name**: the name for this account – e.g. BillsAccount.
2. **type**: what type of this account is – e.g. 0 (stands for type ‘Normal’).
3. **balance**: balance of this account – e.g. 4213312.
4. **vote**: received votes on this account – e.g. {(“0x1b7w…9xj3”,323), (“0x8djq…j12m”,88),…,(“0x82nd…mx6i”,10001)}.
5. **asset**: other assets expected LGCY in this account – e.g. {, }.
6. **latest\_operation\_time:** the latest operation time of this account.

<br>

Protobuf data structure:

message **Account** {

&#x20;  message **Vote** {

&#x20;     **bytes** vote\_address = **1**;

&#x20;     **int64** vote\_count = **2**;

&#x20;  }

&#x20;  **bytes** accout\_name = **1**;

&#x20;  AccountType type = **2**;

&#x20;  **bytes** address = **3**;

&#x20;  **int64** balance = **4**;

&#x20;  **repeated** Vote votes = **5**;

&#x20;  map<**string**, **int64**>  asset = **6**;

&#x20;  **int64** latest\_operation\_time = **10**;

}

<br>

enum AccountType {

&#x20;  Normal = 0;

&#x20;  AssetIssue = 1;

&#x20;  Contract = 2;

}\ <br>

**BLOCK**<br>

A block typically contains a block header and several transactions.

Protobuf data structure:

message **Block** {

&#x20;  BlockHeader block\_header = **1**;

&#x20;  repeated Transaction transactions = **2**;

}<br>

**BLOCK HEADER**

A block header contains raw\_data, witness\_signature, and blockID.

Protobuf data structure:

message BlockHeader {

&#x20;  message raw {

&#x20;     int64 timestamp = 1;

&#x20;     bytes txTrieRoot = 2;

&#x20;     bytes parentHash = 3;

&#x20;     uint64 number = 4;

&#x20;     uint64 version = 5;

&#x20;     bytes witness\_address = 6;

&#x20;  }

&#x20;  bytes witness\_signature = 2;

&#x20;  bytes blockID = 3;

}

**Raw Data**

Raw data is denoted as **raw\_data** in Protobuf. It contains the raw data of a message, containing 6 parameters:

1. **timestamp**: timestamp of this message – e.g. 1543884429000.
2. **txTrieRoot**: the Merkle Tree’s Root – e.g. 7dacsa…3ed.
3. **parentHash**: the hash of the last block – e.g. 7dacsa…3ed.
4. **number**: the block height – e.g. 4638708.
5. **version**: reserved – e.g. 5.
6. **witness\_address**: the address of the witness packed in this block – e.g. 41928c…4d21

**WITNESS SIGNATURE**

Witness signature is denoted as witness\_signature in Protobuf, which is the signature for this block header from the witness node.

<br>

**BLOCK ID**

Block ID is denoted as blockID in Protobuf. It contains the atomic identification of a block. A Block ID contains 2 parameters:

1. **hash**: the hash of block.
2. **number**: the hash and height of the block.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lgcy-network.gitbook.io/welcome/build/account/structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
