Public

Type Alias Public 

Source
pub type Public = CryptoBytes<PUBLIC_KEY_SERIALIZED_SIZE, Sr25519PublicTag>;
Expand description

An Schnorrkel/Ristretto x25519 (“sr25519”) public key.

Aliased Type§

#[repr(transparent)]
pub struct Public(pub [u8; 32], _);

Tuple Fields§

§0: [u8; 32]

Implementations§

Source§

impl Public

Source

pub fn make_bytes<const N: usize>( &self, context: &[u8], input: &VrfInput, pre_output: &VrfPreOutput, ) -> Result<[u8; N], Error>
where [u8; N]: Default,

Generate output bytes from the given VRF configuration.

Trait Implementations§

Source§

impl CryptoType for Public

Source§

type Pair = Pair

The pair key type of this crypto.
Source§

impl Debug for Public

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Derive for Public

Source§

fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, path: Iter, ) -> Option<Public>

Derive a child key from a series of given junctions.

None if there are any hard junctions in there.

Source§

impl<'de> Deserialize<'de> for Public

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Public

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for Public

Source§

type Err = PublicError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Serialize for Public

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl VrfCrypto for Public

Source§

type VrfInput = VrfTranscript

VRF input.
Source§

type VrfPreOutput = VrfPreOutput

VRF pre-output.
Source§

type VrfSignData = VrfSignData

VRF signing data.
Source§

type VrfSignature = VrfSignature

VRF signature.
Source§

impl VrfPublic for Public

Source§

fn vrf_verify( &self, data: &Self::VrfSignData, signature: &Self::VrfSignature, ) -> bool

Verify input data signature.
Source§

impl Public for Public