1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! # whisky
//!
//! `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.
//!
//! ## Install
//!
//! In your Rust project, run the below
//!
//! ```sh
//! cargo add whisky
//! ```
//!
//! or add the dependency in `Cargo.toml`
//!
//! ```toml
//! [dependencies]
//! whisky = "^<the-latest-version>"
//! ```
//!
//! ## Feature Flags
//!
//! By default, all features are enabled. You can selectively enable features:
//!
//! ```toml
//! # Full (default) - all features
//! whisky = "1.0.18"
//!
//! # Just common types (minimal)
//! whisky = { version = "1.0.18", default-features = false }
//!
//! # Wallet only (includes csl + common)
//! whisky = { version = "1.0.18", default-features = false, features = ["wallet"] }
//!
//! # Provider only (includes csl + common)
//! whisky = { version = "1.0.18", default-features = false, features = ["provider"] }
//!
//! # CSL only (transaction building without wallet/provider)
//! whisky = { version = "1.0.18", default-features = false, features = ["csl"] }
//! ```
//!
//! ## Getting Started
//!
//! ```rust,ignore
//! use whisky::*;
//!
//! async fn my_first_whisky_tx(
//! recipient_address: &str,
//! my_address: &str,
//! inputs: &[UTxO],
//! ) -> String {
//! let mut mesh = TxBuilder::new_core();
//! mesh.tx_out(
//! &recipient_address,
//! &[Asset::new_from_str("lovelace", "1000000")],
//! )
//! .change_address(my_address)
//! .select_utxos_from(inputs, 5000000)
//! .complete(None)
//! .await;
//! mesh.tx_hex()
//! }
//! ```
//!
//! ## APIs
//!
//! All user facing APIs are documentation at the [builder interface](builder/struct.TxBuilder.html).
//!
// Self-reference alias to allow proc macros to use ::whisky:: path within this crate
extern crate self as whisky;
// Data module is always available (uses whisky_common + whisky_macros)
// CSL-dependent modules
// Services require both csl and provider
// Always re-export common and macros
pub use *;
pub use *;
// CSL re-exports
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// Wallet re-exports
pub use *;
// Provider re-exports
pub use *;