Commit Graph

246 Commits

Author SHA1 Message Date
ok300
cfc883ae00 Add zero-amount Receive Chain Swap (#538)
Add support for Zero-Amount Receive Chain Swaps
2024-12-09 16:10:52 +00:00
ok300
790dfa91be Persist swapper fees for swaps (#586)
* Add new Payment field swapper_fees_sat

* Add swapper fee handling for Receive Swaps

* Add swapper fee handling for Send Swaps

* Add swapper fee handling for Chain Swaps

* Fix tests

* Send Swap: persist pair JSON instead of service fee

* Receive Swap: persist pair JSON instead of service fee

* Chain Swap: persist pair JSON instead of service fee
2024-12-06 08:32:03 +00:00
ok300
84f444d44b Fix handling of Esplora API call results (#585) 2024-11-30 09:07:53 +00:00
Ross Savage
f5fb65bb54 Use lockup or claim address for Bitcoin address query (#582) 2024-11-30 07:49:00 +01:00
ok300
746193a00c Fix typo in fallback payment description (#580) 2024-11-25 16:06:00 +00:00
ok300
bd38a99ef4 Add precision validation for Moonpay call (#576) 2024-11-20 15:07:35 +00:00
Ross Savage
02dd93c810 Add preimage to receive payment (#571) 2024-11-19 16:18:59 +01:00
ok300
fe1dc30917 Add support for paying to BOLT12 (#549)
Add support for paying to BOLT12
2024-11-19 13:08:50 +00:00
Ross Savage
802e9eece7 Configurable cache dir (#567)
* Add a configurable cache dir

* Fix UDL field position
2024-11-18 13:36:38 +01:00
Roei Erez
1cbe6d7a80 Merge pull request #566 from breez/recover-wallet-error
Wipe storage cache in case of data corrupted issue
2024-11-14 21:33:20 +02:00
Roei Erez
efd8915079 fix typo 2024-11-14 21:32:06 +02:00
Roei Erez
66ffb56dc4 fix clilppy 2024-11-14 17:04:38 +02:00
Roei Erez
99e80c25cb wipe storage cache in case of data corrupted issue 2024-11-14 16:16:29 +02:00
Erdem Yerebasmaz
8f3c303534 Log errors on starting an SDK instance (#565) 2024-11-14 16:54:55 +03:00
Ross Savage
8dc744c798 Validate the pay_onchain address (#561) 2024-11-13 09:23:48 +01:00
Ross Savage
4da57e3fe2 Liquid/Lightning drain (#553)
* Attempt drain using liquid or lightning payment

* Optimize estimation handling, use address in drain estimation

* Add drain option to PrepareSendRequest

* Block draining while there are pending payments

* Apply suggestions from code review

* Rename PayOnchainAmount to PayAmount
2024-11-11 21:50:18 +01:00
Ross Savage
2c70315125 Monitor server lockup tx in thread to verify/claim (#557) 2024-11-11 16:06:51 +01:00
Ross Savage
92e7384522 Fix chronological order of list_payments (#552)
* Order payments first by swap timestamp then tx timestamp

* Fix payment timestamp from tx
2024-11-07 18:07:00 +01:00
ok300
4c2fcf6549 Onchain payment flow: add more logging (#551) 2024-11-07 14:24:04 +00:00
Ross Savage
dee4952455 Store claim_address for incoming chain swap when claiming (#548) 2024-11-06 19:04:43 +01:00
yse
a515718dc7 feat: allow send transition from TimedOut to Created (#545) 2024-11-05 10:12:59 +01:00
ok300
bf5d4a1578 Propagate signer interface changes (#544) 2024-11-04 06:57:18 +00:00
yse
22e98f0e32 fix: double-lockup when payment is TimedOut (#541) 2024-10-31 15:01:13 +01:00
Ross Savage
4d036f2529 Reserved address pool (#531) 2024-10-30 11:06:10 +01:00
Ross Savage
b3f1eed429 Prevent swap double claim (#542)
* Prevent receive swap double claim

* Prevent chain swap double claim
2024-10-30 10:08:13 +01:00
ok300
59dfacc12d Receive Chain Swap: support refund even when lockup address is re-used (#471)
* rescan_onchain_swaps: separate internal (scheduled) from external (manual) call

* Add TODOs for supporting more utxos in BtcSwapTx::new_refund

* Update boltz-client to build refund tx with all utxos

* list-refundables: show refundable amount, not swap amount

* Chain swap cooperative refund: fix "Liquid chain used for Bitcoin operations" error

* Revert "Chain swap cooperative refund: fix "Liquid chain used for Bitcoin operations" error"

This reverts commit 8a325e3c13b7e9b54b9f5256bea206989eac53b6.

* Bump boltz-rust to include sign_refund fix

* Bump boltz-rust to include sign_refund fix for non-coop refund

* Fix state handling when incoming chain swaps are refunded

* Move swap state change inside refund_incoming_swap

* Bump to latest boltz-client branch version
2024-10-29 12:56:55 +00:00
ok300
414c9f1ae9 Bring remaining u32 amount types to u64 (#537) 2024-10-28 14:36:33 +00:00
Ross Savage
96bfe463f4 Skip missed ticks (#534) 2024-10-20 20:53:27 +02:00
Roei Erez
ef28becff6 update sdk common dependency 2024-10-20 09:07:07 +03:00
Roei Erez
6656d57c64 Fix working directory 2024-10-18 13:11:16 +03:00
Ross Savage
3ec1b9743e Fix wallet test 2024-10-18 11:58:12 +02:00
Roei Erez
f7b583c562 fix variable name 2024-10-18 11:32:32 +02:00
Roei Erez
72f29bf16b fix sign_message/check_message and add test 2024-10-18 11:32:29 +02:00
Roei Erez
2e559364d8 fix comments 2024-10-18 11:25:25 +02:00
Roei Erez
fe15534d68 Implement seperated signer 2024-10-18 11:14:22 +02:00
ok300
cbe835b565 GetInfoResponse: add fingerprint (#532)
* GetInfoResponse: add fingerprint

* Re-generate dart ffi with `just ffigen`

* Re-generate dart ffi with `just gen`
2024-10-17 14:36:33 +00:00
ok300
b5a1d957c3 Log exact error root cause when failing to lookup script address (#530) 2024-10-16 11:18:43 +00:00
Ross Savage
5f638aec37 Fix list payments filter (#529) 2024-10-15 10:18:11 +02:00
Ross Savage
0884106159 Add prepare_lnurl_pay (#524)
* Add prepare_lnurl_pay

* Move fields into prepare response
2024-10-14 10:06:14 +02:00
ok300
41a4065ff4 Add Breez electrum server for Liquid Mainnet 2024-10-11 14:44:08 +02:00
Ross Savage
3867fa91da Get Payment (#476)
* Get payment by destination

* CI fixes

* Remove claim_address from query

* Add PaymentDestination enum

* Add payment hash as a payment query option

* Bump Flutter dependencies

* Move destination/address queries to list_payments

* Apply suggestions from code review

Co-authored-by: yse <70684173+hydra-yse@users.noreply.github.com>

---------

Co-authored-by: yse <70684173+hydra-yse@users.noreply.github.com>
2024-10-10 17:44:32 +02:00
yse
42f4ca0129 feat: require Breez API key globally on mainnet (#520) 2024-10-08 16:17:34 +02:00
ok300
046e7ab1c8 list-refundables: show refundable amount, not swap amount (#516)
* list-refundables: show refundable amount, not swap amount

* Rename chainswap fn for clarity

get_lockup_swap_script_pubkey only applies to Receive Chain Swaps, so it was renamed to get_receive_lockup_swap_script_pubkey.

* list_refundables: batch calls to fetch balance from chain service

* Simplify conversion from Chain Swap to RefundableSwap

* Fix MockBitcoinChainService

* Re-generate flutter bindings

* Add utility for creating SdkError::Generic with &str or String

* Chain Swap getter for swap script pk: throw SdkError instead of anyhow::Error

* Update RefundableSwap comment

Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>

* Re-generate dart files

---------

Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>
2024-10-07 15:56:02 +00:00
yse
950d4243e6 fix: incoming Chain swap refund (#522) 2024-10-07 15:53:09 +02:00
ok300
7e193aafac Chain swap cooperative refund: fix triggering of refund_incoming_swap (#517)
* Chain swap cooperative refund: fix "Liquid chain used for Bitcoin operations" error

* Log error in case cooperative refund fails
2024-10-04 08:52:58 +00:00
Erdem Yerebasmaz
1389d49f03 Update flutter_rust_bridge to 2.4.0 (#511) 2024-10-01 13:31:55 +03:00
Ross Savage
9c0e469ad1 Fix pay onchain claim fee (#499)
* Fix pay onchain claim fee

* Bump flutter example dependencies
2024-09-25 10:44:33 +02:00
Roei Erez
b2d7026214 add validation for paying liquid fees 2024-09-25 09:20:00 +03:00
yse
7afa6fd4c1 fix: remove derive_fee_rate method 2024-09-24 22:51:49 +02:00
Roei Erez
70235968a6 fix lowball fee rates for onchain liquid tx 2024-09-24 23:03:37 +03:00