Skip to main content

Module orchard

Module orchard 

Source
Expand description

Functions for parsing & serialization of Orchard transaction components.

Modules§

testingtest-dependencies

Constants§

ACTION_SIZE
The size in bytes of an Orchard action description, as written by write_action_without_auth.
BUNDLE_OVERHEAD
The per-bundle overhead of an Orchard/Ironwood bundle, excluding the proof and the per-action data: flags (1) + value_balance (8) + anchor (32) + binding_sig (64) + a CompactSize prefix for the actions vector (at most 9 bytes, budgeted as 10). The proof is a fixed base plus a per-action share computed via orchard::Proof::expected_proof_size, so it is added at the call site rather than included here.
FLAGS_EXPECTED_UNSET
FLAG_OUTPUTS_ENABLED
FLAG_SPENDS_ENABLED
SPEND_AUTH_SIG_SIZE
The size in bytes of an Orchard/Ironwood spend authorization signature, as encoded separately from the action description in the bundle’s vSpendAuthSigs array.

Traits§

MapAuth

Functions§

bundle_version_for_branch
Returns the [BundleVersion] in effect for the given Orchard-protocol value pool under the given consensus branch, or None if the pool is not supported under that branch (the Orchard pool prior to NU5; the Ironwood pool prior to NU6.3).
read_action_without_auth
read_anchor
read_cmx
read_flags
read_note_ciphertext
read_nullifier
read_signature
read_v5_bundle
Reads an [orchard::Bundle] from a v5 transaction format.
read_v6_bundle
Reads an [orchard::Bundle] from a v6 transaction format. pool selects the bundle slot to read: the Orchard slot ([ValuePool::Orchard]) or the Ironwood slot ([ValuePool::Ironwood], whose flag-byte encoding permits the cross-address bit, unlike the Orchard v6 pool). The slot’s [BundleVersion] is derived from consensus_branch_id (see bundle_version_for_branch); a non-empty bundle in a slot whose value pool is not supported under the transaction’s consensus branch is rejected as invalid data.
read_value_commitment
read_verification_key
write_action_without_auth
write_cmx
write_note_ciphertext
write_nullifier
write_v5_bundle
Writes an [orchard::Bundle] in the v5 transaction format.
write_v6_bundle
Writes an [orchard::Bundle] in the v6 transaction format. The bundle’s own [BundleVersion] selects the pool (and hence the flag-byte grammar): the Orchard slot uses [BundleVersion::orchard_v3], the Ironwood slot [BundleVersion::ironwood_v3].
write_value_commitment
write_verification_key