Skip to main content

Crate sentrix_proto

Crate sentrix_proto 

Source
Expand description

Generated tonic + prost types for the Sentrix Chain gRPC service.

Single source of truth for the sentrix.v1 schema. The chain itself consumes these types server-side (crates/sentrix-grpc); SDK clients (Rust, WASM, future polyglot) depend on this crate via crates.io to avoid drift between server and clients.

§Example

use sentrix_proto::sentrix_client::SentrixClient;

let mut client = SentrixClient::connect("https://grpc.sentrixchain.com").await?;
let block = client
    .get_block(sentrix_proto::GetBlockRequest {
        selector: Some(sentrix_proto::get_block_request::Selector::Latest(true)),
    })
    .await?
    .into_inner();
println!("latest block: index={} timestamp={}", block.index, block.timestamp);

§Schema versioning

The schema is namespaced package sentrix.v1;. Breaking field renames / type changes will go to a sentrix.v2 package, not a v1 in-place edit — that gives client crates a deterministic boundary for major-version bumps.

Modules§

chain_event
Nested message and enum types in ChainEvent.
get_block_request
Nested message and enum types in GetBlockRequest.
sentrix_client
Generated client implementations.
sentrix_server
Generated server implementations.

Structs§

Account
Address
20-byte EVM-compatible address. Mirror of sentrix-primitives::Address. Wire = bytes (NOT hex string) for binary efficiency.
Amount
Native amount — sentri (10^-8 SRX). u64 wire to match Sentrix internal.
Block
BlockFinalized
BlockHeight
Block height — u64 starting at 0 (genesis).
BroadcastTxRequest
BroadcastTxResponse
ChainEvent
Server-streaming event types.
GetBalanceRequest
GetBlockRequest
GetMempoolRequest
GetSupplyRequest
GetValidatorSetRequest
Hash
32-byte hash — block hash, tx hash, state root.
LogEmitted
Mempool
MempoolEntry
PendingTx
StreamEventsRequest
StreamLagged
Supply
Transaction
Mirror of sentrix-primitives::Transaction. Identical wire format to chain MDBX serialisation (modulo prost-encoding). Field numbers match the canonical struct order; do NOT renumber on changes.
ValidatorEntry
ValidatorSet
ValidatorSetChange

Enums§

EventFilter