(wasm) Add VeilidCrypto class, refine interfaces for VeilidRoutingContext
This commit is contained in:
@@ -26,9 +26,13 @@ use wasm_bindgen::prelude::*;
|
||||
use wasm_bindgen_futures::*;
|
||||
|
||||
pub mod veilid_client_js;
|
||||
pub mod veilid_crypto_js;
|
||||
pub mod veilid_routing_context_js;
|
||||
pub mod veilid_table_db_js;
|
||||
|
||||
mod wasm_helpers;
|
||||
use wasm_helpers::*;
|
||||
|
||||
// Allocator
|
||||
extern crate wee_alloc;
|
||||
#[global_allocator]
|
||||
@@ -146,13 +150,18 @@ pub struct VeilidWASMConfig {
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[cfg_attr(target_arch = "wasm32", derive(Tsify))]
|
||||
#[cfg_attr(
|
||||
target_arch = "wasm32",
|
||||
derive(Tsify),
|
||||
tsify(from_wasm_abi, into_wasm_abi)
|
||||
)]
|
||||
pub struct VeilidRouteBlob {
|
||||
pub route_id: veilid_core::RouteId,
|
||||
#[serde(with = "veilid_core::as_human_base64")]
|
||||
#[cfg_attr(target_arch = "wasm32", tsify(type = "string"))]
|
||||
pub blob: Vec<u8>,
|
||||
}
|
||||
from_impl_to_jsvalue!(VeilidRouteBlob);
|
||||
|
||||
// WASM Bindings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user