[][src]Trait grin_core::core::committed::Committed

pub trait Committed {
    fn inputs_committed(&self) -> Vec<Commitment>;
fn outputs_committed(&self) -> Vec<Commitment>;
fn kernels_committed(&self) -> Vec<Commitment>; fn sum_kernel_excesses(
        &self,
        offset: &BlindingFactor
    ) -> Result<(Commitment, Commitment), Error> { ... }
fn sum_commitments(&self, overage: i64) -> Result<Commitment, Error> { ... }
fn verify_kernel_sums(
        &self,
        overage: i64,
        kernel_offset: BlindingFactor
    ) -> Result<(Commitment, Commitment), Error> { ... } }

Implemented by types that hold inputs and outputs (and kernels) containing Pedersen commitments. Handles the collection of the commitments as well as their summing, taking potential explicit overages of fees into account.

Required methods

fn inputs_committed(&self) -> Vec<Commitment>

Vector of input commitments to verify.

fn outputs_committed(&self) -> Vec<Commitment>

Vector of output commitments to verify.

fn kernels_committed(&self) -> Vec<Commitment>

Vector of kernel excesses to verify.

Loading content...

Provided methods

fn sum_kernel_excesses(
    &self,
    offset: &BlindingFactor
) -> Result<(Commitment, Commitment), Error>

Gather the kernel excesses and sum them.

fn sum_commitments(&self, overage: i64) -> Result<Commitment, Error>

Gathers commitments and sum them.

fn verify_kernel_sums(
    &self,
    overage: i64,
    kernel_offset: BlindingFactor
) -> Result<(Commitment, Commitment), Error>

Verify the sum of the kernel excesses equals the sum of the outputs, taking into account both the kernel_offset and overage.

Loading content...

Implementations on Foreign Types

impl<'a> Committed for (BlockSums, &'a dyn Committed)[src]

It's a tuple but we can verify the "full" kernel sums on it. This means we can take a previous block_sums, apply a new block to it and verify the full kernel sums (full UTXO and kernel sets).

Loading content...

Implementors

impl Committed for Block[src]

Provides all information from a block that allows the calculation of total Pedersen commitment.

impl Committed for Transaction[src]

impl Committed for TransactionBody[src]

Loading content...