From 329d8c63f4276a227cfdf9c242b7ad5ed1ff3866 Mon Sep 17 00:00:00 2001 From: Mostafa Date: Sun, 4 Feb 2024 19:55:29 +0800 Subject: [PATCH] add grpc document --- website/_data/learn_toc.yml | 7 +- website/_sass/_styles.scss | 31 +- website/_sass/dark_mode.scss | 4 +- website/learn/api/grpc/index.md | 3040 +++++++++++++++++++++++++++++++ 4 files changed, 3069 insertions(+), 13 deletions(-) create mode 100644 website/learn/api/grpc/index.md diff --git a/website/_data/learn_toc.yml b/website/_data/learn_toc.yml index 7dc79c10c..6ece0256e 100644 --- a/website/_data/learn_toc.yml +++ b/website/_data/learn_toc.yml @@ -21,7 +21,7 @@ - doc: committee - doc: parameters -- title: Transactions +- title: Transaction path: learn/transaction items: - doc: format @@ -32,6 +32,11 @@ - doc: unbond - doc: withdraw +- title: API Reference + path: learn/api + items: + - doc: grpc + # - title: Smart Contract # path: learn/smart-contract # items: diff --git a/website/_sass/_styles.scss b/website/_sass/_styles.scss index 91e07ded3..c47f6681d 100644 --- a/website/_sass/_styles.scss +++ b/website/_sass/_styles.scss @@ -32,14 +32,14 @@ $prefix: "pa-"; // @import "../../node_modules/bootstrap/scss/breadcrumb"; // @import "../../node_modules/bootstrap/scss/accordion"; // @import "../../node_modules/bootstrap/scss/pagination"; -// @import "../../node_modules/bootstrap/scss/badge"; +@import "../../node_modules/bootstrap/scss/badge"; @import "../../node_modules/bootstrap/scss/alert"; // @import "../../node_modules/bootstrap/scss/progress"; // @import "../../node_modules/bootstrap/scss/list-group"; // @import "../../node_modules/bootstrap/scss/close"; // @import "../../node_modules/bootstrap/scss/toasts"; // @import "../../node_modules/bootstrap/scss/modal"; // Requires transitions -@import "../../node_modules/bootstrap/scss/tooltip"; +// @import "../../node_modules/bootstrap/scss/tooltip"; // @import "../../node_modules/bootstrap/scss/popover"; // @import "../../node_modules/bootstrap/scss/carousel"; // @import "../../node_modules/bootstrap/scss/spinners"; @@ -47,7 +47,7 @@ $prefix: "pa-"; // @import "../../node_modules/bootstrap/scss/placeholders"; // Helpers -// @import "../../node_modules/bootstrap/scss/helpers"; +@import "../../node_modules/bootstrap/scss/helpers"; // Utilities @import "../../node_modules/bootstrap/scss/utilities/api"; @@ -79,7 +79,7 @@ a { text-decoration: none; a:hover:not(.btn) { - color: $primary-color !important; + color: $primary-color !important; } } @@ -95,6 +95,10 @@ h1 { font-weight: 600; } +h3 { + padding-top: 16px; +} + .motto { .title { font-weight: 600; @@ -126,12 +130,12 @@ h1 { .footer { .text-muted { - color: $bg-color !important; + color: $bg-color !important; font-size: 12px; border-radius: 15px 50px 30px 5px; a { - color: $bg-color !important; + color: $bg-color !important; } } } @@ -183,17 +187,21 @@ h1 { &:not(.active):hover { background-color: #808080 !important; - color: $bg-color !important; + color: $bg-color !important; } } .active { - color: $bg-color !important; + color: $bg-color !important; background-color: #404040 !important; } } table { + thead { + font-weight: 700 !important; + } + tbody tr:nth-child(2n + 1) td { background-color: #eee; } @@ -203,7 +211,7 @@ blockquote { background: #eee; border-left: 10px solid #ccc; padding: 16px; - quotes: "\201C""\201D""\2018""\2019"; + quotes: "\201C" "\201D" "\2018" "\2019"; &:before { color: #ccc; @@ -225,8 +233,8 @@ blockquote { } .footer { - background-color: $primary-color !important; - color: $bg-color !important; + background-color: $primary-color !important; + color: $bg-color !important; .section { font-size: 1.75rem; @@ -292,6 +300,7 @@ blockquote { padding-bottom: 10px; color: #808080; } + .content { padding-top: 22px; min-height: 600px; diff --git a/website/_sass/dark_mode.scss b/website/_sass/dark_mode.scss index 93f7bb833..01bb578da 100644 --- a/website/_sass/dark_mode.scss +++ b/website/_sass/dark_mode.scss @@ -27,5 +27,7 @@ } } - .fa-linux { color: #ffffff; } + .fa-linux { + color: #ffffff; + } } diff --git a/website/learn/api/grpc/index.md b/website/learn/api/grpc/index.md new file mode 100644 index 000000000..b55b364b7 --- /dev/null +++ b/website/learn/api/grpc/index.md @@ -0,0 +1,3040 @@ +--- +layout: learn +title: gRPC API Reference +sidebar: gRPC API Reference +--- + +

gRPC API Reference

+ +Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication. +Here you can find the list of all gRPC methods and messages. + +

Table of Contents

+ +
+ +
+ +

Transaction Service transaction.proto

+

Transaction service defines various RPC methods for interacting with transactions.

+

GetTransaction rpc

+
Request message: GetTransactionRequest
+
Response message: GetTransactionResponse
+

GetTransaction retrieves transaction details based on the provided request parameters.

+

CalculateFee rpc

+
Request message: CalculateFeeRequest
+
Response message: CalculateFeeResponse
+

CalculateFee calculates the transaction fee based on the specified amount and payload type.

+

BroadcastTransaction rpc

+
Request message: BroadcastTransactionRequest
+
Response message: BroadcastTransactionResponse
+

BroadcastTransaction broadcasts a signed transaction to the network.

+

GetRawTransferTransaction rpc

+
Request message: GetRawTransferTransactionRequest
+
Response message: GetRawTransactionResponse
+

GetRawTransferTransaction retrieves raw details of a transfer transaction.

+

GetRawBondTransaction rpc

+
Request message: GetRawBondTransactionRequest
+
Response message: GetRawTransactionResponse
+

GetRawBondTransaction retrieves raw details of a bond transaction.

+

GetRawUnBondTransaction rpc

+
Request message: GetRawUnBondTransactionRequest
+
Response message: GetRawTransactionResponse
+

GetRawUnBondTransaction retrieves raw details of an unbond transaction.

+

GetRawWithdrawTransaction rpc

+
Request message: GetRawWithdrawTransactionRequest
+
Response message: GetRawTransactionResponse
+

GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

+

Blockchain Service blockchain.proto

+

Blockchain service defines RPC methods for interacting with the blockchain.

+

GetBlock rpc

+
Request message: GetBlockRequest
+
Response message: GetBlockResponse
+

GetBlock retrieves information about a block based on the provided request parameters.

+

GetBlockHash rpc

+
Request message: GetBlockHashRequest
+
Response message: GetBlockHashResponse
+

GetBlockHash retrieves the hash of a block at the specified height.

+

GetBlockHeight rpc

+
Request message: GetBlockHeightRequest
+
Response message: GetBlockHeightResponse
+

GetBlockHeight retrieves the height of a block with the specified hash.

+

GetBlockchainInfo rpc

+
Request message: GetBlockchainInfoRequest
+
Response message: GetBlockchainInfoResponse
+

GetBlockchainInfo retrieves general information about the blockchain.

+

GetConsensusInfo rpc

+
Request message: GetConsensusInfoRequest
+
Response message: GetConsensusInfoResponse
+

GetConsensusInfo retrieves information about the consensus instances.

+

GetAccount rpc

+
Request message: GetAccountRequest
+
Response message: GetAccountResponse
+

GetAccount retrieves information about an account based on the provided address.

+

GetValidator rpc

+
Request message: GetValidatorRequest
+
Response message: GetValidatorResponse
+

GetValidator retrieves information about a validator based on the provided address.

+

GetValidatorByNumber rpc

+
Request message: GetValidatorByNumberRequest
+
Response message: GetValidatorResponse
+

GetValidatorByNumber retrieves information about a validator based on the provided number.

+

GetValidatorAddresses rpc

+
Request message: GetValidatorAddressesRequest
+
Response message: GetValidatorAddressesResponse
+

GetValidatorAddresses retrieves a list of all validator addresses.

+

GetPublicKey rpc

+
Request message: GetPublicKeyRequest
+
Response message: GetPublicKeyResponse
+

GetPublicKey retrieves the public key of an account based on the provided address.

+

Network Service network.proto

+

Network service provides RPCs for retrieving information about the network.

+

GetNetworkInfo rpc

+
Request message: GetNetworkInfoRequest
+
Response message: GetNetworkInfoResponse
+

GetNetworkInfo retrieves information about the overall network.

+

GetNodeInfo rpc

+
Request message: GetNodeInfoRequest
+
Response message: GetNodeInfoResponse
+

GetNodeInfo retrieves information about a specific node in the network.

+

Wallet Service wallet.proto

+

Define the Wallet service with various RPC methods for wallet management.

+

CreateWallet rpc

+
Request message: CreateWalletRequest
+
Response message: CreateWalletResponse
+

CreateWallet creates a new wallet with the specified parameters.

+

LoadWallet rpc

+
Request message: LoadWalletRequest
+
Response message: LoadWalletResponse
+

LoadWallet loads an existing wallet with the given name.

+

UnloadWallet rpc

+
Request message: UnloadWalletRequest
+
Response message: UnloadWalletResponse
+

UnloadWallet unloads a currently loaded wallet with the specified name.

+

LockWallet rpc

+
Request message: LockWalletRequest
+
Response message: LockWalletResponse
+

LockWallet locks a currently loaded wallet with the provided password and timeout.

+

UnlockWallet rpc

+
Request message: UnlockWalletRequest
+
Response message: UnlockWalletResponse
+

UnlockWallet unlocks a locked wallet with the provided password and timeout.

+

SignRawTransaction rpc

+
Request message: SignRawTransactionRequest
+
Response message: SignRawTransactionResponse
+

SignRawTransaction signs a raw transaction for a specified wallet.

+

GetValidatorAddress rpc

+
Request message: GetValidatorAddressRequest
+
Response message: GetValidatorAddressResponse
+

GetValidatorAddress retrieves the validator address associated with a public key.

+

Messages and Enums

+

+BroadcastTransactionRequest +msg +

+

Request message for broadcasting a signed transaction.

+ + + + + + + + + + + + +
FieldTypeDescription
signed_raw_transaction + bytes + Signed raw transaction data.
+

+BroadcastTransactionResponse +msg +

+

Response message containing the ID of the broadcasted transaction.

+ + + + + + + + + + + + +
FieldTypeDescription
id + bytes + Transaction ID.
+

+CalculateFeeRequest +msg +

+

Request message for calculating transaction fee.

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
amount + int64 + Transaction amount.
payloadType + PayloadType + Type of transaction payload.
+

+CalculateFeeResponse +msg +

+

Response message containing the calculated transaction fee.

+ + + + + + + + + + + + +
FieldTypeDescription
fee + int64 + Calculated transaction fee.
+

+GetRawBondTransactionRequest +msg +

+

Request message for retrieving raw details of a bond transaction.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time + uint32 + Lock time for the transaction.
sender + string + Sender's address.
receiver + string + Receiver's address.
stake + int64 + Stake amount.
public_key + string + Public key of the validator.
fee + int64 + Transaction fee.
memo + string + Transaction memo.
+

+GetRawTransactionResponse +msg +

+

Response message containing raw transaction data.

+ + + + + + + + + + + + +
FieldTypeDescription
raw_transaction + bytes + Raw transaction data.
+

+GetRawTransferTransactionRequest +msg +

+

Request message for retrieving raw details of a transfer transaction.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time + uint32 + Lock time for the transaction.
sender + string + Sender's address.
receiver + string + Receiver's address.
amount + int64 + Transaction amount.
fee + int64 + Transaction fee.
memo + string + Transaction memo.
+

+GetRawUnBondTransactionRequest +msg +

+

Request message for retrieving raw details of an unbond transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time + uint32 + Lock time for the transaction.
validator_address + string + Address of the validator to unbond from.
memo + string + Transaction memo.
+

+GetRawWithdrawTransactionRequest +msg +

+

Request message for retrieving raw details of a withdraw transaction.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time + uint32 + Lock time for the transaction.
validator_address + string + Address of the validator to withdraw from.
account_address + string + Address of the account to withdraw to.
fee + int64 + Transaction fee.
amount + int64 + Withdrawal amount.
memo + string + Transaction memo.
+

+GetTransactionRequest +msg +

+

Request message for retrieving transaction details.

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
id + bytes + Transaction ID.
verbosity + TransactionVerbosity + Verbosity level for transaction details.
+

+GetTransactionResponse +msg +

+

Response message containing details of a transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
block_height + uint32 + Height of the block containing the transaction.
block_time + uint32 + Time of the block containing the transaction.
transaction + TransactionInfo + Information about the transaction.
+

+PayloadBond +msg +

+

Payload for a bond transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
sender + string + Sender's address.
receiver + string + Receiver's address.
stake + int64 + Stake amount.
+

+PayloadSortition +msg +

+

Payload for a sortition transaction.

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
address + string + Address associated with the sortition.
proof + bytes + Proof for the sortition.
+

+PayloadTransfer +msg +

+

Payload for a transfer transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
sender + string + Sender's address.
receiver + string + Receiver's address.
amount + int64 + Transaction amount.
+

+PayloadUnbond +msg +

+

Payload for an unbond transaction.

+ + + + + + + + + + + + +
FieldTypeDescription
validator + string + Address of the validator to unbond from.
+

+PayloadWithdraw +msg +

+

Payload for a withdraw transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
from + string + Address to withdraw from.
to + string + Address to withdraw to.
amount + int64 + Withdrawal amount.
+

+TransactionInfo +msg +

+

Information about a transaction.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
id + bytes + Transaction ID.
data + bytes + Transaction data.
version + int32 + Transaction version.
lock_time + uint32 + Lock time for the transaction.
value + int64 + Transaction value.
fee + int64 + Transaction fee.
payloadType + PayloadType + Type of transaction payload.
transfer + PayloadTransfer + Transfer payload.
bond + PayloadBond + Bond payload.
sortition + PayloadSortition + Sortition payload.
unbond + PayloadUnbond + Unbond payload.
withdraw + PayloadWithdraw + Withdraw payload.
memo + string + Transaction memo.
public_key + string + Public key associated with the transaction.
signature + bytes + Transaction signature.
+

+AccountInfo +msg +

+

Message containing information about an account.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
hash + bytes + Hash of the account.
data + bytes + Account data.
number + int32 + Account number.
balance + int64 + Account balance.
address + string + Address of the account.
+

+BlockHeaderInfo +msg +

+

Message containing information about the header of a block.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
version + int32 + Block version.
prev_block_hash + bytes + Hash of the previous block.
state_root + bytes + State root of the block.
sortition_seed + bytes + Sortition seed of the block.
proposer_address + string + Address of the proposer of the block.
+

+CertificateInfo +msg +

+

Message containing information about a certificate.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
hash + bytes + Hash of the certificate.
round + int32 + Round of the certificate.
committersrepeated + int32 + List of committers in the certificate.
absenteesrepeated + int32 + List of absentees in the certificate.
signature + bytes + Certificate signature.
+

+ConsensusInfo +msg +

+

Message containing information about consensus.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
address + string + Address of the consensus instance.
Active + bool + Whether the consensus instance is active.
height + uint32 + Height of the consensus instance.
round + int32 + Round of the consensus instance.
votesrepeated + VoteInfo + List of votes in the consensus instance.
+

+GetAccountRequest +msg +

+

Message to request account information based on an address.

+ + + + + + + + + + + + +
FieldTypeDescription
address + string + Address of the account.
+

+GetAccountResponse +msg +

+

Message containing the response with account information.

+ + + + + + + + + + + + +
FieldTypeDescription
account + AccountInfo + Account information.
+

+GetBlockHashRequest +msg +

+

Message to request block hash based on height.

+ + + + + + + + + + + + +
FieldTypeDescription
height + uint32 + Height of the block.
+

+GetBlockHashResponse +msg +

+

Message containing the response with the block hash.

+ + + + + + + + + + + + +
FieldTypeDescription
hash + bytes + Hash of the block.
+

+GetBlockHeightRequest +msg +

+

Message to request block height based on hash.

+ + + + + + + + + + + + +
FieldTypeDescription
hash + bytes + Hash of the block.
+

+GetBlockHeightResponse +msg +

+

Message containing the response with the block height.

+ + + + + + + + + + + + +
FieldTypeDescription
height + uint32 + Height of the block.
+

+GetBlockRequest +msg +

+

Message to request block information based on height and verbosity.

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
height + uint32 + Height of the block.
verbosity + BlockVerbosity + Verbosity level for block information.
+

+GetBlockResponse +msg +

+

Message containing the response with block information.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
height + uint32 + Height of the block.
hash + bytes + Hash of the block.
data + bytes + Block data.
block_time + uint32 + Block timestamp.
header + BlockHeaderInfo + Block header information.
prev_cert + CertificateInfo + Certificate information of the previous block.
txsrepeated + TransactionInfo + List of transactions in the block.
+

+GetBlockchainInfoRequest +msg +

+

Message to request general information about the blockchain.

+ Message has no fields. +

+GetBlockchainInfoResponse +msg +

+

Message containing the response with general blockchain information.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
last_block_height + uint32 + Height of the last block.
last_block_hash + bytes + Hash of the last block.
total_accounts + int32 + Total number of accounts.
total_validators + int32 + Total number of validators.
total_power + int64 + Total power in the blockchain.
committee_power + int64 + Power of the committee.
committee_validatorsrepeated + ValidatorInfo + List of committee validators.
+

+GetConsensusInfoRequest +msg +

+

Message to request consensus information.

+ Message has no fields. +

+GetConsensusInfoResponse +msg +

+

Message containing the response with consensus information.

+ + + + + + + + + + + + +
FieldTypeDescription
instancesrepeated + ConsensusInfo + List of consensus instances.
+

+GetPublicKeyRequest +msg +

+

Message to request public key based on an address.

+ + + + + + + + + + + + +
FieldTypeDescription
address + string + Address for which public key is requested.
+

+GetPublicKeyResponse +msg +

+

Message containing the response with the public key.

+ + + + + + + + + + + + +
FieldTypeDescription
public_key + string + Public key of the account.
+

+GetValidatorAddressesRequest +msg +

+

Message to request validator addresses.

+ Message has no fields. +

+GetValidatorAddressesResponse +msg +

+

Message containing the response with a list of validator addresses.

+ + + + + + + + + + + + +
FieldTypeDescription
addressesrepeated + string + List of validator addresses.
+

+GetValidatorByNumberRequest +msg +

+

Message to request validator information based on a validator number.

+ + + + + + + + + + + + +
FieldTypeDescription
number + int32 + Validator number.
+

+GetValidatorRequest +msg +

+

Message to request validator information based on an address.

+ + + + + + + + + + + + +
FieldTypeDescription
address + string + Address of the validator.
+

+GetValidatorResponse +msg +

+

Message containing the response with validator information.

+ + + + + + + + + + + + +
FieldTypeDescription
validator + ValidatorInfo + Validator information.
+

+ValidatorInfo +msg +

+

Message containing information about a validator.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
hash + bytes + Hash of the validator.
data + bytes + Validator data.
public_key + string + Public key of the validator.
number + int32 + Validator number.
stake + int64 + Validator stake.
last_bonding_height + uint32 + Last bonding height.
last_sortition_height + uint32 + Last sortition height.
unbonding_height + uint32 + Unbonding height.
address + string + Address of the validator.
availability_score + double + Availability score of the validator.
+

+VoteInfo +msg +

+

Message containing information about a vote.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
type + VoteType + Type of the vote.
voter + string + Voter's address.
block_hash + bytes + Hash of the block being voted on.
round + int32 + Round of the vote.
cp_round + int32 + Consensus round of the vote.
cp_value + int32 + Consensus value of the vote.
+

+GetNetworkInfoRequest +msg +

+

Request message for retrieving overall network information.

+ Message has no fields. +

+GetNetworkInfoResponse +msg +

+

Response message containing information about the overall network.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
network_name + string + Name of the network.
total_sent_bytes + uint32 + Total bytes sent across the network.
total_received_bytes + uint32 + Total bytes received across the network.
connected_peers_count + uint32 + Number of connected peers.
connected_peersrepeated + PeerInfo + List of connected peers.
sent_bytesrepeated + GetNetworkInfoResponse.SentBytesEntry + Bytes sent per peer ID.
received_bytesrepeated + GetNetworkInfoResponse.ReceivedBytesEntry + Bytes received per peer ID.
+

+GetNetworkInfoResponse.ReceivedBytesEntry +msg +

+

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
key + uint32 +
value + uint64 +
+

+GetNetworkInfoResponse.SentBytesEntry +msg +

+

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
key + uint32 +
value + uint64 +
+

+GetNodeInfoRequest +msg +

+

Request message for retrieving information about a specific node in the network.

+ Message has no fields. +

+GetNodeInfoResponse +msg +

+

Response message containing information about a specific node in the network.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
moniker + string + Moniker of the node.
agent + string + Agent information of the node.
peer_id + bytes + Peer ID of the node.
started_at + uint64 + Timestamp when the node started.
reachability + string + Reachability status of the node.
servicesrepeated + int32 + List of services provided by the node.
services_namesrepeated + string + Names of services provided by the node.
addrsrepeated + string + List of addresses associated with the node.
protocolsrepeated + string + List of protocols supported by the node.
+

+PeerInfo +msg +

+

Information about a peer in the network.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
status + int32 + Status of the peer.
moniker + string + Moniker of the peer.
agent + string + Agent information of the peer.
peer_id + bytes + Peer ID of the peer.
consensus_keysrepeated + string + Consensus keys used by the peer.
consensus_addressrepeated + string + Consensus address of the peer.
services + uint32 + Services provided by the peer.
last_block_hash + bytes + Hash of the last block the peer knows.
height + uint32 + Height of the peer in the blockchain.
received_messages + int32 + Count of received messages.
invalid_messages + int32 + Count of invalid messages received.
last_sent + int64 + Timestamp of the last sent message.
last_received + int64 + Timestamp of the last received message.
sent_bytesrepeated + PeerInfo.SentBytesEntry + Bytes sent per message type.
received_bytesrepeated + PeerInfo.ReceivedBytesEntry + Bytes received per message type.
address + string + Network address of the peer.
direction + string + Direction of connection with the peer.
protocolsrepeated + string + List of protocols supported by the peer.
total_sessions + int32 + Total sessions with the peer.
completed_sessions + int32 + Completed sessions with the peer.
+

+PeerInfo.ReceivedBytesEntry +msg +

+

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
key + int32 +
value + int64 +
+

+PeerInfo.SentBytesEntry +msg +

+

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
key + int32 +
value + int64 +
+

+CreateWalletRequest +msg +

+

Request message for creating a new wallet.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the new wallet.
mnemonic + string + Mnemonic for wallet recovery.
language + string + Language for the mnemonic.
password + string + Password for securing the wallet.
+

+CreateWalletResponse +msg +

+

Response message containing the name of the created wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the created wallet.
+

+GetValidatorAddressRequest +msg +

+

Request message for obtaining the validator address associated with a public key.

+ + + + + + + + + + + + +
FieldTypeDescription
public_key + string + Public key for which the validator address is requested.
+

+GetValidatorAddressResponse +msg +

+

Response message containing the validator address corresponding to a public key.

+ + + + + + + + + + + + +
FieldTypeDescription
address + string + Validator address associated with the public key.
+

+LoadWalletRequest +msg +

+

Request message for loading an existing wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the wallet to load.
+

+LoadWalletResponse +msg +

+

Response message containing the name of the loaded wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the loaded wallet.
+

+LockWalletRequest +msg +

+

Request message for locking a currently loaded wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the wallet to lock.
+

+LockWalletResponse +msg +

+

Response message containing the name of the locked wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the locked wallet.
+

+SignRawTransactionRequest +msg +

+

Request message for signing a raw transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the wallet used for signing.
raw_transaction + bytes + Raw transaction data to be signed.
password + string + Password for unlocking the wallet for signing.
+

+SignRawTransactionResponse +msg +

+

Response message containing the transaction ID and signed raw transaction.

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
transaction_id + bytes + ID of the signed transaction.
signed_raw_transaction + bytes + Signed raw transaction data.
+

+UnloadWalletRequest +msg +

+

Request message for unloading a currently loaded wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the wallet to unload.
+

+UnloadWalletResponse +msg +

+

Response message containing the name of the unloaded wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the unloaded wallet.
+

+UnlockWalletRequest +msg +

+

Request message for unlocking a wallet.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the wallet to unlock.
password + string + Password for unlocking the wallet.
timeout + int32 + Timeout duration for the unlocked state.
+

+UnlockWalletResponse +msg +

+

Response message containing the name of the unlocked wallet.

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name + string + Name of the unlocked wallet.
+ +

+PayloadType +enum +

+

Enumeration for different types of transaction payloads.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
UNKNOWN0Unknown payload type.
TRANSFER_PAYLOAD1Transfer payload type.
BOND_PAYLOAD2Bond payload type.
SORTITION_PAYLOAD3Sortition payload type.
UNBOND_PAYLOAD4Unbond payload type.
WITHDRAW_PAYLOAD5Withdraw payload type.
+

+TransactionVerbosity +enum +

+

Enumeration for verbosity level when requesting transaction details.

+ + + + + + + + + + + + + + + + + + + +
NameNumberDescription
TRANSACTION_DATA0Request only transaction data.
TRANSACTION_INFO1Request detailed transaction information.
+

+BlockVerbosity +enum +

+

Enumeration for verbosity level when requesting block information.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
BLOCK_DATA0Request block data only.
BLOCK_INFO1Request block information only.
BLOCK_TRANSACTIONS2Request block transactions only.
+

+VoteType +enum +

+

Enumeration for types of votes.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameNumberDescription
VOTE_UNKNOWN0Unknown vote type.
VOTE_PREPARE1Prepare vote type.
VOTE_PRECOMMIT2Precommit vote type.
VOTE_CHANGE_PROPOSER3Change proposer vote type.
+ +

Scalar Value Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.proto TypeC++JavaPythonGoC#PHP
doubledoubledoublefloatfloat64doublefloat
floatfloatfloatfloatfloat32floatfloat
int32int32intintint32intinteger
int64int64longint/longint64longinteger/string
uint32uint32intint/longuint32uintinteger
uint64uint64longint/longuint64ulonginteger/string
sint32int32intintint32intinteger
sint64int64longint/longint64longinteger/string
fixed32uint32intintuint32uintinteger
fixed64uint64longint/longuint64ulonginteger/string
sfixed32int32intintint32intinteger
sfixed64int64longint/longint64longinteger/string
boolboolbooleanbooleanboolboolboolean
stringstringStringstr/unicodestringstringstring
bytesstringByteStringstr[]byteByteStringstring