pub trait AuthorityAPI {
// Required methods
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
request: SubmitTxRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<SubmitTxResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_effects<'life0, 'async_trait>(
&'life0 self,
request: WaitForEffectsRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<WaitForEffectsResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_object_info_request<'life0, 'async_trait>(
&'life0 self,
request: ObjectInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<ObjectInfoResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_transaction_info_request<'life0, 'async_trait>(
&'life0 self,
request: TransactionInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<TransactionInfoResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_checkpoint<'life0, 'async_trait>(
&'life0 self,
request: CheckpointRequest,
) -> Pin<Box<dyn Future<Output = Result<CheckpointResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_checkpoint_v2<'life0, 'async_trait>(
&'life0 self,
request: CheckpointRequestV2,
) -> Pin<Box<dyn Future<Output = Result<CheckpointResponseV2, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_system_state_object<'life0, 'async_trait>(
&'life0 self,
request: SystemStateRequest,
) -> Pin<Box<dyn Future<Output = Result<SuiSystemState, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validator_health<'life0, 'async_trait>(
&'life0 self,
request: ValidatorHealthRequest,
) -> Pin<Box<dyn Future<Output = Result<ValidatorHealthResponse, SuiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn reconnect(&self) { ... }
}Required Methods§
Sourcefn submit_transaction<'life0, 'async_trait>(
&'life0 self,
request: SubmitTxRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<SubmitTxResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
request: SubmitTxRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<SubmitTxResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits a transaction to validators for sequencing and execution.
Sourcefn wait_for_effects<'life0, 'async_trait>(
&'life0 self,
request: WaitForEffectsRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<WaitForEffectsResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_effects<'life0, 'async_trait>(
&'life0 self,
request: WaitForEffectsRequest,
client_addr: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = Result<WaitForEffectsResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Waits for effects of a transaction that has been submitted to the network
through the submit_transaction API.
Sourcefn handle_object_info_request<'life0, 'async_trait>(
&'life0 self,
request: ObjectInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<ObjectInfoResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_object_info_request<'life0, 'async_trait>(
&'life0 self,
request: ObjectInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<ObjectInfoResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle Object information requests for this account.
Sourcefn handle_transaction_info_request<'life0, 'async_trait>(
&'life0 self,
request: TransactionInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<TransactionInfoResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_transaction_info_request<'life0, 'async_trait>(
&'life0 self,
request: TransactionInfoRequest,
) -> Pin<Box<dyn Future<Output = Result<TransactionInfoResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle Object information requests for this account.
fn handle_checkpoint<'life0, 'async_trait>(
&'life0 self,
request: CheckpointRequest,
) -> Pin<Box<dyn Future<Output = Result<CheckpointResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_checkpoint_v2<'life0, 'async_trait>(
&'life0 self,
request: CheckpointRequestV2,
) -> Pin<Box<dyn Future<Output = Result<CheckpointResponseV2, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_system_state_object<'life0, 'async_trait>(
&'life0 self,
request: SystemStateRequest,
) -> Pin<Box<dyn Future<Output = Result<SuiSystemState, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn validator_health<'life0, 'async_trait>(
&'life0 self,
request: ValidatorHealthRequest,
) -> Pin<Box<dyn Future<Output = Result<ValidatorHealthResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validator_health<'life0, 'async_trait>(
&'life0 self,
request: ValidatorHealthRequest,
) -> Pin<Box<dyn Future<Output = Result<ValidatorHealthResponse, SuiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get validator health metrics (for latency measurement)
Provided Methods§
Sourcefn reconnect(&self)
fn reconnect(&self)
Force the underlying transport to drop any cached connection and establish a fresh one on the next request. Used to recover from a connection that has silently gone dead (e.g. the peer validator restarted) and is no longer detected as broken by the transport layer. Implementations may rate-limit reconnections and ignore the request during the cooldown. Default is a no-op for client implementations without a reconnectable transport.