Skip to main content

Module zip318

Module zip318 

Source
Available on crate feature orchard only.
Expand description

Assembling ZIP 318 classification evidence from a decrypted transaction.

This is the evidence source a wallet uses in production, and the only one that runs against a transaction the wallet did not build. It lives here, in the backend-generic layer, rather than in a store, because store_decrypted_tx is where the parsed transaction and the decrypted outputs are in hand at the same moment; a store that re-derived the evidence from its own rows would be a second implementation of the predicate to keep in step with this one.

What it can observe is weaker than what the same predicate sees on an unproven transaction, for a reason that is inherent rather than incidental: on chain, a zero-valued padding dummy and an unrelated party’s output are equally undecryptable, so no amount of work distinguishes them. See Zip318Evidence::source_is_send_to_self for how the clause weakens, and classify for why weakening it is sound: it admits more, never less.

Functions§

classify_decrypted_tx
Classifies a decrypted transaction against ZIP 318.