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>;
}
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

Implementations on Foreign Types§

Source§

impl ProofsMethods for Vec<Proof>

Source§

impl ProofsMethods for HashSet<Proof>

Implementors§