whisky/
lib.rs

1//! # whisky
2//!
3//! `whisky` is built with the same pattern as [MeshJS's lower level APIs](https://meshjs.dev/apis/transaction/builderExample) where Rust Cardano developer can import directly for use.
4//!
5//! ## Install
6//!
7//! In your Rust project, run the below
8//!
9//! ```sh
10//! cargo add whisky
11//! ```
12//!
13//! or add the dependency in `Cargo.toml`
14//!
15//! ```toml
16//! [dependencies]
17//! whisky = "^<the-latest-version>"
18//! ```
19//!
20//! ## Getting Started
21//!
22//! ```rust
23//! use whisky::*;
24//!
25//! async fn my_first_whisky_tx(
26//!     recipient_address: &str,
27//!     my_address: &str,
28//!     inputs: &[UTxO],
29//! ) -> String {
30//!     let mut mesh = TxBuilder::new_core();
31//!     mesh.tx_out(
32//!         &recipient_address,
33//!         &[Asset::new_from_str("lovelace", "1000000")],
34//!     )
35//!         .change_address(my_address)
36//!         .select_utxos_from(inputs, 5000000)
37//!         .complete(None)
38//!         .await;
39//!     mesh.tx_hex()
40//! }
41//! ```
42//!
43//! ## APIs
44//!
45//! All user facing APIs are documentation at the [builder interface](builder/struct.TxBuilder.html).
46//!
47pub mod builder;
48pub mod services;
49pub mod transaction;
50pub mod utils;
51pub use builder::*;
52pub use transaction::*;
53pub use whisky_common::*;
54pub use whisky_csl::*;
55pub use whisky_provider::*;
56pub use whisky_wallet::*;