Skip to main content

TransactionDigest

Trait TransactionDigest 

Source
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§

Source

type HeaderDigest

Source

type TransparentDigest

Source

type SaplingDigest

Source

type OrchardDigest

Source

type IronwoodDigest

The digest type produced for the Ironwood bundle in version 6 transactions.

Source

type Digest

Required Methods§

Source

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.

Source

fn digest_transparent( &self, transparent_bundle: Option<&Bundle<A::TransparentAuth, Zatoshis>>, ) -> Self::TransparentDigest

Source

fn digest_sapling( &self, version: TxVersion, sapling_bundle: Option<&Bundle<A::SaplingAuth, ZatBalance>>, ) -> Self::SaplingDigest

Source

fn digest_orchard( &self, version: TxVersion, orchard_bundle: Option<&Bundle<A::OrchardAuth, ZatBalance>>, ) -> Self::OrchardDigest

Source

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.

Source

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".

Implementors§