Realm

oa::crypto::hash::merkle_proofs

Build selected SHAKE-256 Merkle inclusion proofs entirely on the device. leaves is U8 [leaf_count, 32]; indices is rank-one U32. Output is U8 [proof_count, 16 + depth * 32]. The little-endian four-word header is [version=1, leaf_count, leaf_index, valid], followed by siblings bottom-up. Out-of-range device indices set valid=0 and zero every sibling. Empty selections return ready empty storage. No host observation of indices occurs. Errors Rejects metadata, ownership, address limits, allocation or recording failures.

FnRust public API

Function Documentation

pub fn merkle_proofs( leaves: &Matrix, indices: &Matrix ) -> Result<Matrix>
Build selected SHAKE-256 Merkle inclusion proofs entirely on the device. leaves is U8 [leaf_count, 32]; indices is rank-one U32. Output is U8 [proof_count, 16 + depth * 32]. The little-endian four-word header is [version=1, leaf_count, leaf_index, valid], followed by siblings bottom-up. Out-of-range device indices set valid=0 and zero every sibling. Empty selections return ready empty storage. No host observation of indices occurs. Errors Rejects metadata, ownership, address limits, allocation or recording failures.