StateTransitionIdentitySigned

Trait StateTransitionIdentitySigned 

Source
pub trait StateTransitionIdentitySigned: StateTransitionLike {
    // Required methods
    fn signature_public_key_id(&self) -> KeyID;
    fn set_signature_public_key_id(&mut self, key_id: KeyID);
    fn security_level_requirement(&self, purpose: Purpose) -> Vec<SecurityLevel>;

    // Provided methods
    fn verify_public_key_level_and_purpose(
        &self,
        public_key: &IdentityPublicKey,
        options: StateTransitionSigningOptions,
    ) -> Result<(), ProtocolError> { ... }
    fn verify_public_key_is_enabled(
        &self,
        public_key: &IdentityPublicKey,
    ) -> Result<(), ProtocolError> { ... }
    fn purpose_requirement(&self) -> Vec<Purpose> { ... }
}

Required Methods§

Source

fn signature_public_key_id(&self) -> KeyID

Source

fn set_signature_public_key_id(&mut self, key_id: KeyID)

Source

fn security_level_requirement(&self, purpose: Purpose) -> Vec<SecurityLevel>

Returns minimal key security level that can be used to sign this ST. Override this method if the ST requires a different security level.

Provided Methods§

Source

fn verify_public_key_level_and_purpose( &self, public_key: &IdentityPublicKey, options: StateTransitionSigningOptions, ) -> Result<(), ProtocolError>

Verifies that the supplied public key has the correct security level and purpose to sign the state transition This should only be used for authentication

Source

fn verify_public_key_is_enabled( &self, public_key: &IdentityPublicKey, ) -> Result<(), ProtocolError>

Source

fn purpose_requirement(&self) -> Vec<Purpose>

The purpose requirement for the signing key The default is authentication However for Withdrawals and Fund Transfers the requirement is TRANSFER

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.

Implementors§