Skip to main content

whisky_csl/
lib.rs

1//! #whisky-csl
2//!
3//! `whisky-csl` 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-csl-nodejs
14//! # For browser package
15//! yarn add @sidan-lab/whisky-csl-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 constants;
24pub mod tx_builder;
25pub mod tx_parser;
26pub mod tx_prototype;
27pub mod utils;
28pub use constants::*;
29pub use tx_builder::*;
30pub use tx_parser::*;
31pub use tx_prototype::*;
32pub use utils::*;
33
34pub use cardano_serialization_lib as csl;
35use whisky_common::TxBuilderBody;
36
37#[derive(Clone, Debug)]
38pub struct WhiskyCSL {
39    pub core: CoreCSL,
40    pub parser: CSLParser,
41    pub tx_builder_body: TxBuilderBody,
42    pub tx_evaluation_multiplier_percentage: u64,
43    pub tx_hex: String,
44}