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
//! # TX3 Rust SDK
//!
//! Ergonomic Rust SDK for interacting with TX3 protocols, TII files, and TRP servers.
//!
//! TX3 is a DSL and protocol suite for defining and executing UTxO-based transactions in a
//! declarative, type-safe way.
//!
//! ## Quick start
//!
//! ```ignore
//! use serde_json::json;
//! use tx3_sdk::trp::{Client, ClientOptions};
//! use tx3_sdk::{CardanoSigner, Party, PollConfig, Tx3Client};
//!
//! let signer = CardanoSigner::from_mnemonic(
//! "addr_test1...",
//! "word1 word2 ... word24",
//! )?;
//!
//! let protocol = tx3_sdk::tii::Protocol::from_file("./examples/transfer.tii")?;
//! let trp = Client::new(ClientOptions {
//! endpoint: "https://trp.example.com".to_string(),
//! headers: None,
//! });
//!
//! let tx3 = Tx3Client::new(protocol, trp)
//! .with_profile("preprod")
//! .with_party("sender", Party::signer(signer))
//! .with_party("receiver", Party::address("addr_test1..."))
//! .with_party("middleman", Party::address("addr_test1..."));
//!
//! let status = tx3
//! .tx("transfer")
//! .arg("quantity", json!(10_000_000))
//! .resolve()
//! .await?
//! .sign()?
//! .submit()
//! .await?
//! .wait_for_confirmed(PollConfig::default())
//! .await?;
//!
//! println!("Confirmed at stage: {:?}", status.stage);
//! ```
//!
//! ## Links
//!
//! - [TX3 Documentation](https://docs.txpipe.io/tx3)
pub use ;
pub use ;