Type Alias sp_core::sr25519::Public

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

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

Aliased Type§

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

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

§

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

§

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

§

type VrfInput = VrfTranscript

VRF input.
§

type VrfPreOutput = VrfPreOutput

VRF pre-output.
§

type VrfSignData = VrfSignData

VRF signing data.
§

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