mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-06-29 18:39:30 +00:00
refactor: move nullifier to_byte_array exposure to guest
This commit is contained in:
parent
e7e7145af1
commit
f1f76247da
@ -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)
|
||||
|
||||
@ -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)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user