mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-06 07:34:24 +01:00
* list-refundables: show refundable amount, not swap amount * Rename chainswap fn for clarity get_lockup_swap_script_pubkey only applies to Receive Chain Swaps, so it was renamed to get_receive_lockup_swap_script_pubkey. * list_refundables: batch calls to fetch balance from chain service * Simplify conversion from Chain Swap to RefundableSwap * Fix MockBitcoinChainService * Re-generate flutter bindings * Add utility for creating SdkError::Generic with &str or String * Chain Swap getter for swap script pk: throw SdkError instead of anyhow::Error * Update RefundableSwap comment Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com> * Re-generate dart files --------- Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>
Breez Liquid SDK
To get started with the Breez Liquid SDK, follow these examples.
Getting Started
let mnemonic = Mnemonic::generate_in(Language::English, 12)?;
// Create the default config
let mut config = LiquidSdk::default_config(LiquidNetwork::Mainnet);
// Customize the config object according to your needs
config.working_dir = "path to an existing directory".into();
let connect_request = ConnectRequest {
mnemonic: mnemonic.to_string(),
config,
};
let sdk = LiquidSdk::connect(connect_request).await?;
Tests
In order to run tests, you can execute cargo test -- --nocapture --test-threads 1. This is due to the fact that currently tests require some degree of interaction (e.g. adding the funding invoice) in order to work, and thus should be run with a single thread (sequentially).