pub type TransactionAccumulatorProof = AccumulatorProof<TransactionAccumulatorHasher>;

Aliased Type§

struct TransactionAccumulatorProof { /* private fields */ }

Implementations

source§

impl<H> AccumulatorProof<H>
where H: CryptoHasher,

source

pub fn new(siblings: Vec<HashValue>) -> Self

Constructs a new AccumulatorProof using a list of siblings.

source

pub fn siblings(&self) -> &[HashValue]

Returns the list of siblings in this proof.

source

pub fn verify( &self, expected_root_hash: HashValue, element_hash: HashValue, element_index: u64 ) -> Result<()>

Verifies an element whose hash is element_hash and version is element_version exists in the accumulator whose root hash is expected_root_hash using the provided proof.

Trait Implementations

source§

impl<H> Serialize for AccumulatorProof<H>

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<H> Debug for AccumulatorProof<H>

source§

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

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

impl<'de, H> Deserialize<'de> for AccumulatorProof<H>

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<H> PartialEq for AccumulatorProof<H>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<H: Clone> Clone for AccumulatorProof<H>

source§

fn clone(&self) -> AccumulatorProof<H>

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<H> Eq for AccumulatorProof<H>