tree::MerklePath: Add postion() and auth_path() getters.

This commit is contained in:
therealyingtong 2021-06-10 16:55:49 +08:00
parent b3daeb0861
commit 380128ed49
1 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,16 @@ impl MerklePath {
});
Anchor(node.to_bytes())
}
/// Returns the position of the leaf using this Merkle path.
pub fn position(&self) -> u32 {
self.position
}
/// Returns the authentication path.
pub fn auth_path(&self) -> [pallas::Base; MERKLE_DEPTH_ORCHARD] {
self.auth_path
}
}
struct Pair {