whisky_js/lib.rs
1//! #whisky-js
2//!
3//! `whisky-js` composed of the core serialization logics with the pattern of json-to-transaction, compilable to wasm.
4//! This library is not expected to be imported by Rust developers directly, but rather through the higher level APIs like [`whisky`](../whisky).
5//! The wasm build and utility is mostly exposed in [MeshJS](https://meshjs.dev/).
6//!
7//! ## JS / TS wasm Install
8//!
9//! In case you want the directly out of the box wasm function for your JS / TS project, run the below
10//!
11//! ```sh
12//! # For nodejs package
13//! yarn add @sidan-lab/whisky-js-nodejs
14//! # For browser package
15//! yarn add @sidan-lab/whisky-js-browser
16//! ```
17//!
18//! ## APIs
19//!
20//! - The serialization logic documentation at the [builder interface](builder/trait.ITxBuilderCore.html).
21//! - The inline documentation of core json to transaction serialization function is served at [here](core/builder/fn.js_serialize_tx_body.html).
22
23mod error;
24
25mod wasm;
26pub use wasm::*;
27
28mod models;
29pub use models::*;
30
31#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
32use noop_proc_macro::wasm_bindgen;
33
34#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
35use wasm_bindgen::prelude::{wasm_bindgen, JsError, JsValue};