pub trait SubspaceRpcApiServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>; fn submit_solution_response( &self, solution_response: SolutionResponse, ) -> Result<(), Error>; fn submit_reward_signature( &self, reward_signature: RewardSignatureResponse, ) -> Result<(), Error>; fn segment_headers<'life0, 'async_trait>( &'life0 self, segment_indexes: Vec<SegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn piece(&self, piece_index: PieceIndex) -> Result<Option<Piece>, Error>; fn acknowledge_archived_segment_header<'life0, 'async_trait>( &'life0 self, segment_index: SegmentIndex, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn last_segment_headers<'life0, 'async_trait>( &'life0 self, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn subscribe_slot_info(&self, subscription_sink: PendingSubscriptionSink); fn subscribe_reward_signing( &self, subscription_sink: PendingSubscriptionSink, ); fn subscribe_archived_segment_header( &self, subscription_sink: PendingSubscriptionSink, ); fn subscribe_archived_object_mappings( &self, subscription_sink: PendingSubscriptionSink, ); fn subscribe_filtered_object_mappings( &self, subscription_sink: PendingSubscriptionSink, hashes: Vec<Blake3HashHex>, ); // Provided method fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the SubspaceRpcApi RPC API.

Required Methods§

source

fn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>

Get metadata necessary for farmer operation

source

fn submit_solution_response( &self, solution_response: SolutionResponse, ) -> Result<(), Error>

source

fn submit_reward_signature( &self, reward_signature: RewardSignatureResponse, ) -> Result<(), Error>

source

fn segment_headers<'life0, 'async_trait>( &'life0 self, segment_indexes: Vec<SegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn piece(&self, piece_index: PieceIndex) -> Result<Option<Piece>, Error>

source

fn acknowledge_archived_segment_header<'life0, 'async_trait>( &'life0 self, segment_index: SegmentIndex, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn last_segment_headers<'life0, 'async_trait>( &'life0 self, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn subscribe_slot_info(&self, subscription_sink: PendingSubscriptionSink)

Slot info subscription

source

fn subscribe_reward_signing(&self, subscription_sink: PendingSubscriptionSink)

Sign block subscription

source

fn subscribe_archived_segment_header( &self, subscription_sink: PendingSubscriptionSink, )

Archived segment header subscription

source

fn subscribe_archived_object_mappings( &self, subscription_sink: PendingSubscriptionSink, )

Block/transaction archived object mappings subscription

source

fn subscribe_filtered_object_mappings( &self, subscription_sink: PendingSubscriptionSink, hashes: Vec<Blake3HashHex>, )

Filtered block/transaction archived object mappings subscription

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Block, Client, SO, AS> SubspaceRpcApiServer for SubspaceRpc<Block, Client, SO, AS>
where Block: BlockT, Client: ProvideRuntimeApi<Block> + HeaderBackend<Block> + BlockBackend<Block> + Send + Sync + 'static, Client::Api: ObjectsApi<Block>, SO: SyncOracle + Send + Sync + Clone + 'static, AS: AuxStore + Send + Sync + 'static,