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§

builder
Convenience builders for constructing shielded state transitions.
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_IDENTITY_BALANCE_WRITE_STORAGE_BYTES
Flat component (in effective bytes at the per-byte storage rate) for the identity-side writes a ShieldFromIdentity performs on top of its per-action note inserts: the UpdateIdentityNonce and RemoveFromIdentityBalance operations.
SHIELDED_IDENTITY_TOP_UP_BALANCE_STORAGE_BYTES
Flat component (in effective bytes at the per-byte storage rate) for the identity-side write an IdentityTopUpFromShieldedPool performs on top of its per-action nullifier and note writes: the single AddToIdentityBalance operation, charged as part of the pool-paid flat fee (built like SHIELDED_UNSHIELD_ADDRESS_STORAGE_BYTES).
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_balance_write_fee
Computes the conservative admission floor (in credits) of a shielded transition that also writes an identity balance (ShieldFromIdentity): compute_minimum_shielded_fee plus the flat identity-write component (SHIELDED_IDENTITY_BALANCE_WRITE_STORAGE_BYTES effective bytes at the per-byte storage rate: the nonce and balance rewrites’ replace-only tree work, folded into one flat figure like the other shielded components).
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_identity_top_up_fee
Computes the flat fee for IdentityTopUpFromShieldedPool (base minimum plus the flat identity-balance write component).
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, 3=ContractGroup id(32)).
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
identity_top_up_from_shielded_extra_sighash_data
Builds the transparent extra_data bound into an IdentityTopUpFromShieldedPool’s platform sighash, with the byte layout identity_id (32) || top_up_amount (u64 LE).
identity_top_up_from_shielded_extra_sighash_data_v0
v0 byte layout of identity_top_up_from_shielded_extra_sighash_data. Frozen: never mutate; a layout change requires a new _v1 + version bump.
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.