# Protocol Documentation
This reference is auto-generated from [aergoio/aergo-protobuf](https://github.com/aergoio/aergo-protobuf).
- [rpc.proto](#rpc.proto)
- [AergoRPCService](#types.AergoRPCService)
- [NodeState](#NodeState)
- [Metric](#Metric)
- [Blockchain](#Blockchain)
- [GetChainInfo](#GetChainInfo)
- [ChainStat](#ChainStat)
- [ListBlockHeaders](#ListBlockHeaders)
- [ListBlockMetadata](#ListBlockMetadata)
- [ListBlockStream](#ListBlockStream)
- [ListBlockMetadataStream](#ListBlockMetadataStream)
- [GetBlock](#GetBlock)
- [GetBlockMetadata](#GetBlockMetadata)
- [GetBlockBody](#GetBlockBody)
- [GetTX](#GetTX)
- [GetBlockTX](#GetBlockTX)
- [GetReceipt](#GetReceipt)
- [GetABI](#GetABI)
- [SendTX](#SendTX)
- [SignTX](#SignTX)
- [VerifyTX](#VerifyTX)
- [CommitTX](#CommitTX)
- [GetState](#GetState)
- [GetStateAndProof](#GetStateAndProof)
- [CreateAccount](#CreateAccount)
- [GetAccounts](#GetAccounts)
- [LockAccount](#LockAccount)
- [UnlockAccount](#UnlockAccount)
- [ImportAccount](#ImportAccount)
- [ExportAccount](#ExportAccount)
- [QueryContract](#QueryContract)
- [QueryContractState](#QueryContractState)
- [GetPeers](#GetPeers)
- [GetVotes](#GetVotes)
- [GetAccountVotes](#GetAccountVotes)
- [GetStaking](#GetStaking)
- [GetNameInfo](#GetNameInfo)
- [ListEventStream](#ListEventStream)
- [ListEvents](#ListEvents)
- [GetServerInfo](#GetServerInfo)
- [GetConsensusInfo](#GetConsensusInfo)
- [ChangeMembership](#ChangeMembership)
- [GetEnterpriseConfig](#GetEnterpriseConfig)
- [GetConfChangeProgress](#GetConfChangeProgress)
- [AccountAddress](#types.AccountAddress)
- [AccountAndRoot](#types.AccountAndRoot)
- [AccountVoteInfo](#types.AccountVoteInfo)
- [BlockBodyPaged](#types.BlockBodyPaged)
- [BlockBodyParams](#types.BlockBodyParams)
- [BlockHeaderList](#types.BlockHeaderList)
- [BlockMetadata](#types.BlockMetadata)
- [BlockMetadataList](#types.BlockMetadataList)
- [BlockchainStatus](#types.BlockchainStatus)
- [ChainId](#types.ChainId)
- [ChainInfo](#types.ChainInfo)
- [ChainStats](#types.ChainStats)
- [CommitResult](#types.CommitResult)
- [CommitResultList](#types.CommitResultList)
- [ConfigItem](#types.ConfigItem)
- [ConfigItem.PropsEntry](#types.ConfigItem.PropsEntry)
- [ConsensusInfo](#types.ConsensusInfo)
- [Empty](#types.Empty)
- [EnterpriseConfig](#types.EnterpriseConfig)
- [EnterpriseConfigKey](#types.EnterpriseConfigKey)
- [EventList](#types.EventList)
- [ImportFormat](#types.ImportFormat)
- [Input](#types.Input)
- [KeyParams](#types.KeyParams)
- [ListParams](#types.ListParams)
- [Name](#types.Name)
- [NameInfo](#types.NameInfo)
- [NodeReq](#types.NodeReq)
- [Output](#types.Output)
- [PageParams](#types.PageParams)
- [Peer](#types.Peer)
- [PeerList](#types.PeerList)
- [PeersParams](#types.PeersParams)
- [Personal](#types.Personal)
- [ServerInfo](#types.ServerInfo)
- [ServerInfo.ConfigEntry](#types.ServerInfo.ConfigEntry)
- [ServerInfo.StatusEntry](#types.ServerInfo.StatusEntry)
- [SingleBytes](#types.SingleBytes)
- [SingleString](#types.SingleString)
- [Staking](#types.Staking)
- [VerifyResult](#types.VerifyResult)
- [Vote](#types.Vote)
- [VoteInfo](#types.VoteInfo)
- [VoteList](#types.VoteList)
- [VoteParams](#types.VoteParams)
- [CommitStatus](#types.CommitStatus)
- [VerifyStatus](#types.VerifyStatus)
- [blockchain.proto](#blockchain.proto)
- [ABI](#types.ABI)
- [AccountProof](#types.AccountProof)
- [Block](#types.Block)
- [BlockBody](#types.BlockBody)
- [BlockHeader](#types.BlockHeader)
- [ContractVarProof](#types.ContractVarProof)
- [Event](#types.Event)
- [FilterInfo](#types.FilterInfo)
- [FnArgument](#types.FnArgument)
- [Function](#types.Function)
- [Proposal](#types.Proposal)
- [Query](#types.Query)
- [Receipt](#types.Receipt)
- [State](#types.State)
- [StateQuery](#types.StateQuery)
- [StateQueryProof](#types.StateQueryProof)
- [StateVar](#types.StateVar)
- [Tx](#types.Tx)
- [TxBody](#types.TxBody)
- [TxIdx](#types.TxIdx)
- [TxInBlock](#types.TxInBlock)
- [TxList](#types.TxList)
- [TxType](#types.TxType)
- [metric.proto](#metric.proto)
- [Metrics](#types.Metrics)
- [MetricsRequest](#types.MetricsRequest)
- [PeerMetric](#types.PeerMetric)
- [MetricType](#types.MetricType)
- [Scalar Value Types](#scalar-value-types)
Top
## rpc.proto
### AergoRPCService
AergoRPCService is the main RPC service providing endpoints to interact
with the node and blockchain. If not otherwise noted, methods are unary requests.
#### NodeState
*Request Type:* [NodeReq](#types.NodeReq)
*Response Type:* [SingleBytes](#types.SingleBytes)
Returns the current state of this node
#### Metric
*Request Type:* [MetricsRequest](#types.MetricsRequest)
*Response Type:* [Metrics](#types.Metrics)
Returns node metrics according to request
#### Blockchain
*Request Type:* [Empty](#types.Empty)
*Response Type:* [BlockchainStatus](#types.BlockchainStatus)
Returns current blockchain status (best block's height and hash)
#### GetChainInfo
*Request Type:* [Empty](#types.Empty)
*Response Type:* [ChainInfo](#types.ChainInfo)
Returns current blockchain's basic information
#### ChainStat
*Request Type:* [Empty](#types.Empty)
*Response Type:* [ChainStats](#types.ChainStats)
Returns current chain statistics
#### ListBlockHeaders
*Request Type:* [ListParams](#types.ListParams)
*Response Type:* [BlockHeaderList](#types.BlockHeaderList)
Returns list of Blocks without body according to request
#### ListBlockMetadata
*Request Type:* [ListParams](#types.ListParams)
*Response Type:* [BlockMetadataList](#types.BlockMetadataList)
Returns list of block metadata (hash, header, and number of transactions) according to request
#### ListBlockStream
*Request Type:* [Empty](#types.Empty)
*Response Type:* [Block](#types.Block)
Returns a stream of new blocks as they get added to the blockchain
#### ListBlockMetadataStream
*Request Type:* [Empty](#types.Empty)
*Response Type:* [BlockMetadata](#types.BlockMetadata)
Returns a stream of new block's metadata as they get added to the blockchain
#### GetBlock
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [Block](#types.Block)
Return a single block incl. header and body, queried by hash or number
#### GetBlockMetadata
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [BlockMetadata](#types.BlockMetadata)
Return a single block's metdata (hash, header, and number of transactions), queried by hash or number
#### GetBlockBody
*Request Type:* [BlockBodyParams](#types.BlockBodyParams)
*Response Type:* [BlockBodyPaged](#types.BlockBodyPaged)
Return a single block's body, queried by hash or number and list parameters
#### GetTX
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [Tx](#types.Tx)
Return a single transaction, queried by transaction hash
#### GetBlockTX
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [TxInBlock](#types.TxInBlock)
Return information about transaction in block, queried by transaction hash
#### GetReceipt
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [Receipt](#types.Receipt)
Return transaction receipt, queried by transaction hash
#### GetABI
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [ABI](#types.ABI)
Return ABI stored at contract address
#### SendTX
*Request Type:* [Tx](#types.Tx)
*Response Type:* [CommitResult](#types.CommitResult)
Sign and send a transaction from an unlocked account
#### SignTX
*Request Type:* [Tx](#types.Tx)
*Response Type:* [Tx](#types.Tx)
Sign transaction with unlocked account
#### VerifyTX
*Request Type:* [Tx](#types.Tx)
*Response Type:* [VerifyResult](#types.VerifyResult)
Verify validity of transaction
#### CommitTX
*Request Type:* [TxList](#types.TxList)
*Response Type:* [CommitResultList](#types.CommitResultList)
Commit a signed transaction
#### GetState
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [State](#types.State)
Return state of account
#### GetStateAndProof
*Request Type:* [AccountAndRoot](#types.AccountAndRoot)
*Response Type:* [AccountProof](#types.AccountProof)
Return state of account, including merkle proof
#### CreateAccount
*Request Type:* [Personal](#types.Personal)
*Response Type:* [Account](#types.Account)
Create a new account in this node
#### GetAccounts
*Request Type:* [Empty](#types.Empty)
*Response Type:* [AccountList](#types.AccountList)
Return list of accounts in this node
#### LockAccount
*Request Type:* [Personal](#types.Personal)
*Response Type:* [Account](#types.Account)
Lock account in this node
#### UnlockAccount
*Request Type:* [Personal](#types.Personal)
*Response Type:* [Account](#types.Account)
Unlock account in this node
#### ImportAccount
*Request Type:* [ImportFormat](#types.ImportFormat)
*Response Type:* [Account](#types.Account)
Import account to this node
#### ExportAccount
*Request Type:* [Personal](#types.Personal)
*Response Type:* [SingleBytes](#types.SingleBytes)
Export account stored in this node
#### QueryContract
*Request Type:* [Query](#types.Query)
*Response Type:* [SingleBytes](#types.SingleBytes)
Query a contract method
#### QueryContractState
*Request Type:* [StateQuery](#types.StateQuery)
*Response Type:* [StateQueryProof](#types.StateQueryProof)
Query contract state
#### GetPeers
*Request Type:* [PeersParams](#types.PeersParams)
*Response Type:* [PeerList](#types.PeerList)
Return list of peers of this node and their state
#### GetVotes
*Request Type:* [VoteParams](#types.VoteParams)
*Response Type:* [VoteList](#types.VoteList)
Return result of vote
#### GetAccountVotes
*Request Type:* [AccountAddress](#types.AccountAddress)
*Response Type:* [AccountVoteInfo](#types.AccountVoteInfo)
Return staking, voting info for account
#### GetStaking
*Request Type:* [AccountAddress](#types.AccountAddress)
*Response Type:* [Staking](#types.Staking)
Return staking information
#### GetNameInfo
*Request Type:* [Name](#types.Name)
*Response Type:* [NameInfo](#types.NameInfo)
Return name information
#### ListEventStream
*Request Type:* [FilterInfo](#types.FilterInfo)
*Response Type:* [Event](#types.Event)
Returns a stream of event as they get added to the blockchain
#### ListEvents
*Request Type:* [FilterInfo](#types.FilterInfo)
*Response Type:* [EventList](#types.EventList)
Returns list of event
#### GetServerInfo
*Request Type:* [KeyParams](#types.KeyParams)
*Response Type:* [ServerInfo](#types.ServerInfo)
Returns configs and statuses of server
#### GetConsensusInfo
*Request Type:* [Empty](#types.Empty)
*Response Type:* [ConsensusInfo](#types.ConsensusInfo)
Returns status of consensus and bps
#### ChangeMembership
*Request Type:* [MembershipChange](#types.MembershipChange)
*Response Type:* [MembershipChangeReply](#types.MembershipChangeReply)
Add & remove member of raft cluster
#### GetEnterpriseConfig
*Request Type:* [EnterpriseConfigKey](#types.EnterpriseConfigKey)
*Response Type:* [EnterpriseConfig](#types.EnterpriseConfig)
Returns enterprise config
#### GetConfChangeProgress
*Request Type:* [SingleBytes](#types.SingleBytes)
*Response Type:* [ConfChangeProgress](#types.ConfChangeProgress)
Return a status of changeCluster enterprise tx, queried by requestID
### AccountAddress
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [bytes](#bytes) | | |
### AccountAndRoot
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Account | [bytes](#bytes) | | |
| Root | [bytes](#bytes) | | |
| Compressed | [bool](#bool) | | |
### AccountVoteInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| staking | [Staking](#types.Staking) | | |
| voting | [VoteInfo](#types.VoteInfo) | repeated | |
### BlockBodyPaged
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| total | [uint32](#uint32) | | |
| offset | [uint32](#uint32) | | |
| size | [uint32](#uint32) | | |
| body | [BlockBody](#types.BlockBody) | | |
### BlockBodyParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hashornumber | [bytes](#bytes) | | |
| paging | [PageParams](#types.PageParams) | | |
### BlockHeaderList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blocks | [Block](#types.Block) | repeated | |
### BlockMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| header | [BlockHeader](#types.BlockHeader) | | |
| txcount | [int32](#int32) | | |
| size | [int64](#int64) | | blocksize in bytes |
### BlockMetadataList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blocks | [BlockMetadata](#types.BlockMetadata) | repeated | |
### BlockchainStatus
BlockchainStatus is current status of blockchain
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| best_block_hash | [bytes](#bytes) | | |
| best_height | [uint64](#uint64) | | |
| consensus_info | [string](#string) | | |
| best_chain_id_hash | [bytes](#bytes) | | |
| chain_info | [ChainInfo](#types.ChainInfo) | | |
### ChainId
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| magic | [string](#string) | | |
| public | [bool](#bool) | | |
| mainnet | [bool](#bool) | | |
| consensus | [string](#string) | | |
| version | [int32](#int32) | | |
### ChainInfo
ChainInfo returns chain configuration
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [ChainId](#types.ChainId) | | |
| bpNumber | [uint32](#uint32) | | |
| maxblocksize | [uint64](#uint64) | | |
| maxtokens | [bytes](#bytes) | | |
| stakingminimum | [bytes](#bytes) | | |
| totalstaking | [bytes](#bytes) | | |
| gasprice | [bytes](#bytes) | | |
| nameprice | [bytes](#bytes) | | |
| totalvotingpower | [bytes](#bytes) | | |
| votingreward | [bytes](#bytes) | | |
### ChainStats
ChainStats corresponds to a chain statistics report.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| report | [string](#string) | | |
### CommitResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| error | [CommitStatus](#types.CommitStatus) | | |
| detail | [string](#string) | | |
### CommitResultList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| results | [CommitResult](#types.CommitResult) | repeated | |
### ConfigItem
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| props | [ConfigItem.PropsEntry](#types.ConfigItem.PropsEntry) | repeated | |
### ConfigItem.PropsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [string](#string) | | |
### ConsensusInfo
info and bps is json string
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [string](#string) | | |
| info | [string](#string) | | |
| bps | [string](#string) | repeated | |
### Empty
### EnterpriseConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| on | [bool](#bool) | | |
| values | [string](#string) | repeated | |
### EnterpriseConfigKey
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
### EventList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| events | [Event](#types.Event) | repeated | |
### ImportFormat
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| wif | [SingleBytes](#types.SingleBytes) | | |
| oldpass | [string](#string) | | |
| newpass | [string](#string) | | |
### Input
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| address | [bytes](#bytes) | repeated | |
| value | [bytes](#bytes) | | |
| script | [bytes](#bytes) | | |
### KeyParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | repeated | |
### ListParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| height | [uint64](#uint64) | | |
| size | [uint32](#uint32) | | |
| offset | [uint32](#uint32) | | |
| asc | [bool](#bool) | | |
### Name
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| blockNo | [uint64](#uint64) | | |
### NameInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [Name](#types.Name) | | |
| owner | [bytes](#bytes) | | |
| destination | [bytes](#bytes) | | |
### NodeReq
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| timeout | [bytes](#bytes) | | |
| component | [bytes](#bytes) | | |
### Output
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| index | [uint32](#uint32) | | |
| address | [bytes](#bytes) | | |
| value | [bytes](#bytes) | | |
| script | [bytes](#bytes) | | |
### PageParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| offset | [uint32](#uint32) | | |
| size | [uint32](#uint32) | | |
### Peer
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| address | [PeerAddress](#types.PeerAddress) | | |
| bestblock | [NewBlockNotice](#types.NewBlockNotice) | | |
| state | [int32](#int32) | | |
| hidden | [bool](#bool) | | |
| lashCheck | [int64](#int64) | | |
| selfpeer | [bool](#bool) | | |
| version | [string](#string) | | |
| certificates | [AgentCertificate](#types.AgentCertificate) | repeated | |
| acceptedRole | [PeerRole](#types.PeerRole) | | |
### PeerList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| peers | [Peer](#types.Peer) | repeated | |
### PeersParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| noHidden | [bool](#bool) | | |
| showSelf | [bool](#bool) | | |
### Personal
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| passphrase | [string](#string) | | |
| account | [Account](#types.Account) | | |
### ServerInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| status | [ServerInfo.StatusEntry](#types.ServerInfo.StatusEntry) | repeated | |
| config | [ServerInfo.ConfigEntry](#types.ServerInfo.ConfigEntry) | repeated | |
### ServerInfo.ConfigEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [ConfigItem](#types.ConfigItem) | | |
### ServerInfo.StatusEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [string](#string) | | |
### SingleBytes
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [bytes](#bytes) | | |
### SingleString
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [string](#string) | | |
### Staking
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| amount | [bytes](#bytes) | | |
| when | [uint64](#uint64) | | |
### VerifyResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| tx | [Tx](#types.Tx) | | |
| error | [VerifyStatus](#types.VerifyStatus) | | |
### Vote
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| candidate | [bytes](#bytes) | | |
| amount | [bytes](#bytes) | | |
### VoteInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
| candidates | [string](#string) | repeated | |
| amount | [string](#string) | | |
### VoteList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| votes | [Vote](#types.Vote) | repeated | |
| id | [string](#string) | | |
### VoteParams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
| count | [uint32](#uint32) | | |
### CommitStatus
| Name | Number | Description |
| ---- | ------ | ----------- |
| TX_OK | 0 | |
| TX_NONCE_TOO_LOW | 1 | |
| TX_ALREADY_EXISTS | 2 | |
| TX_INVALID_HASH | 3 | |
| TX_INVALID_SIGN | 4 | |
| TX_INVALID_FORMAT | 5 | |
| TX_INSUFFICIENT_BALANCE | 6 | |
| TX_HAS_SAME_NONCE | 7 | |
| TX_INTERNAL_ERROR | 9 | |
### VerifyStatus
| Name | Number | Description |
| ---- | ------ | ----------- |
| VERIFY_STATUS_OK | 0 | |
| VERIFY_STATUS_SIGN_NOT_MATCH | 1 | |
| VERIFY_STATUS_INVALID_HASH | 2 | TODO: not yet impl |
Top
## blockchain.proto
### ABI
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [string](#string) | | |
| language | [string](#string) | | |
| functions | [Function](#types.Function) | repeated | |
| state_variables | [StateVar](#types.StateVar) | repeated | |
### AccountProof
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| state | [State](#types.State) | | |
| inclusion | [bool](#bool) | | |
| key | [bytes](#bytes) | | |
| proofKey | [bytes](#bytes) | | |
| proofVal | [bytes](#bytes) | | |
| bitmap | [bytes](#bytes) | | |
| height | [uint32](#uint32) | | |
| auditPath | [bytes](#bytes) | repeated | |
### Block
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| header | [BlockHeader](#types.BlockHeader) | | |
| body | [BlockBody](#types.BlockBody) | | |
### BlockBody
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txs | [Tx](#types.Tx) | repeated | |
### BlockHeader
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| chainID | [bytes](#bytes) | | chain identifier |
| prevBlockHash | [bytes](#bytes) | | hash of previous block |
| blockNo | [uint64](#uint64) | | block number |
| timestamp | [int64](#int64) | | block creation time stamp |
| blocksRootHash | [bytes](#bytes) | | hash of root of block merkle tree |
| txsRootHash | [bytes](#bytes) | | hash of root of transaction merkle tree |
| receiptsRootHash | [bytes](#bytes) | | hash of root of receipt merkle tree |
| confirms | [uint64](#uint64) | | number of blocks this block is able to confirm |
| pubKey | [bytes](#bytes) | | block producer's public key |
| coinbaseAccount | [bytes](#bytes) | | address of account to receive fees |
| sign | [bytes](#bytes) | | block producer's signature of BlockHeader |
| consensus | [bytes](#bytes) | | consensus meta |
### ContractVarProof
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [bytes](#bytes) | | |
| inclusion | [bool](#bool) | | |
| proofKey | [bytes](#bytes) | | |
| proofVal | [bytes](#bytes) | | |
| bitmap | [bytes](#bytes) | | |
| height | [uint32](#uint32) | | |
| auditPath | [bytes](#bytes) | repeated | |
| key | [bytes](#bytes) | | |
### Event
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractAddress | [bytes](#bytes) | | |
| eventName | [string](#string) | | |
| jsonArgs | [string](#string) | | |
| eventIdx | [int32](#int32) | | |
| txHash | [bytes](#bytes) | | |
| blockHash | [bytes](#bytes) | | |
| blockNo | [uint64](#uint64) | | |
| txIndex | [int32](#int32) | | |
### FilterInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractAddress | [bytes](#bytes) | | |
| eventName | [string](#string) | | |
| blockfrom | [uint64](#uint64) | | |
| blockto | [uint64](#uint64) | | |
| desc | [bool](#bool) | | |
| argFilter | [bytes](#bytes) | | |
| recentBlockCnt | [int32](#int32) | | |
### FnArgument
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
### Function
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| arguments | [FnArgument](#types.FnArgument) | repeated | |
| payable | [bool](#bool) | | |
| view | [bool](#bool) | | |
| fee_delegation | [bool](#bool) | | |
### Proposal
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
| description | [string](#string) | | |
| multipleChoice | [uint32](#uint32) | | |
### Query
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractAddress | [bytes](#bytes) | | |
| queryinfo | [bytes](#bytes) | | |
### Receipt
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractAddress | [bytes](#bytes) | | |
| status | [string](#string) | | |
| ret | [string](#string) | | |
| txHash | [bytes](#bytes) | | |
| feeUsed | [bytes](#bytes) | | |
| cumulativeFeeUsed | [bytes](#bytes) | | |
| bloom | [bytes](#bytes) | | |
| events | [Event](#types.Event) | repeated | |
| blockNo | [uint64](#uint64) | | |
| blockHash | [bytes](#bytes) | | |
| txIndex | [int32](#int32) | | |
| from | [bytes](#bytes) | | |
| to | [bytes](#bytes) | | |
| feeDelegation | [bool](#bool) | | |
| gasUsed | [uint64](#uint64) | | |
### State
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| nonce | [uint64](#uint64) | | |
| balance | [bytes](#bytes) | | |
| codeHash | [bytes](#bytes) | | |
| storageRoot | [bytes](#bytes) | | |
| sqlRecoveryPoint | [uint64](#uint64) | | |
### StateQuery
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractAddress | [bytes](#bytes) | | |
| root | [bytes](#bytes) | | |
| compressed | [bool](#bool) | | |
| storageKeys | [bytes](#bytes) | repeated | |
### StateQueryProof
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| contractProof | [AccountProof](#types.AccountProof) | | |
| varProofs | [ContractVarProof](#types.ContractVarProof) | repeated | |
### StateVar
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| type | [string](#string) | | |
| len | [int32](#int32) | | |
### Tx
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [bytes](#bytes) | | |
| body | [TxBody](#types.TxBody) | | |
### TxBody
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| nonce | [uint64](#uint64) | | increasing number used only once per sender account |
| account | [bytes](#bytes) | | decoded account address |
| recipient | [bytes](#bytes) | | decoded account address |
| amount | [bytes](#bytes) | | variable-length big integer |
| payload | [bytes](#bytes) | | |
| gasLimit | [uint64](#uint64) | | currently not used |
| gasPrice | [bytes](#bytes) | | variable-length big integer. currently not used |
| type | [TxType](#types.TxType) | | |
| chainIdHash | [bytes](#bytes) | | hash value of chain identifier in the block |
| sign | [bytes](#bytes) | | sender's signature for this TxBody |
### TxIdx
TxIdx specifies a transaction's block hash and index within the block body
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blockHash | [bytes](#bytes) | | |
| idx | [int32](#int32) | | |
### TxInBlock
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txIdx | [TxIdx](#types.TxIdx) | | |
| tx | [Tx](#types.Tx) | | |
### TxList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txs | [Tx](#types.Tx) | repeated | |
### TxType
| Name | Number | Description |
| ---- | ------ | ----------- |
| NORMAL | 0 | |
| GOVERNANCE | 1 | |
| REDEPLOY | 2 | |
| FEEDELEGATION | 3 | |
| TRANSFER | 4 | |
| CALL | 5 | |
| DEPLOY | 6 | |
Top
## metric.proto
### Metrics
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| peers | [PeerMetric](#types.PeerMetric) | repeated | |
### MetricsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| types | [MetricType](#types.MetricType) | repeated | |
### PeerMetric
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| peerID | [bytes](#bytes) | | |
| sumIn | [int64](#int64) | | |
| avrIn | [int64](#int64) | | |
| sumOut | [int64](#int64) | | |
| avrOut | [int64](#int64) | | |
### MetricType
| Name | Number | Description |
| ---- | ------ | ----------- |
| NOTHING | 0 | NOTHING should not be used. |
| P2P_NETWORK | 1 | Metric for p2p network transfer |
## Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
| double | | double | double | float |
| float | | float | float | float |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| sfixed32 | Always four bytes. | int32 | int | int |
| sfixed64 | Always eight bytes. | int64 | long | int/long |
| bool | | bool | boolean | boolean |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |