pub struct MultiCommitBlock {
    pub commitments: Vec<MultiCommitItem>,
    pub entropy: Option<u64>,
}
Expand description

Multi-message commitment data according to LNPBP-4 specification.

To create commitment use TryCommitVerify::try_commit method.

Fields

commitments: Vec<MultiCommitItem>

Array of commitment items (see MultiCommitItem)

entropy: Option<u64>

Entropy used for placeholders. May be unknown if the message is not constructed via TryCommitVerify::try_commit method but is provided by a third-party, whishing to conceal that information.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Encodes the data for the commitment by writing them directly into a io::Write writer instance Read more

Serializes data for the commitment in-memory into a newly allocated array Read more

Type of the resulting commitment

Performs commitment to client-side-validated data

Verifies commitment to client-side-validated data

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Decode with the given std::io::Read instance; must either construct an instance or return implementation-specific error type. Read more

Tries to deserialize byte array into the current type using StrictDecode::strict_decode Read more

Encode with the given std::io::Write instance; must return result with either amount of bytes encoded – or implementation-specific error type. Read more

Serializes data as a byte array using StrictEncode::strict_encode function Read more

Error type that may be reported during TryCommitVerify::try_commit and TryCommitVerify::try_verify procedures Read more

Tries to create commitment to a byte representation of a given message

Tries to verify commitment against the message; default implementation just repeats the commitment to the message and check it against the self. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Verifies commit-equivalence of two instances of the same type.