signer-daemon 0.3.2

Signer daemon package.
Documentation
use signer_core::SignerCrypted;

use crate::{
    OApiCrdtCryptedEventVo, OApiSignerCryptedOApiCrdtEventVo,
    model::viewobject::{CrdtCryptedEventVO, CrdtEventVO},
};

impl Into<CrdtCryptedEventVO> for OApiCrdtCryptedEventVo {
    fn into(self) -> CrdtCryptedEventVO {
        CrdtCryptedEventVO {
            clock: self.clock,
            peer: self.peer,
            data: SignerCrypted::<CrdtEventVO> {
                sender_pub_key: self.data.sender_pub_key,
                receiver_pub_key: self.data.receiver_pub_key,
                cipher_text: self.data.cipher_text,
                nonce: self.data.nonce,
                _marker: Default::default(),
            },
        }
    }
}

impl From<CrdtCryptedEventVO> for OApiCrdtCryptedEventVo {
    fn from(value: CrdtCryptedEventVO) -> Self {
        Self {
            clock: value.clock,
            peer: value.peer,
            data: Box::new(OApiSignerCryptedOApiCrdtEventVo {
                sender_pub_key: value.data.sender_pub_key,
                receiver_pub_key: value.data.receiver_pub_key,
                cipher_text: value.data.cipher_text,
                nonce: value.data.nonce,
            }),
        }
    }
}

impl From<CrdtCryptedEventVO> for OApiSignerCryptedOApiCrdtEventVo {
    fn from(value: CrdtCryptedEventVO) -> Self {
        Self {
            sender_pub_key: value.data.sender_pub_key,
            receiver_pub_key: value.data.receiver_pub_key,
            cipher_text: value.data.cipher_text,
            nonce: value.data.nonce,
        }
    }
}