Files
breez-sdk-liquid/lib/core
yse 9d2f6f0839 Fix cooperative refund and improve keypair generation (#223)
* feat: add random keypair generation

* Encapsulate decode_keypair in SendSwap::get_refund_keypair()

* Add refund_tx_id and refund_tx_amount_sat to Payment

* fix: remove blocking on refund

* fix: change `refund_private_key` order

* fix: rebasing

* fix: set `next_unused_address` as refund output

* Handle refunds in `get_info`, `list_payments` (#226)

* Exclude refund txs from payment list

* Adjust balance calculation to account for refunds

* fix: revert boltz changes and fix locktime

* Replace subquery with LEFT JOIN to get refund data

* Rewrite locktime check for more clarity

* Rewrite locktime check for more clarity

* Fix select_payment_query in case of refunds

* Include boltz-client fixes (handling of unwraps for failed broadcasts)

* Cargo.toml: Use boltz-client branch instead of commit

---------

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
2024-05-28 08:07:29 +00: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).