pub fn build_shield_from_asset_lock_transition<P: OrchardProver>(
recipient: &OrchardAddress,
shield_amount: u64,
asset_lock_proof: AssetLockProof,
asset_lock_private_key: &[u8],
prover: &P,
memo: [u8; 36],
sender_ovk: Option<OutgoingViewingKey>,
surplus_output: Option<PlatformAddress>,
dummy_outputs: usize,
platform_version: &PlatformVersion,
) -> Result<StateTransition, ProtocolError>Expand description
Builds a ShieldFromAssetLock state transition (core asset lock -> shielded pool).
Like Shield, constructs an output-only Orchard bundle. The funds come from a core asset lock proof rather than platform address inputs.
§Parameters
recipient- Orchard address to receive the shielded noteshield_amount- Amount of credits to shield (from the asset lock)asset_lock_proof- Proof that funds are locked on core chainasset_lock_private_key- Private key for the asset lock (signs the transition)prover- Orchard prover (holds the Halo 2 proving key)memo- 36-byte structured memo for the recipient (4-byte type tag + 32-byte payload)sender_ovk- The sender’s outgoing viewing key (External scope). WithSome, the recipient output’sout_ciphertextis encrypted under it so the sender can later recover the sent note (recipient, value, memo) from chain data via OVK recovery — the Zcash outgoing-transaction-history convention. WithNone, a random outgoing cipher key is used and the sent note is unrecoverable by anyone.surplus_output- Optional platform address that receives the asset-lock surplus (asset_lock_value − shield_amount − fee); whenNone, the surplus is added to the fee pools, capped atshielded_implicit_fee_capdummy_outputs- Number of extra zero-value anonymity-set filler outputs to append after the real recipient output (unrecoverable random addresses,NoneOVK, empty memo).0reproduces the historical single-output bundle exactly. The on-wire action count becomesmax(1 + dummy_outputs, 2), which consensus prices the fee from — see the pool-seeding flow.platform_version- Protocol version