Skip to main content

ProofsMethods

Trait ProofsMethods 

Source
pub trait ProofsMethods {
    // Required methods
    fn count_by_keyset(&self) -> HashMap<Id, u64>;
    fn sum_by_keyset(&self) -> HashMap<Id, Amount>;
    fn total_amount(&self) -> Result<Amount, Error>;
    fn ys(&self) -> Result<Vec<PublicKey>, Error>;
    fn without_dleqs(&self) -> Vec<Proof>;
    fn without_p2pk_e(&self) -> Vec<Proof>;
}
Expand description

Utility methods for Proofs

Required Methods§

Source

fn count_by_keyset(&self) -> HashMap<Id, u64>

Count proofs by keyset

Source

fn sum_by_keyset(&self) -> HashMap<Id, Amount>

Sum proofs by keyset

Source

fn total_amount(&self) -> Result<Amount, Error>

Try to sum up the amounts of all Proofs

Source

fn ys(&self) -> Result<Vec<PublicKey>, Error>

Try to fetch the pubkeys of all Proofs

Source

fn without_dleqs(&self) -> Vec<Proof>

Create a copy of proofs without dleqs

Source

fn without_p2pk_e(&self) -> Vec<Proof>

Create a copy of proofs without P2BK nonce

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ProofsMethods for HashSet<Proof>

Source§

impl ProofsMethods for Vec<Proof>

Implementors§