Struct akd::ecvrf::HardCodedAkdVRF

source ·
pub struct HardCodedAkdVRF;
Expand description

This is a version of VRFKeyStorage for testing purposes, which uses the example from the VRF crate.

const KEY_MATERIAL: &str = “c9afa9d845ba75166b5c215767b1d6934e50c3db36e89b127b8a622b120f6721”;

Trait Implementations§

source§

impl Clone for HardCodedAkdVRF

source§

fn clone(&self) -> HardCodedAkdVRF

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl VRFKeyStorage for HardCodedAkdVRF

source§

fn retrieve<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, HardCodedAkdVRF: 'async_trait,

Retrieve the VRF Private key as a vector of bytes
source§

fn get_vrf_private_key<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<VRFPrivateKey, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, Self: 'async_trait,

Retrieve the properly constructed VRF Private key
source§

fn get_vrf_public_key<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<VRFPublicKey, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, Self: 'async_trait,

Retrieve the VRF public key
source§

fn get_node_label<'life0, 'life1, 'async_trait, TC>( &'life0 self, label: &'life1 AkdLabel, freshness: VersionFreshness, version: u64 ) -> Pin<Box<dyn Future<Output = Result<NodeLabel, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, TC: 'async_trait + Configuration, Self: 'async_trait,

Returns the NodeLabel that corresponds to a version of the label argument. Read more
source§

fn get_node_label_with_expanded_key<TC>( expanded_private_key: &VRFExpandedPrivateKey, pk: &VRFPublicKey, label: &AkdLabel, freshness: VersionFreshness, version: u64 ) -> NodeLabelwhere TC: Configuration,

Returns the NodeLabel that corresponds to a version of the label argument utilizing the provided private key. Read more
source§

fn get_node_label_from_vrf_proof<'life0, 'async_trait>( &'life0 self, proof: Proof ) -> Pin<Box<dyn Future<Output = NodeLabel> + Send + 'async_trait>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the tree nodelabel that corresponds to a vrf proof.
source§

fn get_label_proof<'life0, 'life1, 'async_trait, TC>( &'life0 self, label: &'life1 AkdLabel, freshness: VersionFreshness, version: u64 ) -> Pin<Box<dyn Future<Output = Result<Proof, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, TC: 'async_trait + Configuration, Self: 'async_trait,

Retrieve the proof for a specific label
source§

fn get_label_proof_with_key<TC>( key: &VRFPrivateKey, label: &AkdLabel, freshness: VersionFreshness, version: u64 ) -> Proofwhere TC: Configuration,

Retrieve the proof for a specific label, with a supplied private key
source§

fn get_label_with_key_helper<TC>( expanded_private_key: &VRFExpandedPrivateKey, pk: &VRFPublicKey, label: &AkdLabel, freshness: VersionFreshness, version: u64 ) -> Outputwhere TC: Configuration,

Retrieve the output for a specific label, with a supplied private key
source§

fn get_node_labels<'life0, 'life1, 'async_trait, TC>( &'life0 self, labels: &'life1 [(AkdLabel, VersionFreshness, u64, AkdValue)] ) -> Pin<Box<dyn Future<Output = Result<Vec<((AkdLabel, VersionFreshness, u64, AkdValue), NodeLabel)>, VrfError>> + Send + 'async_trait>>where 'life0: 'async_trait, 'life1: 'async_trait, TC: 'async_trait + Configuration, Self: 'async_trait,

Returns the NodeLabels that corresponds to a collection of (label, freshness, version) arguments with only a single fetch to retrieve the VRF private key from storage. Read more
source§

impl Send for HardCodedAkdVRF

source§

impl Sync for HardCodedAkdVRF

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.