pub fn compute_platform_sighash(
bundle_commitment: &[u8; 32],
extra_data: &[u8],
) -> [u8; 32]Expand description
Computes the platform sighash from an Orchard bundle commitment and optional transparent field data.
The sighash is computed as:
SHA-256(SIGHASH_DOMAIN || bundle_commitment || extra_data)
This binds transparent state transition fields (like output_address in unshield
or output_script in shielded withdrawal) to the Orchard signatures, preventing
replay attacks where an attacker substitutes transparent fields while reusing a
valid Orchard bundle.
The same computation must be used on both the signing (client) and verification
(platform) sides. For transitions without transparent fields (shield and
shielded_transfer), extra_data is empty.