Type Alias SchnorrPubKey

Source
pub type SchnorrPubKey = VerKey<EdwardsConfig>;

Aliased Type§

pub struct SchnorrPubKey(/* private fields */);

Trait Implementations§

Source§

impl LCV1StateSignatureKey for SchnorrPubKey

Source§

fn sign_state( sk: &Self::StatePrivateKey, light_client_state: &LightClientState, ) -> Result<Self::StateSignature, Self::SignError>

Sign the state for legacy light client
Source§

fn verify_state_sig( &self, signature: &Self::StateSignature, light_client_state: &LightClientState, ) -> bool

Verify the state signature for legacy light client
Source§

impl LCV2StateSignatureKey for SchnorrPubKey

Source§

fn sign_state( sk: &Self::StatePrivateKey, light_client_state: &LightClientState, next_stake_table_state: &StakeTableState, ) -> Result<Self::StateSignature, Self::SignError>

Sign the light client state
Source§

fn verify_state_sig( &self, signature: &Self::StateSignature, light_client_state: &LightClientState, next_stake_table_state: &StakeTableState, ) -> bool

Verify the light client state signature
Source§

impl LCV3StateSignatureKey for SchnorrPubKey

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.

Source§

impl StateSignatureKey for SchnorrPubKey

Source§

type StatePrivateKey = SignKey<Fp<MontBackend<FrConfig, 4>, 4>>

The private key type
Source§

type StateSignature = Signature<EdwardsConfig>

The type of the signature
Source§

type SignError = SignatureError

Type of error that can occur when signing data
Source§

fn generated_from_seed_indexed( seed: [u8; 32], index: u64, ) -> (Self, Self::StatePrivateKey)

Generate a new key pair