forest/lotus_json/
vrf_proof.rs1use super::*;
5use crate::blocks::VRFProof;
6
7impl HasLotusJson for VRFProof {
8 type LotusJson = <Vec<u8> as HasLotusJson>::LotusJson;
9
10 #[cfg(test)]
11 fn snapshots() -> Vec<(serde_json::Value, Self)> {
12 vec![(
13 json!("aGVsbG8gd29ybGQh"),
14 VRFProof(Vec::from_iter(*b"hello world!")),
15 )]
16 }
17
18 fn into_lotus_json(self) -> Self::LotusJson {
19 let Self(vec) = self;
20 vec.into_lotus_json()
21 }
22
23 fn from_lotus_json(lotus_json: Self::LotusJson) -> Self {
24 Self(HasLotusJson::from_lotus_json(lotus_json))
25 }
26}