diff --git a/crates/util/keyfork-mnemonic-util/src/lib.rs b/crates/util/keyfork-mnemonic-util/src/lib.rs index 69687d4..0c77767 100644 --- a/crates/util/keyfork-mnemonic-util/src/lib.rs +++ b/crates/util/keyfork-mnemonic-util/src/lib.rs @@ -373,16 +373,31 @@ where &self.data } + /// A view to internal representation of the decoded data. + pub fn as_slice(&self) -> &[u8] { + &self.data + } + /// A clone of the internal representation of the decoded data. pub fn to_bytes(&self) -> Vec { self.data.to_vec() } + /// A clone of the internal representation of the decoded data. + pub fn to_vec(&self) -> Vec { + self.data.to_vec() + } + /// Conver the Mnemonic into the internal representation of the decoded data. pub fn into_bytes(self) -> Vec { self.data } + /// Conver the Mnemonic into the internal representation of the decoded data. + pub fn into_vec(self) -> Vec { + self.data + } + /// Clone the existing data. #[deprecated = "Use as_bytes(), to_bytes(), or into_bytes() instead"] pub fn entropy(&self) -> Vec {