Skip to main content

anyswap_sdk/
lib.rs

1//! AnySwap client SDK.
2//!
3//! Client-side layer over [`anyswap_core`]: typed swap views
4//! ([`swap_in::SwapIn`], [`swap_out::SwapOut`]), string codecs shared with the
5//! WASM bindings ([`codec`]), per-swap key derivation ([`wallet::Wallet`]),
6//! and an HTTP client for the server API ([`client::HttpClient`], behind the
7//! `client` feature; its WebSocket subscription, [`ws`], behind the native-only
8//! `ws` feature).
9//!
10//! On-chain primitives (swap script, transaction builders, swap_fee and invoice
11//! parsing) are re-exported from [`anyswap_core`] so consumers depend on this
12//! crate alone.
13
14#[cfg(feature = "esplora")]
15pub use anyswap_core::esplora;
16pub use anyswap_core::{PROTOCOL_VERSION, api, auth, fee, invoice, script, transaction, types};
17pub use bitcoin;
18pub use elements;
19
20#[cfg(feature = "client")]
21pub mod client;
22pub use anyswap_core::codec;
23pub mod context;
24#[cfg(feature = "driver")]
25pub mod driver;
26pub mod swap_in;
27pub mod swap_out;
28pub mod swap_script;
29pub mod utxo;
30pub mod wallet;
31#[cfg(feature = "ws")]
32pub mod ws;