Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy > Class Template Reference

Wrapper for the Nullifier leaf class that allows for 0 values. More...

#include <nullifier_leaf.hpp>

Public Member Functions

 WrappedNullifierLeaf (indexed_nullifier_leaf value)
 
 WrappedNullifierLeaf ()
 
bool operator== (WrappedNullifierLeaf const &) const =default
 
bool has_value () const
 Pass through the underlying std::optional method.
 
indexed_nullifier_leaf unwrap () const
 Return the wrapped nullifier_leaf object.
 
void set (indexed_nullifier_leaf value)
 Set the wrapped nullifier_leaf object value.
 
bb::fr hash () const
 Return the hash of the wrapped object, other return the zero hash of 0.
 

Static Public Member Functions

static WrappedNullifierLeaf< HashingPolicy > zero ()
 Generate a zero leaf (call the constructor with no arguments)
 

Private Attributes

std::optional< indexed_nullifier_leafdata
 

Detailed Description

template<typename HashingPolicy>
class bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >

Wrapper for the Nullifier leaf class that allows for 0 values.

Definition at line 42 of file nullifier_leaf.hpp.

Constructor & Destructor Documentation

◆ WrappedNullifierLeaf() [1/2]

template<typename HashingPolicy >
bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::WrappedNullifierLeaf ( indexed_nullifier_leaf  value)
inline

Definition at line 46 of file nullifier_leaf.hpp.

◆ WrappedNullifierLeaf() [2/2]

template<typename HashingPolicy >
bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::WrappedNullifierLeaf ( )
inline

Definition at line 50 of file nullifier_leaf.hpp.

Member Function Documentation

◆ has_value()

template<typename HashingPolicy >
bool bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::has_value ( ) const
inline

Pass through the underlying std::optional method.

Returns
true
false

Definition at line 62 of file nullifier_leaf.hpp.

◆ hash()

template<typename HashingPolicy >
bb::fr bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::hash ( ) const
inline

Return the hash of the wrapped object, other return the zero hash of 0.

Returns
bb::fr

Definition at line 83 of file nullifier_leaf.hpp.

◆ operator==()

template<typename HashingPolicy >
bool bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::operator== ( WrappedNullifierLeaf< HashingPolicy > const &  ) const
default

◆ set()

template<typename HashingPolicy >
void bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::set ( indexed_nullifier_leaf  value)
inline

Set the wrapped nullifier_leaf object value.

Parameters
value

Definition at line 76 of file nullifier_leaf.hpp.

◆ unwrap()

template<typename HashingPolicy >
indexed_nullifier_leaf bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::unwrap ( ) const
inline

Return the wrapped nullifier_leaf object.

Returns
nullifier_leaf

Definition at line 69 of file nullifier_leaf.hpp.

◆ zero()

template<typename HashingPolicy >
static WrappedNullifierLeaf< HashingPolicy > bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::zero ( )
inlinestatic

Generate a zero leaf (call the constructor with no arguments)

Returns
NullifierLeaf

Definition at line 93 of file nullifier_leaf.hpp.

Member Data Documentation

◆ data

template<typename HashingPolicy >
std::optional<indexed_nullifier_leaf> bb::crypto::merkle_tree::WrappedNullifierLeaf< HashingPolicy >::data
private

Definition at line 97 of file nullifier_leaf.hpp.


The documentation for this class was generated from the following file: