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§

source

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

source

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)

source

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)

Trait Implementations§

source§

impl<Block: BlockT, AccountId> RuntimeApiInfo for dyn MsaRuntimeApi<Block, AccountId>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§