Rm all ciborium code from pcd
This commit is contained in:
parent
ac39fc5b7c
commit
0109b6ba51
@ -5,6 +5,7 @@ use std::collections::btree_map::Keys;
|
|||||||
use std::collections::{BTreeMap, HashSet};
|
use std::collections::{BTreeMap, HashSet};
|
||||||
use std::hash::{Hash as StdHash, Hasher};
|
use std::hash::{Hash as StdHash, Hasher};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
use std::io::Write;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
@ -17,7 +18,7 @@ use sp_client::{
|
|||||||
use tsify::Tsify;
|
use tsify::Tsify;
|
||||||
|
|
||||||
use crate::hash::AnkPcdHash;
|
use crate::hash::AnkPcdHash;
|
||||||
use crate::serialization::{ciborium_serialize, OutPointMemberMap};
|
use crate::serialization::OutPointMemberMap;
|
||||||
use crate::ROLESLABEL;
|
use crate::ROLESLABEL;
|
||||||
use crate::{
|
use crate::{
|
||||||
signature::{AnkHash, AnkValidationNoHash, AnkValidationYesHash, Proof},
|
signature::{AnkHash, AnkValidationNoHash, AnkValidationYesHash, Proof},
|
||||||
@ -315,7 +316,7 @@ impl Pcd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize, Tsify)]
|
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize, Tsify)]
|
||||||
#[tsify(into_wasm_abi)]
|
#[tsify(into_wasm_abi, from_wasm_abi)]
|
||||||
pub struct PcdCommitments(#[serde(with = "hex_array_btree")] #[tsify(type = "Record<string, string>")] BTreeMap<String, [u8; 32]>);
|
pub struct PcdCommitments(#[serde(with = "hex_array_btree")] #[tsify(type = "Record<string, string>")] BTreeMap<String, [u8; 32]>);
|
||||||
|
|
||||||
impl PcdCommitments {
|
impl PcdCommitments {
|
||||||
@ -593,7 +594,7 @@ impl Roles {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_bytes(&self) -> Result<Vec<u8>> {
|
pub fn to_bytes(&self) -> Result<Vec<u8>> {
|
||||||
ciborium_serialize(&self.0)
|
Ok(serde_json::to_vec(self)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user