pub fn create_pczt_from_proposal<DbT, ParamsT, InputsErrT, FeeRuleT, ChangeErrT, N>(
wallet_db: &mut DbT,
params: &ParamsT,
clock: &impl Clock,
rng: &mut impl CryptoRng,
account_id: <DbT as WalletRead>::AccountId,
ovk_policy: OvkPolicy,
proposal: &Proposal<FeeRuleT, N>,
expiry_height: Option<BlockHeight>,
orchard_pool_padding: BundlePadding,
) -> Result<Pczt, CreateErrT<DbT, InputsErrT, FeeRuleT, ChangeErrT, N>>where
DbT: WalletWrite + WalletCommitmentTrees,
ParamsT: Parameters + Clone,
FeeRuleT: FeeRule,
<DbT as WalletRead>::AccountId: Serialize,pczt only.Expand description
Constructs a transaction using the inputs supplied by the given proposal.
Only single-step proposals are currently supported.
Returns a partially-created Zcash transaction (PCZT) that is ready to be authorized. You can use the following roles for this:
pczt::roles::prover::Proverpczt::roles::signer::Signer(if you have local access to the spend authorizing keys)pczt::roles::combiner::Combiner(if you create proofs and apply signatures in parallel)
Before sending the PCZT to an external Signer, create a signer view with
redact_pczt_for_signer and retain the original for combination.
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.
Once the PCZT fully authorized, call extract_and_store_transaction_from_pczt to
finish transaction creation.
expiry_height, when set, replaces the builder-derived expiry before
the PCZT is finalized. Applying this override after finalization can invalidate
dummy spend signatures.
A nonzero expiry_height below the proposal’s
min_target_height is rejected with
Error::ExpiryHeightBelowTargetHeight. An expiry_height of zero,
which disables expiry, is exempt from this check.
orchard_pool_padding selects the transactional bundle padding for the Orchard
bundle; pass
BundlePadding::DEFAULT.
The Ironwood bundle’s padding is not a caller’s to choose: it is derived from the
proposal by Step::ironwood_bundle_padding,
so that it matches the action count the fee was computed from.
rng supplies the randomness used to construct the PCZT and to sign its dummy spends.