boltz_client/
lib.rs

1//! A boltz client for submarine, reverse and chain swaps between Bitcoin, Lightning & Liquid
2//! Refer to tests/ folder for usage
3
4/// Error Module
5pub mod error;
6/// Blockchain Network module. Currently only contains electrum interface.
7pub mod network;
8/// core swap logic
9pub mod swaps;
10/// utilities (key, preimage, error)
11pub mod util;
12
13// Re-export common libs, so callers can make use of them and avoid version conflicts
14pub use bitcoin;
15pub use elements;
16pub use lightning_invoice;
17#[cfg(feature = "lnurl")]
18pub use lnurl;
19pub use reqwest;
20
21// Re-export relevant structs under boltz_client::StructName for simplicity
22pub use bitcoin::{
23    blockdata::locktime::absolute::LockTime,
24    hashes::hash160::Hash,
25    secp256k1::{Keypair, Secp256k1},
26    Address, Amount, PublicKey,
27};
28pub use elements::{
29    address::Address as ElementsAddress,
30    hex::ToHex,
31    locktime::LockTime as ElementsLockTime,
32    pset::serialize::Serialize,
33    secp256k1_zkp::{Keypair as ZKKeyPair, Secp256k1 as ZKSecp256k1},
34};
35pub use lightning_invoice::Bolt11Invoice;
36
37pub use swaps::{
38    bitcoin::{BtcSwapScript, BtcSwapTx},
39    boltz,
40    liquid::{LBtcSwapScript, LBtcSwapTx},
41};
42pub use util::fees;