pub trait MsaApiServer<BlockHash, AccountId>: Sized + Send + Sync + 'static {
    // Required methods
    fn check_delegations(
        &self,
        delegator_msa_ids: Vec<DelegatorId>,
        provider_msa_id: ProviderId,
        block_number: BlockNumber,
        schema_id: Option<SchemaId>
    ) -> RpcResult<Vec<(DelegatorId, bool)>>;
    fn get_granted_schemas_by_msa_id(
        &self,
        delegator_msa_id: DelegatorId,
        provider_msa_id: ProviderId
    ) -> RpcResult<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where BlockHash: Send + Sync + 'static,
             AccountId: Send + Sync + 'static { ... }
}
Expand description

Server trait implementation for the MsaApi RPC API.

Required Methods§

source

fn check_delegations( &self, delegator_msa_ids: Vec<DelegatorId>, provider_msa_id: ProviderId, block_number: BlockNumber, schema_id: Option<SchemaId> ) -> RpcResult<Vec<(DelegatorId, bool)>>

Check for a list of delegations Given a single provider, test a list of potential delegators At a given block number

source

fn get_granted_schemas_by_msa_id( &self, delegator_msa_id: DelegatorId, provider_msa_id: ProviderId ) -> RpcResult<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>>

Retrieve the list of currently granted schemas given a delegator and provider pair

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static, AccountId: Send + Sync + 'static,

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

Implementors§

source§

impl<C, Block, AccountId> MsaApiServer<<Block as Block>::Hash, AccountId> for MsaHandler<C, Block>where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: MsaRuntimeApi<Block, AccountId>, AccountId: Codec,