Files
breez-sdk-liquid/lib/core
Erdem Yerebasmaz 5e2a4fe342 Bump flutter_rust_bridge to 2.0.0-dev.38 (#304)
* Generate Dart bindings
* flutter_rust_bridge has relative path issues with this new approach introduced in 2.0.0-dev.38, we'll be using the default rust_output path until it's addressed.
2024-06-10 14:51:42 +03:00
..
2024-05-21 12:31:59 +02:00

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).