pub trait Sentrix:
Send
+ Sync
+ 'static {
type StreamEventsStream: Stream<Item = Result<ChainEvent, Status>> + Send + 'static;
// Required methods
fn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Block>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBalanceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Account>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_validator_set<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorSetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorSet>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_supply<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSupplyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Supply>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_mempool<'life0, 'async_trait>(
&'life0 self,
request: Request<GetMempoolRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Mempool>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stream_events<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamEventsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEventsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with SentrixServer.
Required Associated Types§
Sourcetype StreamEventsStream: Stream<Item = Result<ChainEvent, Status>> + Send + 'static
type StreamEventsStream: Stream<Item = Result<ChainEvent, Status>> + Send + 'static
Server streaming response type for the StreamEvents method.
Required Methods§
Sourcefn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a signed transaction to the local mempool. Same semantics as JSON-RPC eth_sendRawTransaction for EVM txs, with native fields exposed for staking-ops and other native variants.
Sourcefn get_block<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Block>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Block>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a block by height OR by hash. Returns NOT_FOUND if outside the local chain window (currently 1000 blocks; older blocks need indexer).
Sourcefn get_balance<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBalanceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Account>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_balance<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBalanceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Account>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch account balance + nonce. Mirrors eth_getBalance + eth_getTransactionCount in a single round-trip. Includes mempool-pending nonce so wallets build correct next-tx without an extra call (matches the pending-aware nonce behaviour from chain v2.1.57).
Sourcefn get_validator_set<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorSetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorSet>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_validator_set<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorSetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorSet>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
v0.4 read-only state queries — drop the REST /sentrix_status_extended
bridge from the explorer’s stats hot path. All three are pure reads
off state.read() snapshots; same lock contention profile as
GetBlock/GetBalance.
Active validator set + per-validator stake/active/jailed flags.
Sourcefn get_supply<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSupplyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Supply>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_supply<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSupplyRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Supply>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Native-token supply snapshot (minted, burned, circulating).
Sourcefn get_mempool<'life0, 'async_trait>(
&'life0 self,
request: Request<GetMempoolRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Mempool>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mempool<'life0, 'async_trait>(
&'life0 self,
request: Request<GetMempoolRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Mempool>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pending-tx count + a capped header window for UI display.
Sourcefn stream_events<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamEventsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEventsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_events<'life0, 'async_trait>(
&'life0 self,
request: Request<StreamEventsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEventsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Server-streaming chain events. Subscribe once, receive every event type until cancel or server restart. Replaces N separate eth_subscribe calls. Backpressure: server bounded channel per stream (capacity 4096 — same as event_tx in chain). On slow client, server drops OLDEST events and emits a StreamLagged sentinel. Client should resync state from RPC.