mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-07 16:14:29 +01:00
* Rename Network to LiquidSdkNetwork to avoid naming conflicts with sdk-common * Integrate sdk-common: re-use parse_invoice * Fix UDL bindings tests * Add input parser support * CLI: Add input parser support * Integrate lnurl-pay * Cargo format, re-generate FRB and RN bindings * Duplicate LnUrlPayError, update FRB/UniFFI bindings * Move duplicate LnUrlPayError to FRB bindings.rs * Add support for lnurl-withdraw * Lnurl-withdraw: convert units, incorporate fees * Bump sdk-common, rename InputType::LnUrlError * Bump sdk-common, remove Wrapped prefix from LnUrlPaySuccessData, LnUrlPayResult * LNURL-withdraw: add missing UDL mappings * Add support for LNURL-auth * Move LNURL structs into models.rs * Rename LiquidSdkNetwork to LiquidNetwork * Fix binding tests * Fix tests * Move FRB mirroring structs to bindings.rs * Remove TODO * Bump sdk-common, remove sdk-common dependency on rusqlite * Propagate LiquidNetwork rename into flutter example app * CI: install protobuf before running clippy * CI: add rust cache, protobuf for remaining rust steps
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).