pub trait LCV2StateSignatureKey: StateSignatureKey {
// Required methods
fn sign_state(
private_key: &Self::StatePrivateKey,
light_client_state: &LightClientState,
next_stake_table_state: &StakeTableState,
) -> Result<Self::StateSignature, Self::SignError>;
fn verify_state_sig(
&self,
signature: &Self::StateSignature,
light_client_state: &LightClientState,
next_stake_table_state: &StakeTableState,
) -> bool;
}
Expand description
Light client V2 signature key functions. The replicas sign the light client state and stake table state for the next update.
Required Methods§
Sourcefn sign_state(
private_key: &Self::StatePrivateKey,
light_client_state: &LightClientState,
next_stake_table_state: &StakeTableState,
) -> Result<Self::StateSignature, Self::SignError>
fn sign_state( private_key: &Self::StatePrivateKey, light_client_state: &LightClientState, next_stake_table_state: &StakeTableState, ) -> Result<Self::StateSignature, Self::SignError>
Sign the light client state
Sourcefn verify_state_sig(
&self,
signature: &Self::StateSignature,
light_client_state: &LightClientState,
next_stake_table_state: &StakeTableState,
) -> bool
fn verify_state_sig( &self, signature: &Self::StateSignature, light_client_state: &LightClientState, next_stake_table_state: &StakeTableState, ) -> bool
Verify the light client state signature
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.