AuthenticatorTrait

Trait AuthenticatorTrait 

Source
pub trait AuthenticatorTrait {
    type Error: From<StdError>;

    // Required methods
    fn authenticate(
        &self,
        ctx: QueryCtx<'_>,
        signed_data: Vec<u8>,
        controller_data: Vec<u8>,
        metadata: Vec<Vec<u8>>,
        signature: Vec<u8>,
    ) -> Result<bool, Self::Error>;
    fn contract_version(
        &self,
        ctx: QueryCtx<'_>,
    ) -> Result<ContractVersion, StdError>;
}
Expand description

The trait for each authenticator contract

Required Associated Types§

Required Methods§

Source

fn authenticate( &self, ctx: QueryCtx<'_>, signed_data: Vec<u8>, controller_data: Vec<u8>, metadata: Vec<Vec<u8>>, signature: Vec<u8>, ) -> Result<bool, Self::Error>

Source

fn contract_version( &self, ctx: QueryCtx<'_>, ) -> Result<ContractVersion, StdError>

Implementors§