We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8ed57b commit ffdcd0aCopy full SHA for ffdcd0a
masp_primitives/src/sapling.rs
@@ -96,6 +96,11 @@ impl Node {
96
Node { repr }
97
}
98
99
+ /// Convert this node into its byte vector representation.
100
+ pub const fn into_repr(self) -> [u8; 32] {
101
+ self.repr
102
+ }
103
+
104
/// Constructs a new note commitment tree node from a [`bls12_381::Scalar`]
105
pub fn from_scalar(cmu: bls12_381::Scalar) -> Self {
106
Self {
@@ -104,6 +109,12 @@ impl Node {
109
110
111
112
+impl AsRef<[u8; 32]> for Node {
113
+ fn as_ref(&self) -> &[u8; 32] {
114
+ &self.repr
115
116
+}
117
107
118
impl incrementalmerkletree::Hashable for Node {
108
119
fn empty_leaf() -> Self {
120
Node {
0 commit comments