mod bytes;
mod parse;
use console::{network::prelude::*, program::PlaintextType};
#[derive(Clone, PartialEq, Eq)]
pub struct MapKey<N: Network> {
plaintext_type: PlaintextType<N>,
}
impl<N: Network> MapKey<N> {
#[inline]
pub const fn plaintext_type(&self) -> &PlaintextType<N> {
&self.plaintext_type
}
}
impl<N: Network> TypeName for MapKey<N> {
#[inline]
fn type_name() -> &'static str {
"key"
}
}
#[cfg(test)]
mod tests {
use super::*;
use console::network::MainnetV0;
type CurrentNetwork = MainnetV0;
#[test]
fn test_key_type_name() -> Result<()> {
assert_eq!(MapKey::<CurrentNetwork>::type_name(), "key");
Ok(())
}
}