Skip to main content

redact_pczt_for_signer

Function redact_pczt_for_signer 

Source
pub fn redact_pczt_for_signer(pczt: &Pczt, view: SignerView) -> Pczt
Available on crate feature pczt only.
Expand description

Creates a redacted copy of a wallet PCZT for an external Signer.

This is intended for PCZTs returned by create_pczt_from_proposal. The view argument selects the redaction policy; see SignerView for the receiver capabilities each view requires. When in doubt — in particular for hardware signers whose firmware predates the compact view — use SignerView::Full.

The returned PCZT retains information that a general-purpose Signer may need, including full viewing keys, spend authorization randomizers, key derivation paths, output recovery keys, and user-facing addresses. Applications may apply additional redaction when they know their Signer’s capabilities. A Signer that independently obtains the relevant full viewing keys and returns only Orchard-protocol signature contributions can instead use redact_pczt_for_batch_signer.

The caller must retain pczt and combine the Signer’s contribution into that authoritative copy. The returned signer view omits wallet metadata and other fields that extract_and_store_transaction_from_pczt requires.