INNER CODE UNIT · Rust
verifying_key
tlsnotary/tlsn · crates/attestation/src/lib.rs:352
pub fn verifying_key(&self) -> &VerifyingKey {
&self.verifying_key.data
}
/// Computes the Merkle root of the attestation fields.
///
/// This is only used when building an attestation.
pub(crate) fn root(&self, hasher: &dyn HashAlgorithm) -> TypedHash {
let mut tree = MerkleTree::new(hasher.id());
let fields = self
.hash_fields(hasher)
.into_iter()
.map(|(_, hash)| hash)
.collect::<Vec<_>>();
tree.insert(hasher, fields);
tree.root()
}