1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use derive_more::{Deref, From};
use crate::signature::Signature;
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, From, Deref, packable::Packable)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct SignatureUnlock(Signature);
impl SignatureUnlock {
pub const KIND: u8 = 0;
#[inline(always)]
pub fn new(signature: Signature) -> Self {
Self(signature)
}
#[inline(always)]
pub fn signature(&self) -> &Signature {
&self.0
}
}
#[cfg(feature = "dto")]
#[allow(missing_docs)]
pub mod dto {
use serde::{Deserialize, Serialize};
use crate::signature::dto::SignatureDto;
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub struct SignatureUnlockDto {
#[serde(rename = "type")]
pub kind: u8,
pub signature: SignatureDto,
}
}