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§
Sourcefn sign_state(
private_key: &Self::StatePrivateKey,
msg: CircuitField,
) -> Result<Self::StateSignature, Self::SignError>
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.
Sourcefn verify_state_sig(
&self,
signature: &Self::StateSignature,
msg: CircuitField,
) -> bool
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.