pub trait MsaRuntimeApi<Block: BlockT, AccountId>: Core<Block>where
AccountId: Codec,{
// Provided methods
fn has_delegation(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId,
provider: ProviderId,
block_number: BlockNumber,
schema_id: Option<SchemaId>
) -> Result<bool, ApiError> { ... }
fn get_granted_schemas_by_msa_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId,
provider: ProviderId
) -> Result<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>, ApiError> { ... }
fn get_all_granted_delegations_by_msa_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId
) -> Result<Vec<DelegationResponse<SchemaId, BlockNumber>>, ApiError> { ... }
}
Expand description
Runtime Version for MSAs
- MUST be incremented if anything changes
- Also update in js/api-augment
- See: https://paritytech.github.io/polkadot/doc/polkadot_primitives/runtime_api/index.html Runtime API definition for MSA
Provided Methods§
sourcefn has_delegation(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId,
provider: ProviderId,
block_number: BlockNumber,
schema_id: Option<SchemaId>
) -> Result<bool, ApiError>
fn has_delegation( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, delegator: DelegatorId, provider: ProviderId, block_number: BlockNumber, schema_id: Option<SchemaId> ) -> Result<bool, ApiError>
Check to see if a delegation existed between the given delegator and provider at a given block
sourcefn get_granted_schemas_by_msa_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId,
provider: ProviderId
) -> Result<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>, ApiError>
fn get_granted_schemas_by_msa_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, delegator: DelegatorId, provider: ProviderId ) -> Result<Option<Vec<SchemaGrant<SchemaId, BlockNumber>>>, ApiError>
Get the list of schema permission grants (if any) that exist in any delegation between the delegator and provider The returned list contains both schema id and the block number at which permission was revoked (0 if currently not revoked)
sourcefn get_all_granted_delegations_by_msa_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
delegator: DelegatorId
) -> Result<Vec<DelegationResponse<SchemaId, BlockNumber>>, ApiError>
fn get_all_granted_delegations_by_msa_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, delegator: DelegatorId ) -> Result<Vec<DelegationResponse<SchemaId, BlockNumber>>, ApiError>
Get the list of all delegated providers with schema permission grants (if any) that exist in any delegation between the delegator and provider The returned list contains both schema id and the block number at which permission was revoked (0 if currently not revoked)