Skip to main content

Module shielded

Module shielded 

Source

Structs§

OrchardBundleParams
Common Orchard bundle parameters shared across all shielded transition types.
SerializedAction
A serialized Orchard action extracted from a bundle.

Constants§

SHIELDED_STORAGE_BYTES_PER_ACTION
Permanent storage bytes per shielded action: 312 bytes total.
SHIELDED_UNSHIELD_ADDRESS_STORAGE_BYTES
Calibrated effective storage-byte cost of the single AddBalanceToAddress write an Unshield performs, crediting the net (unshielding_amount − fee) to the output platform address.
SHIELDED_WITHDRAWAL_DOCUMENT_STORAGE_BYTES
Calibrated effective storage-byte cost of the Core withdrawal document a ShieldedWithdrawal creates.

Functions§

compute_minimum_shielded_fee
Computes the minimum flat fee (in credits) for a pool-paid / asset-lock shielded transition.
compute_platform_sighash
Computes the platform sighash from an Orchard bundle commitment and optional transparent field data.
compute_shielded_unshield_fee
Computes the Unshield fee (in credits): compute_minimum_shielded_fee PLUS the flat storage cost of the single AddBalanceToAddress write an Unshield performs.
compute_shielded_verification_fee
Computes the compute-only shielded fee (in credits): the ZK-compute portion (Halo 2 proof verification + per-action spend-auth/nullifier processing) that GroveDB metering cannot see.
compute_shielded_withdrawal_fee
Computes the ShieldedWithdrawal fee (in credits): compute_minimum_shielded_fee PLUS the flat storage cost of the Core withdrawal document a ShieldedWithdrawal inserts.
shielded_withdrawal_extra_sighash_data
Builds the transparent extra_data bound into a ShieldedWithdrawal’s platform sighash, with the byte layout output_script || unshielding_amount (u64 LE) || core_fee_per_byte (u32 LE) || pooling (u8).
unshield_extra_sighash_data
Builds the transparent extra_data bound into an Unshield’s platform sighash, with the byte layout output_address || unshielding_amount (u64 LE).