Commit Graph

460 Commits

Author SHA1 Message Date
Erdem Yerebasmaz
c2db7ebfea Update flutter_rust_bridge to 2.3.0 (#465) 2024-09-02 16:30:12 +03:00
Roei Erez
e912147408 Merge pull request #462 from breez/emit-pending-confirmation
Emit pending confirmation for liquid transactions
2024-09-01 11:30:44 +03:00
Roei Erez
cd35a63fe0 fix typo 2024-09-01 11:30:02 +03:00
ok300
5f74b9df4b Restore: Associate swap tx IDs from onchain data (#399)
* Add extend_incomplete_failed_send_swaps() on first sync

* Find lockup txs

* Send Swaps: find refund txs

* Simplify recover_send_swap_tx_ids, add recover_receive_swap_tx_ids

* recover_receive_swap_tx_ids: batch tx lookups

* Move onchain-restore methods to own module

* Store restored data in own struct

* Fix CI: bump pubspec.lock dependencies

* LiquidChainService: add get_scripts_history_electrum()

* restore_onchain: rely on batch call to fetch histories of all known swaps

* Rename get_scripts_history_electrum

* Rename restore_onchain.rs, flatten onchain inner module

* Rename ImmutableDb to SwapsList

* Simplify logic in restore.rs

* restore.rs: Add chain swap support, simplify logic

* restore.rs: add logging when script retrieval fails

* restore.rs: remove unused field create_resp

* restore.rs: rename SwapCompositeData to SwapHistory

* restore.rs: allow unused fields in simulated immutable data

* restore.rs: cargo fmt

* Cargo fmt

* Fix failing test

* When fetching script history, also fetch if tx is confirmed or not

* Recover send swaps: fetch claim tx IDs

* Recover onchain data: persist reconstructed swaps

* Simplify recover_from_onchain: store swap txs per swap ID

* Receive swaps: do not treat lockup/claim txs as pair

* Clarify meaning of partial swap state

* Cargo clippy

* Receive Chain Swap: distinguish BTC lockup from claim/refund tx

* Send Chain Swap: distinguish BTC lockup/claim by vout, not by history order

* get_partial_state: default to Created when state is unclear

* Receive Chain Swaps: differentiate BTC refund from BTC claim txs

* Send Swaps: clarify reason for defaulting to TimedOut on no lockup

* Chain swaps: add docs for meaning of server, user txs

* Recover Receive swaps: cover the case when only the lockup is available

* HistoryTxId: store confirmation block height

* Receive swaps: differentiate claim tx from swapper refund tx

* recover_from_onchain: extract immutable DB (swaps list) as arg

* Rename get_partial_state to derive_partial_state

* Restore: remove validation steps

* Restore chain swaps: treat as Complete only when claim is confirmed

* Fix clippy warnings

* Remove restore call from sync call
2024-08-30 17:18:25 +00:00
Ross Savage
b493f3dc03 Swift notification plugin (#436)
* Add Swift notification plugin

* Hash the metadata

* Validate min sendable amount

* Remove initializer as base class, UNNotificationServiceExtension, has no default initializer

* Set the PaymentMethod

* Handle PaymentDetails in SwapUpdated

* Improve payment text
2024-08-30 09:20:13 +02:00
Roei Erez
59aefee0ef emit pending confirmation for liquid transactions 2024-08-29 17:37:30 +03:00
yse
0053007000 fix: ensure non-MRH invoices use lockup amount for fee calculation (#461) 2024-08-29 14:32:39 +02:00
Ross Savage
924618c99e Android notification plugin (#433)
* Add Android notification plugin

* Hash and compare payment swapId

* Hash the metadata

* Validate min sendable amount

* Set the PaymentMethod

* chore: apply breaking changes from BIP21 support

* Handle Lightning payments on SwapUpdated events

* Update Flutter

* Improve payment text

---------

Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
2024-08-29 14:05:24 +02:00
Ross Savage
6b78919df8 Add sign_message and check_message (#443)
* Add sign and check message methods

* Use lightning message_signing module to verify the message signature

* Use hash engine
2024-08-29 08:42:16 +02:00
Ross Savage
deb9ed1b09 Add description hash to receive payment (#440)
* Add option to hash description

* Fix Flutter gen

* Switch to upstream boltz-rust

* Address feedback
2024-08-29 08:17:10 +02:00
Ross Savage
34774647bf Integrate webhooks (#410)
* Integrate webhooks

* Make hash_swap_id optional

* Hash and store the swap id

* Add webhook status include lists

* Remove superfluous webhook statuses

* Verify and fetch user_lockup_tx_id if missing

* Fix tests

* Use bitcoin sha256

* Fix flutter CI
2024-08-29 08:03:50 +02:00
Ross Savage
251c252374 Add Go/CS bindings (#147)
* Publish Go/CS packages

* Fix optional param ordering

* Fix CI installed bindgens
2024-08-28 15:14:20 +02:00
ok300
ab63064343 Fix chain swap limits validation (#456)
* validate_chain_pairs: use payer_amount instead of ambiguous amount_sat

* validate_submarine_pairs: add comment

* prepare_receive_payment: clarify pair handling for PaymentMethod::Lightning

* Chain pair validation: use user_lockup_amount instead of payer_amount
2024-08-28 10:38:41 +00:00
ok300
152032dd82 pay-onchain: fix user lockup fee calculation, boltz fee calculation (#459) 2024-08-28 10:21:29 +00:00
yse
7b3085df8d send: consider request amount when preparing the payment (#454) 2024-08-27 01:37:56 +02:00
Ross Savage
59f5e0636c Handle in RN codegen multiple fields in enum variant (#453)
* Update RN example

* Handle enum variants with multiple fields
2024-08-23 06:12:39 +02:00
yse
1a89bcd6c1 feat: add BIP21 support (#414)
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
2024-08-22 12:23:36 +02:00
Erdem Yerebasmaz
5248dfc235 Depend on sdk-common with liquid feature (#452)
* Add copy script to packages/react-native makefile
  * Reorder scripts
* Depend on sdk-common with liquid feature
  * chore: cargo update
* Generate Dart bindings
* Generate UniFFI bindings
* Simplify import resolution by using prelude::*
  * Applies changes from https://github.com/breez/breez-sdk-greenlight/pull/1078
2024-08-20 18:50:27 +03:00
Erdem Yerebasmaz
0cb02ce435 Bugfix: Update production podpsec's version with version script (#447)
* Add just recipe to update version number on podspec files & Cmake scripts

* Resolve relative path of root from script directory

* fix: Update production podpsec's version with version script

* Run 'just version'

* Update melos dependency

* Check if versions on podspec & cmake scripts were updated properly on CI

* Update versions on podspec & cmake scripts on publish

* Declare license type on podspec

* Add platform-specific link recipes

* Add copy recipes to be used in CI workflows
2024-08-20 14:51:07 +03:00
Ross Savage
9c683761e6 Confirm chain swap claims (#450)
* Confirm chain swap claims before setting to complete

* Fix tests

* Address feedback

* Apply suggestions from code review

Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>

---------

Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
2024-08-19 09:35:42 +02:00
ok300
44ee969e43 Receive payment: remove MRH BIP21 amount validation (#448)
* Receive payment: remove MRH BIP21 amount validation

* Fix CI: bump dependency in pubspec.lock
2024-08-15 17:47:19 +00:00
Erdem Yerebasmaz
dc0e347e2b chore: melos pub-upgrade 2024-08-13 12:58:30 +03:00
Erdem Yerebasmaz
265724101c Bump flutter_rust_bridge to 2.2.0 (#442) 2024-08-13 11:46:08 +03:00
Erdem Yerebasmaz
852b712277 Address cargo clippy warnings (#439)
Fix indentations on documentations.
2024-08-08 17:23:34 +03:00
Erdem Yerebasmaz
3e38e5963a Downgrade Flutter to 3.22.3 (#438)
* Downgrade Flutter to 3.22.3

Downgrade Flutter to 3.22.3 until resource linking issue is resolved on Android release builds with 3.24

* Update pubspec.lock
2024-08-08 16:47:21 +03:00
Erdem Yerebasmaz
3703fd3477 Allow working with local library on iOS (#434)
* Update SDK range and update dependencies to latest

* Correct the output folder creation on codegen just recipe

* Create a podspec for local development

* Use production podspec when publishing

* Remove spec.platform as deployment targets are already set
2024-08-07 14:59:00 +03:00
ok300
6373ac2be3 Receive payment: remove retry backoff, reduce wait time to 1 sec (#431) 2024-08-06 15:55:55 +00:00
dsbreez
24c7486ba7 Update README.md 2024-08-05 16:29:07 -04:00
Roy Sheinfeld
f63ae72a41 Update README.md 2024-08-05 22:52:41 +03:00
Roei Erez
fe112a8bf7 Merge branch 'v0.2.1' 2024-08-04 12:21:12 +03:00
Roei Erez
c5328fcf28 update flultter version 2024-08-01 16:28:08 +03:00
Roei Erez
d123a77b12 update version to 0.2.1 2024-08-01 16:27:08 +03:00
Roei Erez
e13af967f6 Merge pull request #430 from breez/logger-conflict
Fix conflict with os.Logger
2024-08-01 16:22:40 +03:00
Roei Erez
ad55007add Fix conflict with os.Logger 2024-08-01 16:10:51 +03:00
ok300
37d625c2b6 Pause event notifications on first sync (#424)
* Add cache flag for is_first_sync_complete

* Event Manager: add ability to pause and resume event notifications

* Pause event notifications on first sync

* Fix CI: bump pubspec.lock dependencies

* CI: Bump win32 transitive dependency in pubspec.lock

* CI: Set dependency hash in quotes
2024-08-01 08:45:14 +00:00
Erdem Yerebasmaz
2c4441e977 Bugfix: Correct the relative path on bindings scripts (#425)
* Correct the path of breez_sdk_liquid.kt on .gitignore

* Fix relative path on bindings-android script

* Update bindings README

'python' & 'swift' scripts are not available on this crate

* chore: ran melos pub-upgrade
2024-08-01 11:11:04 +03:00
yse
a1a4343d25 fix: show regular onchain fees when mrh payment is detected (#421) 2024-07-26 18:51:59 +02:00
yse
c113f5ec35 fix: show regular onchain fees when mrh payment is detected (#421) 2024-07-26 18:51:38 +02:00
yse
0f636784a1 feat: split storage based on network (#419) 2024-07-26 11:01:42 +02:00
yse
15a522841c feat: split storage based on network (#419) 2024-07-26 10:53:34 +02:00
Ross Savage
28039272ad Fix lowball broadcast (#418)
(cherry picked from commit 97075f383f)
2024-07-25 21:23:58 +03:00
Ross Savage
97075f383f Fix lowball broadcast (#418) 2024-07-25 20:16:32 +02:00
Erdem Yerebasmaz
859c128475 Update tag names 2024-07-25 19:34:42 +03:00
Roei Erez
406b823e55 fix flutter example dependency 2024-07-25 17:29:09 +03:00
Roei Erez
65ce16ea5f update version to 0.2.0 2024-07-25 17:19:47 +03:00
Roei Erez
63e5a12abb Merge branch 'v0.1.4' 2024-07-25 17:16:27 +03:00
yse
14da84bd64 fear: add per-wallet directory structure for persister and lwk (#413) 2024-07-25 13:59:14 +02:00
Ross Savage
baa8096852 Update boltz-rust and add receive payment description (#409)
* Update boltz-rust

* Store description and add to Payment struct

* Fix examples
2024-07-25 12:46:40 +02:00
Ross Savage
535be71d84 Fix RN CI (#408) 2024-07-25 09:27:36 +02:00
Erdem Yerebasmaz
cc6adeab7f Update BreezSDKLiquid (#406)
* Convert BreezSDKLiquid into a singleton
* Sync wallet after each SDK event
2024-07-23 17:01:43 +03:00