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>>>>;
fn get_all_granted_delegations_by_msa_id(
&self,
delegator_msa_id: DelegatorId,
) -> RpcResult<Vec<DelegationResponse<SchemaId, BlockNumber>>>;
fn get_keys_by_msa_id(
&self,
msa_id: MessageSourceId,
) -> RpcResult<Option<KeyInfoResponse<AccountId>>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static,
AccountId: Send + Sync + 'static + Clone + Serialize { ... }
}
Expand description
Server trait implementation for the MsaApi
RPC API.
Required Methods§
Sourcefn check_delegations(
&self,
delegator_msa_ids: Vec<DelegatorId>,
provider_msa_id: ProviderId,
block_number: BlockNumber,
schema_id: Option<SchemaId>,
) -> RpcResult<Vec<(DelegatorId, bool)>>
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
Sourcefn get_granted_schemas_by_msa_id(
&self,
delegator_msa_id: DelegatorId,
provider_msa_id: ProviderId,
) -> RpcResult<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>>
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
Sourcefn get_all_granted_delegations_by_msa_id(
&self,
delegator_msa_id: DelegatorId,
) -> RpcResult<Vec<DelegationResponse<SchemaId, BlockNumber>>>
fn get_all_granted_delegations_by_msa_id( &self, delegator_msa_id: DelegatorId, ) -> RpcResult<Vec<DelegationResponse<SchemaId, BlockNumber>>>
Retrieve the list of all delegations for a MsaId
Sourcefn get_keys_by_msa_id(
&self,
msa_id: MessageSourceId,
) -> RpcResult<Option<KeyInfoResponse<AccountId>>>
fn get_keys_by_msa_id( &self, msa_id: MessageSourceId, ) -> RpcResult<Option<KeyInfoResponse<AccountId>>>
Retrieve the list of keys for msa id
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.