Commit Graph

246 Commits

Author SHA1 Message Date
Daniel Granhão
d2be2ea49a Prevent recovering state from WaitingFeeAcceptance to Pending 2025-01-02 10:35:45 +00:00
Daniel Granhão
0394a66d4c Fix after rebase 2025-01-02 10:35:45 +00:00
Daniel Granhão
351473a41e Expose fees for review + auto accept 2025-01-02 10:35:45 +00:00
Ross Savage
ba6c41106c fix: pre-check updated fields before committing for real-time sync (#623)
---------
Co-authored-by: yse <hydra_yse@proton.me>
2025-01-02 09:44:18 +01:00
Ross Savage
9253caa388 Store unblinding data for the tx (#584) 2025-01-02 09:03:01 +01:00
yse
d3a3b2b171 fix: consider only L-BTC when calculating wallet balance (#630) 2024-12-30 06:00:32 +01:00
yse
6782e8beef feat: add real-time sync service (#629)
* feat(rt-sync): add persistency layer (#555)

* feat(rt-sync): add pull and merge (#556)

* feat(rt-sync): add push logic and run method (#568)

* feat(rt-sync): integrate rt-sync with the sdk

fix: add formatting command to build

feat: add secondary trigger to sync

deps: add tonic tls-webpki-roots

feat: prevent double claiming on status stream handlers

fix: add tx commit to chain swap update (#588)

fix: ensure we pull records before prepare_send

fix: fmt and tests

* fix: set initial pulled state to `Recoverable`

* feat(rt-sync): add `last_derivation_index` to sync service

* Single chain source

* Handle Recoverable state

* fix(rt-sync): chain recovery integration (#590)

Co-authored-by: yse <hydra_yse@proton.me>

* feat(rt-sync): add `pair_fees_json`

* fix(rt-sync): clean already persisted incoming records

* feat: cache wallet info (#591)

* log: add status-stream logging for non-local swaps

* Sync improvements (#598)

* Full sync on new Bitcoin block

* Track the last unconfirmed refund tx

* Trigger synced event on partial sync

* fix: remove `REPLACE` clause from swap insert/update

* fix(rt-sync): update chain swap payer/receiver amount (#604)

* Fix syncing last derivation index

* fix: update bindings and lockfile

* remove logs

* fix(rt-sync): avoid reuse of derivation index update logic (#608)

* Add 5 index buffer to full scan

* Fix storing claim_address (#609)

* Filter incoming MRH txs by swap timestamp

* fix liquid panding timestamp

* persist tx data timestamp

* Update unconfirmed transactions

* feat: add API key (#618)

* Use configured lazy connect channel in sync service

* fix: set lower-case header (#624)

* fix error message

* Store & Sync LNURL info (#617)

* Persist and decrypt LNURL info

* Update Notification Plugin

* Sync payment details

* Update list payments to include chain swaps with only user lockup (#620)

* Update payments query to include chain swaps without txs

* Allow emitting a payment event without tx_id

* fix: bindings

---------

Co-authored-by: Ross Savage <hello@satimoto.com>
Co-authored-by: Ross Savage <551697+dangeross@users.noreply.github.com>
Co-authored-by: Roei Erez <roeierez@gmail.com>
2024-12-24 10:39:43 +01:00
Daniel Granhão
b0b88b8f1c Merge pull request #614 from breez/default-external-input-parsers
Support default external input parsers
2024-12-20 14:50:37 +00:00
Daniel Granhão
bac98a6ddf Move get_all_external_input_parsers to Config 2024-12-17 10:32:42 +00:00
Daniel Granhão
015823c8b5 Remove Option from parsers field 2024-12-17 10:08:14 +00:00
Daniel Granhão
72a9aa66ff Support default external input parsers 2024-12-16 19:37:35 +00:00
Daniel Granhão
456de3c0a4 Minor docs fixes 2024-12-16 19:07:49 +00:00
Ross Savage
c773e8d7a5 Add ExternalInputParser mirror for frb (#605) 2024-12-14 15:31:57 +01:00
Ross Savage
e3fa3d62d1 Zero-amount quote get balance retry (#603)
* Use non-blocking sleep

* Use script_get_balance_with_retry to get user lockup balance
2024-12-13 14:21:01 +01:00
Ross Savage
a57083f520 Check MRH has already been paid (#596) 2024-12-13 13:11:56 +01:00
Daniel Granhão
895e64b823 Implement external input parsing 2024-12-12 12:02:53 +00:00
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
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