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
sourceimpl Clone for HardCodedAkdVRF
impl Clone for HardCodedAkdVRF
sourcefn clone(&self) -> HardCodedAkdVRF
fn clone(&self) -> HardCodedAkdVRF
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl VRFKeyStorage for HardCodedAkdVRF
impl VRFKeyStorage for HardCodedAkdVRF
sourcefn retrieve<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, VrfError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn retrieve<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, VrfError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Retrieve the VRF Private key as a vector of bytes
sourcefn 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,
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
sourcefn 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,
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
sourcefn get_node_label<'life0, 'life1, 'async_trait, H: Hasher>(
&'life0 self,
uname: &'life1 AkdLabel,
stale: bool,
version: u64
) -> Pin<Box<dyn Future<Output = Result<NodeLabel, VrfError>> + Send + 'async_trait>> where
H: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_node_label<'life0, 'life1, 'async_trait, H: Hasher>(
&'life0 self,
uname: &'life1 AkdLabel,
stale: bool,
version: u64
) -> Pin<Box<dyn Future<Output = Result<NodeLabel, VrfError>> + Send + 'async_trait>> where
H: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the tree nodelabel that corresponds to a version of the uname argument. The stale boolean here is to indicate whether we are getting the nodelabel for a fresh version, or a version that we are retiring. Read more
sourcefn get_label_proof<'life0, 'life1, 'async_trait, H: Hasher>(
&'life0 self,
uname: &'life1 AkdLabel,
stale: bool,
version: u64
) -> Pin<Box<dyn Future<Output = Result<Proof, VrfError>> + Send + 'async_trait>> where
H: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_label_proof<'life0, 'life1, 'async_trait, H: Hasher>(
&'life0 self,
uname: &'life1 AkdLabel,
stale: bool,
version: u64
) -> Pin<Box<dyn Future<Output = Result<Proof, VrfError>> + Send + 'async_trait>> where
H: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Retrieve the proof for a specific label
impl Send for HardCodedAkdVRF
impl Sync for HardCodedAkdVRF
Auto Trait Implementations
impl RefUnwindSafe for HardCodedAkdVRF
impl Unpin for HardCodedAkdVRF
impl UnwindSafe for HardCodedAkdVRF
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more