librustzcash/rustdoc/latest/zcash_primitives/transaction/trait.TransactionDigest.html

56 lines
22 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TransactionDigest` trait in crate `zcash_primitives`."><title>TransactionDigest in zcash_primitives::transaction - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-84e720fa.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zcash_primitives" data-themes="" data-resource-suffix="" data-rustdoc-version="1.89.0-nightly (99e7c15e8 2025-06-01)" data-channel="nightly" data-search-js="search-f7877310.js" data-settings-js="settings-5514c975.js" ><script src="../../static.files/storage-4e99c027.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-fd3af306.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zcash_primitives/index.html">zcash_<wbr>primitives</a><span class="version">0.23.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Transaction<wbr>Digest</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Digest" title="Digest">Digest</a></li><li><a href="#associatedtype.HeaderDigest" title="HeaderDigest">HeaderDigest</a></li><li><a href="#associatedtype.OrchardDigest" title="OrchardDigest">OrchardDigest</a></li><li><a href="#associatedtype.SaplingDigest" title="SaplingDigest">SaplingDigest</a></li><li><a href="#associatedtype.TransparentDigest" title="TransparentDigest">TransparentDigest</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.combine" title="combine">combine</a></li><li><a href="#tymethod.digest_header" title="digest_header">digest_header</a></li><li><a href="#tymethod.digest_orchard" title="digest_orchard">digest_orchard</a></li><li><a href="#tymethod.digest_sapling" title="digest_sapling">digest_sapling</a></li><li><a href="#tymethod.digest_transparent" title="digest_transparent">digest_transparent</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In zcash_<wbr>primitives::<wbr>transaction</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zcash_primitives</a>::<wbr><a href="index.html">transaction</a></div><h1>Trait <span class="trait">TransactionDigest</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/zcash_primitives/transaction/mod.rs.html#943-988">Source</a> </span></div><pre class="rust item-decl"><code>pub trait TransactionDigest&lt;A: <a class="trait" href="trait.Authorization.html" title="trait zcash_primitives::transaction::Authorization">Authorization</a>&gt; {
type <a href="#associatedtype.HeaderDigest" class="associatedtype">HeaderDigest</a>;
type <a href="#associatedtype.TransparentDigest" class="associatedtype">TransparentDigest</a>;
type <a href="#associatedtype.SaplingDigest" class="associatedtype">SaplingDigest</a>;
type <a href="#associatedtype.OrchardDigest" class="associatedtype">OrchardDigest</a>;
type <a href="#associatedtype.Digest" class="associatedtype">Digest</a>;
// Required methods
fn <a href="#tymethod.digest_header" class="fn">digest_header</a>(
&amp;self,
version: <a class="enum" href="enum.TxVersion.html" title="enum zcash_primitives::transaction::TxVersion">TxVersion</a>,
consensus_branch_id: <a class="enum" href="../consensus/enum.BranchId.html" title="enum zcash_primitives::consensus::BranchId">BranchId</a>,
lock_time: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
expiry_height: <a class="struct" href="../consensus/struct.BlockHeight.html" title="struct zcash_primitives::consensus::BlockHeight">BlockHeight</a>,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.HeaderDigest" title="type zcash_primitives::transaction::TransactionDigest::HeaderDigest">HeaderDigest</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.digest_transparent" class="fn">digest_transparent</a>(
&amp;self,
transparent_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="components/transparent/struct.Bundle.html" title="struct zcash_primitives::transaction::components::transparent::Bundle">Bundle</a>&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.TransparentAuth" title="type zcash_primitives::transaction::Authorization::TransparentAuth">TransparentAuth</a>&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.TransparentDigest" title="type zcash_primitives::transaction::TransactionDigest::TransparentDigest">TransparentDigest</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.digest_sapling" class="fn">digest_sapling</a>(
&amp;self,
sapling_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Bundle&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.SaplingAuth" title="type zcash_primitives::transaction::Authorization::SaplingAuth">SaplingAuth</a>, ZatBalance&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.SaplingDigest" title="type zcash_primitives::transaction::TransactionDigest::SaplingDigest">SaplingDigest</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.digest_orchard" class="fn">digest_orchard</a>(
&amp;self,
orchard_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Bundle&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.OrchardAuth" title="type zcash_primitives::transaction::Authorization::OrchardAuth">OrchardAuth</a>, ZatBalance&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.OrchardDigest" title="type zcash_primitives::transaction::TransactionDigest::OrchardDigest">OrchardDigest</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.combine" class="fn">combine</a>(
&amp;self,
header_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.HeaderDigest" title="type zcash_primitives::transaction::TransactionDigest::HeaderDigest">HeaderDigest</a>,
transparent_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.TransparentDigest" title="type zcash_primitives::transaction::TransactionDigest::TransparentDigest">TransparentDigest</a>,
sapling_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.SaplingDigest" title="type zcash_primitives::transaction::TransactionDigest::SaplingDigest">SaplingDigest</a>,
orchard_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.OrchardDigest" title="type zcash_primitives::transaction::TransactionDigest::OrchardDigest">OrchardDigest</a>,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.Digest" title="type zcash_primitives::transaction::TransactionDigest::Digest">Digest</a>;
}</code></pre><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.HeaderDigest" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#944">Source</a><h4 class="code-header">type <a href="#associatedtype.HeaderDigest" class="associatedtype">HeaderDigest</a></h4></section><section id="associatedtype.TransparentDigest" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#945">Source</a><h4 class="code-header">type <a href="#associatedtype.TransparentDigest" class="associatedtype">TransparentDigest</a></h4></section><section id="associatedtype.SaplingDigest" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#946">Source</a><h4 class="code-header">type <a href="#associatedtype.SaplingDigest" class="associatedtype">SaplingDigest</a></h4></section><section id="associatedtype.OrchardDigest" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#947">Source</a><h4 class="code-header">type <a href="#associatedtype.OrchardDigest" class="associatedtype">OrchardDigest</a></h4></section><section id="associatedtype.Digest" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#952">Source</a><h4 class="code-header">type <a href="#associatedtype.Digest" class="associatedtype">Digest</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.digest_header" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#954-960">Source</a><h4 class="code-header">fn <a href="#tymethod.digest_header" class="fn">digest_header</a>(
&amp;self,
version: <a class="enum" href="enum.TxVersion.html" title="enum zcash_primitives::transaction::TxVersion">TxVersion</a>,
consensus_branch_id: <a class="enum" href="../consensus/enum.BranchId.html" title="enum zcash_primitives::consensus::BranchId">BranchId</a>,
lock_time: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
expiry_height: <a class="struct" href="../consensus/struct.BlockHeight.html" title="struct zcash_primitives::consensus::BlockHeight">BlockHeight</a>,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.HeaderDigest" title="type zcash_primitives::transaction::TransactionDigest::HeaderDigest">HeaderDigest</a></h4></section><section id="tymethod.digest_transparent" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#962-965">Source</a><h4 class="code-header">fn <a href="#tymethod.digest_transparent" class="fn">digest_transparent</a>(
&amp;self,
transparent_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="components/transparent/struct.Bundle.html" title="struct zcash_primitives::transaction::components::transparent::Bundle">Bundle</a>&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.TransparentAuth" title="type zcash_primitives::transaction::Authorization::TransparentAuth">TransparentAuth</a>&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.TransparentDigest" title="type zcash_primitives::transaction::TransactionDigest::TransparentDigest">TransparentDigest</a></h4></section><section id="tymethod.digest_sapling" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#967-970">Source</a><h4 class="code-header">fn <a href="#tymethod.digest_sapling" class="fn">digest_sapling</a>(
&amp;self,
sapling_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Bundle&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.SaplingAuth" title="type zcash_primitives::transaction::Authorization::SaplingAuth">SaplingAuth</a>, ZatBalance&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.SaplingDigest" title="type zcash_primitives::transaction::TransactionDigest::SaplingDigest">SaplingDigest</a></h4></section><section id="tymethod.digest_orchard" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#972-975">Source</a><h4 class="code-header">fn <a href="#tymethod.digest_orchard" class="fn">digest_orchard</a>(
&amp;self,
orchard_bundle: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Bundle&lt;A::<a class="associatedtype" href="trait.Authorization.html#associatedtype.OrchardAuth" title="type zcash_primitives::transaction::Authorization::OrchardAuth">OrchardAuth</a>, ZatBalance&gt;&gt;,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.OrchardDigest" title="type zcash_primitives::transaction::TransactionDigest::OrchardDigest">OrchardDigest</a></h4></section><section id="tymethod.combine" class="method"><a class="src rightside" href="../../src/zcash_primitives/transaction/mod.rs.html#980-987">Source</a><h4 class="code-header">fn <a href="#tymethod.combine" class="fn">combine</a>(
&amp;self,
header_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.HeaderDigest" title="type zcash_primitives::transaction::TransactionDigest::HeaderDigest">HeaderDigest</a>,
transparent_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.TransparentDigest" title="type zcash_primitives::transaction::TransactionDigest::TransparentDigest">TransparentDigest</a>,
sapling_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.SaplingDigest" title="type zcash_primitives::transaction::TransactionDigest::SaplingDigest">SaplingDigest</a>,
orchard_digest: Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.OrchardDigest" title="type zcash_primitives::transaction::TransactionDigest::OrchardDigest">OrchardDigest</a>,
) -&gt; Self::<a class="associatedtype" href="trait.TransactionDigest.html#associatedtype.Digest" title="type zcash_primitives::transaction::TransactionDigest::Digest">Digest</a></h4></section></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-TransactionDigest%3CAuthorized%3E-for-BlockTxCommitmentDigester" class="impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#426-535">Source</a><a href="#impl-TransactionDigest%3CAuthorized%3E-for-BlockTxCommitmentDigester" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TransactionDigest.html" title="trait zcash_primitives::transaction::TransactionDigest">TransactionDigest</a>&lt;<a class="struct" href="struct.Authorized.html" title="struct zcash_primitives::transaction::Authorized">Authorized</a>&gt; for <a class="struct" href="txid/struct.BlockTxCommitmentDigester.html" title="struct zcash_primitives::transaction::txid::BlockTxCommitmentDigester">BlockTxCommitmentDigester</a></h3></section></summary><div class="impl-items"><section id="associatedtype.HeaderDigest-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#429">Source</a><a href="#associatedtype.HeaderDigest-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.HeaderDigest" class="associatedtype">HeaderDigest</a> = <a class="enum" href="../consensus/enum.BranchId.html" title="enum zcash_primitives::consensus::BranchId">BranchId</a></h4></section><section id="associatedtype.TransparentDigest-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#430">Source</a><a href="#associatedtype.TransparentDigest-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.TransparentDigest" class="associatedtype">TransparentDigest</a> = Hash</h4></section><section id="associatedtype.SaplingDigest-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#431">Source</a><a href="#associatedtype.SaplingDigest-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SaplingDigest" class="associatedtype">SaplingDigest</a> = Hash</h4></section><section id="associatedtype.OrchardDigest-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#432">Source</a><a href="#associatedtype.OrchardDigest-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.OrchardDigest" class="associatedtype">OrchardDigest</a> = Hash</h4></section><section id="associatedtype.Digest-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#437">Source</a><a href="#associatedtype.Digest-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Digest" class="associatedtype">Digest</a> = Hash</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TransactionDigest%3CA%3E-for-TxIdDigester" class="impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#295-359">Source</a><a href="#impl-TransactionDigest%3CA%3E-for-TxIdDigester" class="anchor">§</a><h3 class="code-header">impl&lt;A: <a class="trait" href="trait.Authorization.html" title="trait zcash_primitives::transaction::Authorization">Authorization</a>&gt; <a class="trait" href="trait.TransactionDigest.html" title="trait zcash_primitives::transaction::TransactionDigest">TransactionDigest</a>&lt;A&gt; for <a class="struct" href="txid/struct.TxIdDigester.html" title="struct zcash_primitives::transaction::txid::TxIdDigester">TxIdDigester</a></h3></section></summary><div class="impl-items"><section id="associatedtype.HeaderDigest-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#296">Source</a><a href="#associatedtype.HeaderDigest-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.HeaderDigest" class="associatedtype">HeaderDigest</a> = Hash</h4></section><section id="associatedtype.TransparentDigest-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#297">Source</a><a href="#associatedtype.TransparentDigest-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.TransparentDigest" class="associatedtype">TransparentDigest</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.TransparentDigests.html" title="struct zcash_primitives::transaction::TransparentDigests">TransparentDigests</a>&lt;Hash&gt;&gt;</h4></section><section id="associatedtype.SaplingDigest-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#298">Source</a><a href="#associatedtype.SaplingDigest-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SaplingDigest" class="associatedtype">SaplingDigest</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Hash&gt;</h4></section><section id="associatedtype.OrchardDigest-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#299">Source</a><a href="#associatedtype.OrchardDigest-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.OrchardDigest" class="associatedtype">OrchardDigest</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Hash&gt;</h4></section><section id="associatedtype.Digest-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/zcash_primitives/transaction/txid.rs.html#304">Source</a><a href="#associatedtype.Digest-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Digest" class="associatedtype">Digest</a> = <a class="struct" href="struct.TxDigests.html" title="struct zcash_primitives::transaction::TxDigests">TxDigests</a>&lt;Hash&gt;</h4></section></div></details></div><script src="../../trait.impl/zcash_primitives/transaction/trait.TransactionDigest.js" async></script></section></div></main></body></html>