mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-29 11:54:26 +01:00
* Add request, response to get_info() * Add request, response to prepare_send_payment() * Add request, response to restore() * Add request, response to connect() * Update lib/bindings/src/breez_liquid_sdk.udl Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com> * Update lib/bindings/src/breez_liquid_sdk.udl Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com> * Update lib/core/src/bindings.rs Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com> * Fix bindings.rs call * Update connect to handle ConnectRequest --------- Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com> Co-authored-by: Ross Savage <hello@satimoto.com>
breez-liquid-sdk
Prerequisites
Your system must have the sqlite3 development files installed:
# On Debian
sudo apt install libsqlite3-dev
Features
Backup/Restore
The wallet provides the ability to backup and restore ongoing swaps via the corresponding methods:
let mnemonic = "...";
let data_dir = None;
let network = Network::Liquid;
let breez_wallet = Wallet::connect(mnemonic, data_dir, network)?;
breez_wallet.backup()?; // Backs up the pending swaps under `{data_dir}/backup{-testnet}.sql`. Overwrites previous versions.
let backup_path = None; // Can also be Some(String), a path pointing to the database. Default is `{data_dir}/backup{-testnet}.sql`
breez_wallet.restore(backup_path)?; // Restores the specified backup
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).