mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-05 23:24:25 +01:00
* Add shutdown signal handling Revert periodic sync interval change Revert keep-alive interval change CLI: Add disconnect command SDK: Add scaffolding for is_started, shutdown() Simplify instance init * Rebase on savage-async-ws branch * Avoid waiting when shutdown signal is received in the sync loop * Directly use shutdown signal in background threads * Acquire is_started lock at the very beginning of start() * Fix cargo clippy warnings * Update RN generator (kt): set bindingLiquidSdk to null on disconnect() * Update RN generator (swift): set bindingLiquidSdk to nil on disconnect() * Startup: only run foreground sync() if this could be the first run * Start a sync() in background, before regular sync() loop * Remove ensure_started check from start() * Add bindings for disconnect() * Remove foreground sync condition from startup * Simplify background sync loop
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).