use ockam_core::vault::Signature as OckamVaultSignature;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, Copy, Eq, PartialEq)]
pub enum SignatureType {
RootSign,
SelfSign,
PrevSign,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Signature {
stype: SignatureType,
data: OckamVaultSignature,
}
impl Signature {
pub fn stype(&self) -> &SignatureType {
&self.stype
}
pub fn data(&self) -> &OckamVaultSignature {
&self.data
}
}
impl Signature {
pub fn new(stype: SignatureType, data: OckamVaultSignature) -> Self {
Signature { stype, data }
}
}