pub trait PublicCredentials<Block: BlockT, SubjectId, CredentialId, CredentialEntry, Filter, Error>: Core<Block>where
    SubjectId: Codec,
    CredentialId: Codec,
    CredentialEntry: Codec,
    Filter: Codec + ItemFilter<CredentialEntry>,
    Error: Codec,{
    // Provided methods
    fn get_by_id(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        credential_id: CredentialId
    ) -> Result<Option<CredentialEntry>, ApiError> { ... }
    fn get_by_subject(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        subject: SubjectId,
        filter: Option<Filter>
    ) -> Result<Result<Vec<(CredentialId, CredentialEntry)>, Error>, ApiError> { ... }
}
Expand description

The API to query public credentials for a subject.

Provided Methods§

source

fn get_by_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, credential_id: CredentialId ) -> Result<Option<CredentialEntry>, ApiError>

Return the public credential with the specified ID, if found.

source

fn get_by_subject( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, subject: SubjectId, filter: Option<Filter> ) -> Result<Result<Vec<(CredentialId, CredentialEntry)>, Error>, ApiError>

Return all the public credentials linked to the specified subject. An optional filter can be passed to be applied to the result before being returned to the client. It returns an error if the provided specified subject ID is not valid.

Trait Implementations§

source§

impl<Block: BlockT, SubjectId, CredentialId, CredentialEntry, Filter, Error> RuntimeApiInfo for dyn PublicCredentials<Block, SubjectId, CredentialId, CredentialEntry, Filter, Error>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§