Trait commit_verify::merkle::ToMerkleSource
source · pub trait ToMerkleSource {
type Leaf: ConsensusMerkleCommit;
fn to_merkle_source(&self) -> MerkleSource<Self::Leaf>;
}
Expand description
Converts given piece of client-side-validated data into a structure which can be used in merklization process.
This dedicated structure is required since with
impl From<_> for MerkleSource
we would not be able to specify a concrete
tagged hash, which we require in LNPBP-81 merklization and which we
provide here via ToMerkleSource::Leaf
associated type holding [
ConsensusMerkleCommit::MERKLE_NODE_PREFIX`] prefix value.
Required Associated Types§
sourcetype Leaf: ConsensusMerkleCommit
type Leaf: ConsensusMerkleCommit
Defining type of the commitment produced during merlization process
Required Methods§
sourcefn to_merkle_source(&self) -> MerkleSource<Self::Leaf>
fn to_merkle_source(&self) -> MerkleSource<Self::Leaf>
Performs transformation of the data type into a merkilzable data