Trait zcash_primitives::extensions::transparent::ExtensionTxBuilder[][src]

pub trait ExtensionTxBuilder<'a> {
    type BuildCtx;
    type BuildError;
    fn add_tze_input<WBuilder, W: ToPayload>(
        &mut self,
        extension_id: u32,
        mode: u32,
        prevout: (OutPoint, TzeOut),
        witness_builder: WBuilder
    ) -> Result<(), Self::BuildError>
    where
        WBuilder: 'a + FnOnce(&Self::BuildCtx) -> Result<W, Self::BuildError>
;
fn add_tze_output<Precondition: ToPayload>(
        &mut self,
        extension_id: u32,
        value: Amount,
        guarded_by: &Precondition
    ) -> Result<(), Self::BuildError>; }
Expand description

An interface for transaction builders which support addition of TZE inputs and outputs.

This extension trait is satisfied by transaction::builder::Builder. It provides a minimal contract for interacting with the transaction builder, that extension library authors can use to add extension-specific builder traits that may be used to interact with the transaction builder. This may make it simpler for projects that include transaction-builder functionality to integrate with third-party extensions without those extensions being coupled to a particular transaction or builder representation.

Associated Types

Required methods

Adds a TZE input to the transaction by providing a witness to a precondition identified by a prior outpoint.

The witness_builder function allows the transaction builder to provide extra contextual information from the transaction under construction to be used in the production of this witness (for example, so that the witness may internally make commitments based upon this information.) For the standard transaction builder, the value provided here is the transaction under construction.

Adds a TZE precondition to the transaction which must be satisfied by a future transaction’s witness in order to spend the specified amount.

Implementors