Expand description
Convenience builders for constructing shielded state transitions.
These functions encapsulate the full Orchard bundle construction pipeline: builder configuration, proof generation, signature application, and serialization into platform state transitions.
Requires the shielded-client feature, which pulls in
grovedb-commitment-tree (and transitively the orchard crate).
§Example
ⓘ
use dpp::shielded::builder::*;
use grovedb_commitment_tree::{SpendingKey, FullViewingKey, Scope, ProvingKey};
// Derive recipient address
let sk = SpendingKey::from_bytes(seed)?;
let fvk = FullViewingKey::from(&sk);
let recipient = OrchardAddress::from_raw_bytes(
&fvk.address_at(0, Scope::External).to_raw_address_bytes(),
);
// Build a shield transition
let pk = ProvingKey::build();
let st = build_shield_transition(
&recipient, shield_amount, inputs, fee_strategy,
&signer, 0, &pk, [0u8; 36], platform_version,
)?;Structs§
- Serialized
Bundle - The serialized fields extracted from an authorized Orchard bundle, ready for use by state transition constructors.
- Spendable
Note - A note that can be spent in a shielded transaction, paired with its Merkle inclusion path in the commitment tree.
Traits§
- Orchard
Prover - Trait abstracting over Orchard proof generation.
Functions§
- build_
shield_ from_ asset_ lock_ transition - Builds a ShieldFromAssetLock state transition (core asset lock -> shielded pool).
- build_
shield_ transition - Builds a Shield state transition (transparent platform addresses -> shielded pool).
- build_
shielded_ transfer_ transition - Builds a ShieldedTransfer state transition (shielded pool -> shielded pool).
- build_
shielded_ withdrawal_ transition - Builds a ShieldedWithdrawal state transition (shielded pool -> core L1 address).
- build_
unshield_ transition - Builds an Unshield state transition (shielded pool -> platform address).
- serialize_
authorized_ bundle - Serializes an authorized Orchard bundle into the raw fields used by state transition constructors.