Replace ciborium with zstd

This commit is contained in:
Sosthene 2025-06-24 15:17:27 +02:00 committed by Nicolas Cantu
parent 338d62b126
commit 04735183b4
3 changed files with 4 additions and 15 deletions

View File

@ -9,7 +9,6 @@ crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
aes-gcm = "0.10.3" aes-gcm = "0.10.3"
anyhow = "1.0" anyhow = "1.0"
ciborium = "0.2.2"
js-sys = "0.3.69" js-sys = "0.3.69"
env_logger = "0.9" env_logger = "0.9"
log = "0.4.6" log = "0.4.6"
@ -17,8 +16,9 @@ rand = "0.8.5"
serde = { version = "1.0.193", features = ["derive"] } serde = { version = "1.0.193", features = ["derive"] }
serde_json = { version = "1.0.108" } serde_json = { version = "1.0.108" }
serde-wasm-bindgen = "0.6.5" serde-wasm-bindgen = "0.6.5"
# sp_client = { path = "../sp-client" } # sp_client = { path = "../sp-client", features = ["blindbit-backend"] }
sp_client = { git = "https://github.com/Sosthene00/sp-client.git", branch = "dev" } sp_client = { git = "https://github.com/cygnet3/sp-client.git", branch = "wasm_compatibility" ,features = ["blindbit-backend"]}
tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" } tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" }
wasm-bindgen = "0.2.91" wasm-bindgen = "0.2.91"
rs_merkle = "1.4.2" rs_merkle = "1.4.2"
zstd = "0.13.3"

View File

@ -3,7 +3,6 @@ use std::str::FromStr;
use std::sync::{Mutex, MutexGuard}; use std::sync::{Mutex, MutexGuard};
pub use aes_gcm; pub use aes_gcm;
pub use ciborium;
pub use env_logger; pub use env_logger;
pub use log; pub use log;
pub use rand; pub use rand;
@ -14,6 +13,7 @@ pub use serde_wasm_bindgen;
pub use tsify; pub use tsify;
pub use wasm_bindgen; pub use wasm_bindgen;
pub use js_sys; pub use js_sys;
pub use zstd;
pub mod crypto; pub mod crypto;
pub mod device; pub mod device;

View File

@ -37,17 +37,6 @@ where
Ok(arr) Ok(arr)
} }
pub fn ciborium_serialize<T: Serialize>(value: &T) -> anyhow::Result<Vec<u8>> {
let mut writer = vec![];
ciborium::into_writer(value, &mut writer)?;
Ok(writer)
}
pub fn ciborium_deserialize<T: de::DeserializeOwned>(serialized_value: &[u8]) -> anyhow::Result<T> {
let res = ciborium::from_reader(serialized_value)?;
Ok(res)
}
pub mod members_map { pub mod members_map {
use super::*; use super::*;
use crate::pcd::Member; use crate::pcd::Member;