Skip to main content

Module shielded

Module shielded 

Source

Re-exports§

pub use memo::ShieldedMemo;
pub use memo::MEMO_PAYLOAD_SIZE;
pub use memo::MEMO_SIZE;

Modules§

memo
Structured 36-byte shielded note memo (DashMemo).

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: 344 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_identity_create_fee
Computes the IdentityCreateFromShieldedPool fee (in credits): compute_minimum_shielded_fee PLUS the variable storage cost of the AddNewIdentity write (identity record + balance + revision + N key subtrees), which scales with the number of public keys.
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.
identity_create_from_shielded_extra_sighash_data
Builds the transparent extra_data bound into an IdentityCreateFromShieldedPool’s platform sighash, with the byte layout identity_id (32) || denomination (u64 LE) || send_to_address_on_creation_failure (tag u8: 0=P2pkh, 1=P2sh || hash 20) || num_keys (u16 LE) || for each key in supplied order: key_id (u32 LE) || purpose (u8) || security_level (u8) || key_type (u8) || key_data_len (u16 LE) || key_data || read_only (u8) || contract_bounds (tag u8: 0=None, 1=SingleContract id(32), 2=SingleContractDocumentType id(32) name_len(u16 LE) name).
identity_create_from_shielded_extra_sighash_data_v0
v0 byte layout of identity_create_from_shielded_extra_sighash_data (see that function’s doc comment for the layout and rationale). Frozen: never mutate; a layout change requires a new _v1
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).
shielded_withdrawal_extra_sighash_data_v0
v0 byte layout of shielded_withdrawal_extra_sighash_data (see that function’s doc comment for the layout and rationale). Frozen: never mutate; a layout change requires a new _v1 + version.
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).
unshield_extra_sighash_data_v0
v0 byte layout of unshield_extra_sighash_data (see that function’s doc comment for the layout and rationale). Frozen: never mutate; a layout change requires a new _v1 + version bump.