refactor: move nullifier to_byte_array exposure to guest

This commit is contained in:
agureev 2026-06-22 22:22:41 +04:00
parent e7e7145af1
commit f1f76247da
2 changed files with 5 additions and 6 deletions

View File

@ -97,12 +97,6 @@ impl NullifierPublicKey {
#[cfg(feature = "host")]
impl Nullifier {
#[must_use]
pub const fn to_byte_array(&self) -> [u8; 32] {
self.0
}
#[cfg(feature = "host")]
#[must_use]
pub const fn from_byte_array(bytes: [u8; 32]) -> Self {
Self(bytes)

View File

@ -105,6 +105,11 @@ impl Nullifier {
bytes.extend_from_slice(account_id.value());
Self(Impl::hash_bytes(&bytes).as_bytes().try_into().unwrap())
}
#[must_use]
pub const fn to_byte_array(&self) -> [u8; 32] {
self.0
}
}
#[cfg(test)]