Trait LCV3StateSignatureKey

Source
pub trait LCV3StateSignatureKey: StateSignatureKey {
    // Required methods
    fn sign_state(
        private_key: &Self::StatePrivateKey,
        msg: CircuitField,
    ) -> Result<Self::StateSignature, Self::SignError>;
    fn verify_state_sig(
        &self,
        signature: &Self::StateSignature,
        msg: CircuitField,
    ) -> bool;
}
Expand description

Light client V3 signature key functions. The replicas sign a keccak256 hash of ABI encodings of the light client state, next stake table state, and the auth root.

Required Methods§

Source

fn sign_state( private_key: &Self::StatePrivateKey, msg: CircuitField, ) -> Result<Self::StateSignature, Self::SignError>

Sign the light client state The input msg should be the keccak256 hash of ABI encodings of the light client state, next stake table state, and the auth root.

Source

fn verify_state_sig( &self, signature: &Self::StateSignature, msg: CircuitField, ) -> bool

Verify the light client state signature The input msg should be the keccak256 hash of ABI encodings of the light client state, next stake table state, and the auth root.

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§