mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-03 14:24:19 +01:00
* feat: switch to pending state when receive lockup is in the mempool * rebasing * fix: move socket update logic to sub-crate * Update payments query, to avoid duplicate Receive Swaps This can happen if the app is stopped before the temporary lockup tx is removed from the DB. The Receive Swap would then forever result in two payments in list_payments. * Add comments to clarify use of temp lockup txid * Re-generate flutter bridge bindings * feat: set Payment `tx_id` as optional and change `list_payments` logic * fix: debug typo * fix: undo `remove_temporary_tx` changes * fix: switch to full join rather than manual filtering * fix: bindings * fix: improve error handling when tx data is not present * fix: RN bindings * fix: exclude Created receives from the list * fix: fixing nits * Re-generate FRB bindings --------- Co-authored-by: ok300 <106775972+ok300@users.noreply.github.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).