pub trait TransactionDigest<A: Authorization> {
type HeaderDigest;
type TransparentDigest;
type SaplingDigest;
type OrchardDigest;
type IronwoodDigest;
type Digest;
// Required methods
fn digest_header(
&self,
version: TxVersion,
consensus_branch_id: BranchId,
lock_time: u32,
expiry_height: BlockHeight,
) -> Self::HeaderDigest;
fn digest_transparent(
&self,
transparent_bundle: Option<&Bundle<A::TransparentAuth, Zatoshis>>,
) -> Self::TransparentDigest;
fn digest_sapling(
&self,
version: TxVersion,
sapling_bundle: Option<&Bundle<A::SaplingAuth, ZatBalance>>,
) -> Self::SaplingDigest;
fn digest_orchard(
&self,
version: TxVersion,
orchard_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>,
) -> Self::OrchardDigest;
fn digest_ironwood(
&self,
ironwood_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>,
) -> Self::IronwoodDigest;
fn combine(
&self,
header_digest: Self::HeaderDigest,
transparent_digest: Self::TransparentDigest,
sapling_digest: Self::SaplingDigest,
orchard_digest: Self::OrchardDigest,
ironwood_digest: Self::IronwoodDigest,
) -> Self::Digest;
}Required Associated Types§
type HeaderDigest
type TransparentDigest
type SaplingDigest
type OrchardDigest
Sourcetype IronwoodDigest
type IronwoodDigest
The digest type produced for the Ironwood bundle in version 6 transactions.
type Digest
Required Methods§
Sourcefn digest_header(
&self,
version: TxVersion,
consensus_branch_id: BranchId,
lock_time: u32,
expiry_height: BlockHeight,
) -> Self::HeaderDigest
fn digest_header( &self, version: TxVersion, consensus_branch_id: BranchId, lock_time: u32, expiry_height: BlockHeight, ) -> Self::HeaderDigest
Digests the canonical version, version-group ID, branch ID, lock time, and expiry height. ZIP 233 is not a header field in any implemented transaction format.
fn digest_transparent( &self, transparent_bundle: Option<&Bundle<A::TransparentAuth, Zatoshis>>, ) -> Self::TransparentDigest
fn digest_sapling( &self, version: TxVersion, sapling_bundle: Option<&Bundle<A::SaplingAuth, ZatBalance>>, ) -> Self::SaplingDigest
fn digest_orchard( &self, version: TxVersion, orchard_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>, ) -> Self::OrchardDigest
Sourcefn digest_ironwood(
&self,
ironwood_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>,
) -> Self::IronwoodDigest
fn digest_ironwood( &self, ironwood_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>, ) -> Self::IronwoodDigest
Computes the digest for the Ironwood bundle.
Ironwood bundles are Orchard-shaped, but they use a distinct bundle personalization.
Transaction ID digesters should return None when no Ironwood bundle is present;
version 6 transaction ID combination substitutes the empty Ironwood bundle digest for
None. Transaction commitment digesters may instead return an empty authorizing data
digest when no Ironwood bundle is present, and may use a different anchor commitment
policy than transaction ID digesters.
fn combine( &self, header_digest: Self::HeaderDigest, transparent_digest: Self::TransparentDigest, sapling_digest: Self::SaplingDigest, orchard_digest: Self::OrchardDigest, ironwood_digest: Self::IronwoodDigest, ) -> Self::Digest
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".