(wasm) Cleanup and refactoring, add TableDB transactions, copy over docs for JSDoc.

This commit is contained in:
Brandon Vandegrift
2023-09-04 14:04:57 -04:00
parent ca11f6075d
commit 93963e9d08
7 changed files with 366 additions and 264 deletions

View File

@@ -64,6 +64,7 @@ pub struct VeilidStateAttachment {
#[cfg_attr(target_arch = "wasm32", derive(Tsify))]
pub struct PeerTableData {
#[schemars(with = "Vec<String>")]
#[cfg_attr(target_arch = "wasm32", tsify(type = "string[]"))]
pub node_ids: Vec<TypedKey>,
pub peer_address: String,
pub peer_stats: PeerStats,
@@ -82,8 +83,10 @@ pub struct VeilidStateNetwork {
#[cfg_attr(target_arch = "wasm32", derive(Tsify))]
pub struct VeilidRouteChange {
#[schemars(with = "Vec<String>")]
#[cfg_attr(target_arch = "wasm32", tsify(type = "string"))]
pub dead_routes: Vec<RouteId>,
#[schemars(with = "Vec<String>")]
#[cfg_attr(target_arch = "wasm32", tsify(type = "string"))]
pub dead_remote_routes: Vec<RouteId>,
}