* Suppress no-nullability-completeness errors
* Use 'dart run' instead of the deprecated 'flutter pub run' cmd
* Update flutter_rust_bridge to version 2.7.0
Set flutter_rust_bridge range to ">=2.4.0 <=2.7.0" on Dart plugin.
* Generate Dart bindings
* Update Flutter to latest version
* Update melos to latest version
* Make Flutter plugin compatible with AGP 8.+
- Declare 'namespace' property on module-level build script
- Change default namespace
- Remove package name from AndroidManifest
- Bump compileSdkVersion to latest
- Update source and target compatibility
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
* 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>
* 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
* 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>
* prepare-pay-onchain: add option for drain in req
* Fix clippy
* ChainSwapStateHandler: gracefully handle building both drain and non-drain lockups
* Send Chain swap: use standard feerate when estimating lockup tx fee
* UDL: move new drain field above the last PreparePayOnchainRequest optional field
* UDL: move new drain field optional
* prepare-pay-onchain: treat normal payment as drain if receiver amount is high enough
If the receiver amount is as high as it would be in case of drain, treat the current prepare-pay-onchain as drain, even if the drain flag is not set.
* build_drain_tx: add optional amount validation
* Add PayOnchainAmount enum to cover amount types (drain, receiver)
* Add ability to find max_receiver_amount_sat for non-drain sends
* Revert "Add ability to find max_receiver_amount_sat for non-drain sends"
This reverts commit 60ee1c768021810f72bc64a8ada69d35b638185e.
* prepare_pay_onchain: treat drain and non-drain cases separately
If the non-drain case is chosen with a receiver_amount equivalent to what drain would have calculated, it results in an error. For drain, the caller has to explicitly choose PayOnchainAmount::Drain.
* CLI: send-onchain-payment accepts optional amount
* CLI: add docs for send-onchain-payment drain arg
* SDK: expand docs for prepare_pay_onchain
* Re-generate RN bindings
* Re-generate flutter bindings
* List payments in reverse chonological order
* Add payment filtering and paging
* Fix examples
* Apply suggestions from code review
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
* Set timestamp for pseudo payments
* Filter by the first non-null timestamp from the join query
---------
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
* Check chain swap addresses for unspent outputs
* Monitoring expired swaps up to 4320 blocks after expiration
* Refactor chain swap monitoring
* Handle the error to prevent the loop exiting
* Add RefundPending state
* Check if RefundPendingbefore setting to Refundable
* Use script_get_balance to determine spent state
* Use unconfirmed balance to check if RefundPending should be reset to Refundable
* Implement Chain Swaps for receiving
* Send: validate if we have sufficient funds (#321)
* Implement Chain Swaps for receiving
* Fix rebase of flutter_rust_bridge version
* Send: validate if we have sufficient funds
* Re-generate FRB
---------
Co-authored-by: Ross Savage <hello@satimoto.com>
* Chaim swap claim: remove refund_tx arg (#328)
---------
Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
* feat: switch to pending state when receive lockup is in the mempool
* rebasing
* fix: move socket update logic to sub-crate
* Update payments query, to avoid duplicate Receive Swaps
This can happen if the app is stopped before the temporary lockup tx is removed from the DB. The Receive Swap would then forever result in two payments in list_payments.
* Add comments to clarify use of temp lockup txid
* Re-generate flutter bridge bindings
* feat: set Payment `tx_id` as optional and change `list_payments` logic
* fix: debug typo
* fix: undo `remove_temporary_tx` changes
* fix: switch to full join rather than manual filtering
* fix: bindings
* fix: improve error handling when tx data is not present
* fix: RN bindings
* fix: exclude Created receives from the list
* fix: fixing nits
* Re-generate FRB bindings
---------
Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>