#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTransactionRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration="TransactionVerbosity", tag="2")]
pub verbosity: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTransactionResponse {
#[prost(uint32, tag="1")]
pub block_height: u32,
#[prost(uint32, tag="2")]
pub block_time: u32,
#[prost(message, optional, tag="3")]
pub transaction: ::core::option::Option<TransactionInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CalculateFeeRequest {
#[prost(int64, tag="1")]
pub amount: i64,
#[prost(enumeration="PayloadType", tag="2")]
pub payload_type: i32,
#[prost(bool, tag="3")]
pub fixed_amount: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CalculateFeeResponse {
#[prost(int64, tag="1")]
pub amount: i64,
#[prost(int64, tag="2")]
pub fee: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTransactionRequest {
#[prost(string, tag="1")]
pub signed_raw_transaction: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTransactionResponse {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawTransferTransactionRequest {
#[prost(uint32, tag="1")]
pub lock_time: u32,
#[prost(string, tag="2")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub receiver: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub amount: i64,
#[prost(int64, tag="5")]
pub fee: i64,
#[prost(string, tag="6")]
pub memo: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawBondTransactionRequest {
#[prost(uint32, tag="1")]
pub lock_time: u32,
#[prost(string, tag="2")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub receiver: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub stake: i64,
#[prost(string, tag="5")]
pub public_key: ::prost::alloc::string::String,
#[prost(int64, tag="6")]
pub fee: i64,
#[prost(string, tag="7")]
pub memo: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawUnbondTransactionRequest {
#[prost(uint32, tag="1")]
pub lock_time: u32,
#[prost(string, tag="3")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub memo: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawWithdrawTransactionRequest {
#[prost(uint32, tag="1")]
pub lock_time: u32,
#[prost(string, tag="2")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub account_address: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub amount: i64,
#[prost(int64, tag="5")]
pub fee: i64,
#[prost(string, tag="6")]
pub memo: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawBatchTransferTransactionRequest {
#[prost(uint32, tag="1")]
pub lock_time: u32,
#[prost(string, tag="2")]
pub sender: ::prost::alloc::string::String,
#[prost(message, repeated, tag="3")]
pub recipients: ::prost::alloc::vec::Vec<Recipient>,
#[prost(int64, tag="4")]
pub fee: i64,
#[prost(string, tag="5")]
pub memo: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRawTransactionResponse {
#[prost(string, tag="1")]
pub raw_transaction: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadTransfer {
#[prost(string, tag="1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub receiver: ::prost::alloc::string::String,
#[prost(int64, tag="3")]
pub amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadBond {
#[prost(string, tag="1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub receiver: ::prost::alloc::string::String,
#[prost(int64, tag="3")]
pub stake: i64,
#[prost(string, tag="4")]
pub public_key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadSortition {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub proof: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadUnbond {
#[prost(string, tag="1")]
pub validator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadWithdraw {
#[prost(string, tag="1")]
pub validator_address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub account_address: ::prost::alloc::string::String,
#[prost(int64, tag="3")]
pub amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadBatchTransfer {
#[prost(string, tag="1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub recipients: ::prost::alloc::vec::Vec<Recipient>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Recipient {
#[prost(string, tag="1")]
pub receiver: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionInfo {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub data: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub version: i32,
#[prost(uint32, tag="4")]
pub lock_time: u32,
#[prost(int64, tag="5")]
pub value: i64,
#[prost(int64, tag="6")]
pub fee: i64,
#[prost(enumeration="PayloadType", tag="7")]
pub payload_type: i32,
#[prost(string, tag="8")]
pub memo: ::prost::alloc::string::String,
#[prost(string, tag="9")]
pub public_key: ::prost::alloc::string::String,
#[prost(string, tag="10")]
pub signature: ::prost::alloc::string::String,
#[prost(oneof="transaction_info::Payload", tags="30, 31, 32, 33, 34, 35")]
pub payload: ::core::option::Option<transaction_info::Payload>,
}
pub mod transaction_info {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag="30")]
Transfer(super::PayloadTransfer),
#[prost(message, tag="31")]
Bond(super::PayloadBond),
#[prost(message, tag="32")]
Sortition(super::PayloadSortition),
#[prost(message, tag="33")]
Unbond(super::PayloadUnbond),
#[prost(message, tag="34")]
Withdraw(super::PayloadWithdraw),
#[prost(message, tag="35")]
BatchTransfer(super::PayloadBatchTransfer),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecodeRawTransactionRequest {
#[prost(string, tag="1")]
pub raw_transaction: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DecodeRawTransactionResponse {
#[prost(message, optional, tag="1")]
pub transaction: ::core::option::Option<TransactionInfo>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PayloadType {
Unspecified = 0,
Transfer = 1,
Bond = 2,
Sortition = 3,
Unbond = 4,
Withdraw = 5,
BatchTransfer = 6,
}
impl PayloadType {
pub fn as_str_name(&self) -> &'static str {
match self {
PayloadType::Unspecified => "PAYLOAD_TYPE_UNSPECIFIED",
PayloadType::Transfer => "PAYLOAD_TYPE_TRANSFER",
PayloadType::Bond => "PAYLOAD_TYPE_BOND",
PayloadType::Sortition => "PAYLOAD_TYPE_SORTITION",
PayloadType::Unbond => "PAYLOAD_TYPE_UNBOND",
PayloadType::Withdraw => "PAYLOAD_TYPE_WITHDRAW",
PayloadType::BatchTransfer => "PAYLOAD_TYPE_BATCH_TRANSFER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PAYLOAD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PAYLOAD_TYPE_TRANSFER" => Some(Self::Transfer),
"PAYLOAD_TYPE_BOND" => Some(Self::Bond),
"PAYLOAD_TYPE_SORTITION" => Some(Self::Sortition),
"PAYLOAD_TYPE_UNBOND" => Some(Self::Unbond),
"PAYLOAD_TYPE_WITHDRAW" => Some(Self::Withdraw),
"PAYLOAD_TYPE_BATCH_TRANSFER" => Some(Self::BatchTransfer),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionVerbosity {
Data = 0,
Info = 1,
}
impl TransactionVerbosity {
pub fn as_str_name(&self) -> &'static str {
match self {
TransactionVerbosity::Data => "TRANSACTION_VERBOSITY_DATA",
TransactionVerbosity::Info => "TRANSACTION_VERBOSITY_INFO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRANSACTION_VERBOSITY_DATA" => Some(Self::Data),
"TRANSACTION_VERBOSITY_INFO" => Some(Self::Info),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountResponse {
#[prost(message, optional, tag="1")]
pub account: ::core::option::Option<AccountInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetValidatorAddressesRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetValidatorAddressesResponse {
#[prost(string, repeated, tag="1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetValidatorRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetValidatorByNumberRequest {
#[prost(int32, tag="1")]
pub number: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetValidatorResponse {
#[prost(message, optional, tag="1")]
pub validator: ::core::option::Option<ValidatorInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicKeyRequest {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicKeyResponse {
#[prost(string, tag="1")]
pub public_key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBlockRequest {
#[prost(uint32, tag="1")]
pub height: u32,
#[prost(enumeration="BlockVerbosity", tag="2")]
pub verbosity: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockResponse {
#[prost(uint32, tag="1")]
pub height: u32,
#[prost(string, tag="2")]
pub hash: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub data: ::prost::alloc::string::String,
#[prost(uint32, tag="4")]
pub block_time: u32,
#[prost(message, optional, tag="5")]
pub header: ::core::option::Option<BlockHeaderInfo>,
#[prost(message, optional, tag="6")]
pub prev_cert: ::core::option::Option<CertificateInfo>,
#[prost(message, repeated, tag="7")]
pub txs: ::prost::alloc::vec::Vec<TransactionInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBlockHashRequest {
#[prost(uint32, tag="1")]
pub height: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockHashResponse {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockHeightRequest {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBlockHeightResponse {
#[prost(uint32, tag="1")]
pub height: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBlockchainInfoRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockchainInfoResponse {
#[prost(uint32, tag="1")]
pub last_block_height: u32,
#[prost(string, tag="2")]
pub last_block_hash: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub total_accounts: i32,
#[prost(int32, tag="4")]
pub total_validators: i32,
#[prost(int32, tag="12")]
pub active_validators: i32,
#[prost(int64, tag="5")]
pub total_power: i64,
#[prost(int64, tag="6")]
pub committee_power: i64,
#[prost(message, repeated, tag="7")]
pub committee_validators: ::prost::alloc::vec::Vec<ValidatorInfo>,
#[prost(bool, tag="8")]
pub is_pruned: bool,
#[prost(uint32, tag="9")]
pub pruning_height: u32,
#[prost(int64, tag="10")]
pub last_block_time: i64,
#[prost(map="int32, double", tag="11")]
pub committee_protocol_versions: ::std::collections::HashMap<i32, f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetConsensusInfoRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConsensusInfoResponse {
#[prost(message, optional, tag="1")]
pub proposal: ::core::option::Option<ProposalInfo>,
#[prost(message, repeated, tag="2")]
pub instances: ::prost::alloc::vec::Vec<ConsensusInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTxPoolContentRequest {
#[prost(enumeration="PayloadType", tag="1")]
pub payload_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxPoolContentResponse {
#[prost(message, repeated, tag="1")]
pub txs: ::prost::alloc::vec::Vec<TransactionInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorInfo {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub data: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub public_key: ::prost::alloc::string::String,
#[prost(int32, tag="4")]
pub number: i32,
#[prost(int64, tag="5")]
pub stake: i64,
#[prost(uint32, tag="6")]
pub last_bonding_height: u32,
#[prost(uint32, tag="7")]
pub last_sortition_height: u32,
#[prost(uint32, tag="8")]
pub unbonding_height: u32,
#[prost(string, tag="9")]
pub address: ::prost::alloc::string::String,
#[prost(double, tag="10")]
pub availability_score: f64,
#[prost(int32, tag="11")]
pub protocol_version: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountInfo {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub data: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub number: i32,
#[prost(int64, tag="4")]
pub balance: i64,
#[prost(string, tag="5")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockHeaderInfo {
#[prost(int32, tag="1")]
pub version: i32,
#[prost(string, tag="2")]
pub prev_block_hash: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub state_root: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub sortition_seed: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub proposer_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateInfo {
#[prost(string, tag="1")]
pub hash: ::prost::alloc::string::String,
#[prost(int32, tag="2")]
pub round: i32,
#[prost(int32, repeated, tag="3")]
pub committers: ::prost::alloc::vec::Vec<i32>,
#[prost(int32, repeated, tag="4")]
pub absentees: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag="5")]
pub signature: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VoteInfo {
#[prost(enumeration="VoteType", tag="1")]
pub r#type: i32,
#[prost(string, tag="2")]
pub voter: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub block_hash: ::prost::alloc::string::String,
#[prost(int32, tag="4")]
pub round: i32,
#[prost(int32, tag="5")]
pub cp_round: i32,
#[prost(int32, tag="6")]
pub cp_value: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusInfo {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(bool, tag="2")]
pub active: bool,
#[prost(uint32, tag="3")]
pub height: u32,
#[prost(int32, tag="4")]
pub round: i32,
#[prost(message, repeated, tag="5")]
pub votes: ::prost::alloc::vec::Vec<VoteInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposalInfo {
#[prost(uint32, tag="1")]
pub height: u32,
#[prost(int32, tag="2")]
pub round: i32,
#[prost(string, tag="3")]
pub block_data: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub signature: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BlockVerbosity {
Data = 0,
Info = 1,
Transactions = 2,
}
impl BlockVerbosity {
pub fn as_str_name(&self) -> &'static str {
match self {
BlockVerbosity::Data => "BLOCK_VERBOSITY_DATA",
BlockVerbosity::Info => "BLOCK_VERBOSITY_INFO",
BlockVerbosity::Transactions => "BLOCK_VERBOSITY_TRANSACTIONS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BLOCK_VERBOSITY_DATA" => Some(Self::Data),
"BLOCK_VERBOSITY_INFO" => Some(Self::Info),
"BLOCK_VERBOSITY_TRANSACTIONS" => Some(Self::Transactions),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VoteType {
Unspecified = 0,
Prepare = 1,
Precommit = 2,
CpPreVote = 3,
CpMainVote = 4,
CpDecided = 5,
}
impl VoteType {
pub fn as_str_name(&self) -> &'static str {
match self {
VoteType::Unspecified => "VOTE_TYPE_UNSPECIFIED",
VoteType::Prepare => "VOTE_TYPE_PREPARE",
VoteType::Precommit => "VOTE_TYPE_PRECOMMIT",
VoteType::CpPreVote => "VOTE_TYPE_CP_PRE_VOTE",
VoteType::CpMainVote => "VOTE_TYPE_CP_MAIN_VOTE",
VoteType::CpDecided => "VOTE_TYPE_CP_DECIDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VOTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"VOTE_TYPE_PREPARE" => Some(Self::Prepare),
"VOTE_TYPE_PRECOMMIT" => Some(Self::Precommit),
"VOTE_TYPE_CP_PRE_VOTE" => Some(Self::CpPreVote),
"VOTE_TYPE_CP_MAIN_VOTE" => Some(Self::CpMainVote),
"VOTE_TYPE_CP_DECIDED" => Some(Self::CpDecided),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNetworkInfoRequest {
#[prost(bool, tag="1")]
pub only_connected: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNetworkInfoResponse {
#[prost(string, tag="1")]
pub network_name: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
pub connected_peers_count: u32,
#[prost(message, repeated, tag="3")]
pub connected_peers: ::prost::alloc::vec::Vec<PeerInfo>,
#[prost(message, optional, tag="4")]
pub metric_info: ::core::option::Option<MetricInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNodeInfoRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNodeInfoResponse {
#[prost(string, tag="1")]
pub moniker: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub agent: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub peer_id: ::prost::alloc::string::String,
#[prost(uint64, tag="4")]
pub started_at: u64,
#[prost(string, tag="5")]
pub reachability: ::prost::alloc::string::String,
#[prost(int32, tag="6")]
pub services: i32,
#[prost(string, tag="7")]
pub services_names: ::prost::alloc::string::String,
#[prost(string, repeated, tag="8")]
pub local_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="9")]
pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(double, tag="13")]
pub clock_offset: f64,
#[prost(message, optional, tag="14")]
pub connection_info: ::core::option::Option<ConnectionInfo>,
#[prost(message, repeated, tag="15")]
pub zmq_publishers: ::prost::alloc::vec::Vec<ZmqPublisherInfo>,
#[prost(uint64, tag="16")]
pub current_time: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZmqPublisherInfo {
#[prost(string, tag="1")]
pub topic: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub address: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub hwm: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerInfo {
#[prost(int32, tag="1")]
pub status: i32,
#[prost(string, tag="2")]
pub moniker: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub agent: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub peer_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="5")]
pub consensus_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="6")]
pub consensus_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, tag="7")]
pub services: u32,
#[prost(string, tag="8")]
pub last_block_hash: ::prost::alloc::string::String,
#[prost(uint32, tag="9")]
pub height: u32,
#[prost(int64, tag="10")]
pub last_sent: i64,
#[prost(int64, tag="11")]
pub last_received: i64,
#[prost(string, tag="12")]
pub address: ::prost::alloc::string::String,
#[prost(enumeration="Direction", tag="13")]
pub direction: i32,
#[prost(string, repeated, tag="14")]
pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag="15")]
pub total_sessions: i32,
#[prost(int32, tag="16")]
pub completed_sessions: i32,
#[prost(message, optional, tag="17")]
pub metric_info: ::core::option::Option<MetricInfo>,
#[prost(bool, tag="18")]
pub outbound_hello_sent: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConnectionInfo {
#[prost(uint64, tag="1")]
pub connections: u64,
#[prost(uint64, tag="2")]
pub inbound_connections: u64,
#[prost(uint64, tag="3")]
pub outbound_connections: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricInfo {
#[prost(message, optional, tag="1")]
pub total_invalid: ::core::option::Option<CounterInfo>,
#[prost(message, optional, tag="2")]
pub total_sent: ::core::option::Option<CounterInfo>,
#[prost(message, optional, tag="3")]
pub total_received: ::core::option::Option<CounterInfo>,
#[prost(map="int32, message", tag="4")]
pub message_sent: ::std::collections::HashMap<i32, CounterInfo>,
#[prost(map="int32, message", tag="5")]
pub message_received: ::std::collections::HashMap<i32, CounterInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CounterInfo {
#[prost(uint64, tag="1")]
pub bytes: u64,
#[prost(uint64, tag="2")]
pub bundles: u64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Direction {
Unknown = 0,
Inbound = 1,
Outbound = 2,
}
impl Direction {
pub fn as_str_name(&self) -> &'static str {
match self {
Direction::Unknown => "DIRECTION_UNKNOWN",
Direction::Inbound => "DIRECTION_INBOUND",
Direction::Outbound => "DIRECTION_OUTBOUND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DIRECTION_UNKNOWN" => Some(Self::Unknown),
"DIRECTION_INBOUND" => Some(Self::Inbound),
"DIRECTION_OUTBOUND" => Some(Self::Outbound),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageWithPrivateKeyRequest {
#[prost(string, tag="1")]
pub private_key: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageWithPrivateKeyResponse {
#[prost(string, tag="1")]
pub signature: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyMessageRequest {
#[prost(string, tag="1")]
pub message: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub signature: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub public_key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct VerifyMessageResponse {
#[prost(bool, tag="1")]
pub is_valid: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublicKeyAggregationRequest {
#[prost(string, repeated, tag="1")]
pub public_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublicKeyAggregationResponse {
#[prost(string, tag="1")]
pub public_key: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignatureAggregationRequest {
#[prost(string, repeated, tag="1")]
pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignatureAggregationResponse {
#[prost(string, tag="1")]
pub signature: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddressInfo {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub public_key: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoryInfo {
#[prost(string, tag="1")]
pub transaction_id: ::prost::alloc::string::String,
#[prost(uint32, tag="2")]
pub time: u32,
#[prost(string, tag="3")]
pub payload_type: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub description: ::prost::alloc::string::String,
#[prost(int64, tag="5")]
pub amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAddressHistoryRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAddressHistoryResponse {
#[prost(message, repeated, tag="1")]
pub history_info: ::prost::alloc::vec::Vec<HistoryInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNewAddressRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(enumeration="AddressType", tag="2")]
pub address_type: i32,
#[prost(string, tag="3")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub password: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNewAddressResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub address_info: ::core::option::Option<AddressInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreWalletRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub mnemonic: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub password: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreWalletResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWalletRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub password: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWalletResponse {
#[prost(string, tag="2")]
pub mnemonic: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadWalletRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadWalletResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnloadWalletRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnloadWalletResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetValidatorAddressRequest {
#[prost(string, tag="1")]
pub public_key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetValidatorAddressResponse {
#[prost(string, tag="1")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignRawTransactionRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub raw_transaction: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub password: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignRawTransactionResponse {
#[prost(string, tag="1")]
pub transaction_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub signed_raw_transaction: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTotalBalanceRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTotalBalanceResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub total_balance: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub password: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignMessageResponse {
#[prost(string, tag="1")]
pub signature: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTotalStakeRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTotalStakeResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub total_stake: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAddressInfoRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAddressInfoResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub public_key: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAddressLabelRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub password: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub label: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetAddressLabelResponse {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListWalletRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWalletResponse {
#[prost(string, repeated, tag="1")]
pub wallets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWalletInfoRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWalletInfoResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub version: i64,
#[prost(string, tag="3")]
pub network: ::prost::alloc::string::String,
#[prost(bool, tag="4")]
pub encrypted: bool,
#[prost(string, tag="5")]
pub uuid: ::prost::alloc::string::String,
#[prost(int64, tag="6")]
pub created_at: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAddressRequest {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAddressResponse {
#[prost(string, tag="1")]
pub wallet_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub data: ::prost::alloc::vec::Vec<AddressInfo>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AddressType {
Treasury = 0,
Validator = 1,
BlsAccount = 2,
Ed25519Account = 3,
}
impl AddressType {
pub fn as_str_name(&self) -> &'static str {
match self {
AddressType::Treasury => "ADDRESS_TYPE_TREASURY",
AddressType::Validator => "ADDRESS_TYPE_VALIDATOR",
AddressType::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT",
AddressType::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ADDRESS_TYPE_TREASURY" => Some(Self::Treasury),
"ADDRESS_TYPE_VALIDATOR" => Some(Self::Validator),
"ADDRESS_TYPE_BLS_ACCOUNT" => Some(Self::BlsAccount),
"ADDRESS_TYPE_ED25519_ACCOUNT" => Some(Self::Ed25519Account),
_ => None,
}
}
}
include!("aerium.serde.rs");
include!("aerium.tonic.rs");