pub struct Builder<P: Parameters, R: RngCore + CryptoRng> {
    pub sighash: [u8; 32],
    /* private fields */
}
Expand description

Generates a Transaction from its inputs and outputs.

This is a rather low level builder, and is a HSM-compatible version of zcash_primitives::transaction::builder::Builder.

Fields

sighash: [u8; 32]

Implementations

Creates a new Builder targeted for inclusion in the block with the given height, using default values for general transaction fields and the default OS random.

Default values

The expiry height will be set to the given height plus the default transaction expiry delta (20 blocks).

The fee will be set to the default fee (0.0001 ZEC).

Creates a new Builder targeted for inclusion in the block with the given height and randomness source, using default values for general transaction fields.

Default values

The expiry height will be set to the given height plus the default transaction expiry delta (20 blocks).

The fee will be set to the default fee (0.0001 ZEC).

Adds a Sapling note to be spent in this transaction.

Returns an error if the given Merkle path does not have the same anchor as the paths for previous Sapling notes.

Adds a Sapling address to send funds to.

Adds a transparent coin to be spent in this transaction.

Adds a transparent address to send funds to.

Prepares a transaction to be transmitted to the HSM from the configured spends and outputs.

Upon success, returns the structure that can be serialized in in the format understood by the HSM and subsequently transmitted via the appropriate method.

After having retrieved the signatures from the HSM and having applied them with the appropriate methods of the builder, it’s possible to retrieve the final signature using Builder::finalize

consensus_branch_id must be valid for the block height that this transaction is targeting. An invalid consensus_branch_id will not result in an error from this function, and instead will generate a transaction that will be rejected by the network.

Attempt to apply the signatures for the transparent components of the transaction

Attempt to apply the signatures for the shielded components of the transaction

Finalize the transaction, after having obtained all the signatures from the the HSM.

Upon success, returns a tuple containing the final transaction, and the TransactionMetadata generated during the build process.

Same as finalize, except serialized to the format understood by the JavaScript users

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.