#[cfg(feature = "alloc")]
#[allow(
unused_imports,
reason = "alloc prelude items; subset used per cfg/feature combination"
)]
use alloc::vec;
pub mod dater;
pub mod number;
pub mod seqner;
pub mod siger;
pub mod tholder;
use crate::core::matter::code::{
DigestCode, LabelerCode, NoncerCode, SeedCode, SignatureCode, TexterCode, VerKeyCode,
VerserCode,
};
use crate::core::matter::matter::Matter;
pub use dater::Dater;
pub use number::Number;
pub use seqner::Seqner;
pub use siger::Siger;
pub use tholder::Tholder;
pub type Verfer<'a> = Matter<'a, VerKeyCode>;
pub type Diger<'a> = Matter<'a, DigestCode>;
pub type Signer<'a> = Matter<'a, SeedCode>;
pub type Cigar<'a> = Matter<'a, SignatureCode>;
pub type Saider<'a> = Matter<'a, DigestCode>;
pub type Prefixer<'a> = Matter<'a, VerKeyCode>;
pub type Verser<'a> = Matter<'a, VerserCode>;
pub type Noncer<'a> = Matter<'a, NoncerCode>;
pub type Labeler<'a> = Matter<'a, LabelerCode>;
pub type Texter<'a> = Matter<'a, TexterCode>;
#[cfg(test)]
mod tests {
use super::*;
use crate::core::matter::code::{DigestCode, VerKeyCode};
use alloc::borrow::Cow;
#[test]
fn verfer_is_matter_with_verkey_code() {
let code = VerKeyCode::Ed25519;
let raw = vec![0u8; 32];
let verfer: Verfer<'_> =
crate::core::matter::matter::Matter::new(code, Cow::Owned(raw), Cow::from(""));
assert_eq!(*verfer.code(), VerKeyCode::Ed25519);
}
#[test]
fn saider_is_matter_with_digest_code() {
let code = DigestCode::Blake3_256;
let raw = vec![0u8; 32];
let saider: Saider<'_> =
crate::core::matter::matter::Matter::new(code, Cow::Owned(raw), Cow::from(""));
assert_eq!(*saider.code(), DigestCode::Blake3_256);
}
#[test]
fn prefixer_is_matter_with_verkey_code() {
let code = VerKeyCode::Ed25519;
let raw = vec![0u8; 32];
let prefixer: Prefixer<'_> =
crate::core::matter::matter::Matter::new(code, Cow::Owned(raw), Cow::from(""));
assert_eq!(*prefixer.code(), VerKeyCode::Ed25519);
}
}