Commit Graph

17 Commits

Author SHA1 Message Date
Ross Savage
79462db2e2 Verify and claim swap if not verifiable in swap loop (#681)
* Verify and claim swap if not verifiable in swap loop

* Verify lockup amount

* Tolerate overpayment

* Adapt receive swap test

* Separate verification functions and set swap Failed if underpaid
2025-01-25 09:30:24 +01:00
Daniel Granhão
7841939e6a Expose amountless swap fees auto acceptance (#690)
* Expose amountless swap fees auto acceptance

* Move field behind optional ones

* Add serde default to auto_accepted_fees
2025-01-24 10:18:34 +00:00
Daniel Granhão
0cdfa2057c Prevent claiming of overpaid swaps (#667)
* Handle overpayments gracefully

* Fix test mock txs and swaps

* Get actual payer amount from blockchain

* Check first tx output instead of script balance

* Fetch actual payer amount if not available

* Remove user lockup amount verification in recoverer

* Refactor user lockup amount check into appropriate method
2025-01-21 10:13:13 +00:00
yse
95998013a9 fix: remove mandatory API key checks (#639) 2025-01-21 08:32:05 +01:00
yse
3a09bbe653 fix: increase keep-alive time and add cli sync flag (#672)
Reflects changes from breez/data-sync#14
2025-01-17 18:25:47 +01:00
yse
b185ff0e35 feat: add cooperative preimage recovery and optimize flow (#669) 2025-01-17 14:32:58 +01:00
yse
bb0b370d17 fix: remove auto-formatting command from build (#655)
* feat: use `include_protos` macro instead of builder
* fix: pin boltz to rev SatoshiPortal/boltz-rust@3bbc0dd
2025-01-15 11:02:35 +01:00
Daniel Granhão
95bbd0e49b Implement optimistic locking for read-update-write swap operations (#652)
* Implement optimistic locking for read-update-write swap operations

* Fail on stale swap update and add tests
2025-01-12 22:44:15 +00:00
Ross Savage
50cb8be18c Add destination pubkey and bolt12 invoice to payment details (#649)
* Add destination pubkey and bolt12 invoice to payment details

* Change macro to fn
2025-01-10 13:53:43 +03:00
Ross Savage
66810ecdf6 feat: add swap expiry timestamp (#622) 2025-01-08 14:55:47 +01:00
Daniel Granhão
b18ad6d097 Fix update_fields 2025-01-03 09:37:02 +00:00
Daniel Granhão
dd6038be60 Implement accepted_receiver_amount_sat merge 2025-01-02 10:40:31 +00:00
Daniel Granhão
9383be49bc Bump schema minor version 2025-01-02 10:40:31 +00:00
Daniel Granhão
a1e5576286 Store actual payer and accepted receiver amounts 2025-01-02 10:40:25 +00:00
Daniel Granhão
0394a66d4c Fix after rebase 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
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