* 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
* Flutter uniffi
* Set on-demand resources
* Do not build non-uniffi libraries
* Change iosLibName
* Add BreezSDKLiquid as on demand resources
* Use downloaded framework
* Add Sources to published flutter package
* Set OTHER_LDFLAGS
* Add logging
* Refactor library initialization logic and throw an error if initialization fails
* Do not statically link framework on production
* Use uniFFI headers to generate FlutterBreezLiquidBindings
* Re add frb header
* Correct the library name
* Remove static_framework
* Move source header files
* Copy iOS podspecs to macOS folder
* Update version of macOS podspecs
* Remove Windows & Linux support
* Remove CMake scripts
* Remove breez_sdk_liquid.podspec from version script
* Cleanup older build scripts used by melos & just recipes
* Remove softlink & copy recipes
Add recipe descriptions
* Rename link-uniffi recipe to link-headers
Make sure headers are linked after uniffi is built
- Remove just gen recipe
Add recipe descriptions
* Set package versions on production files as well when publishing
* Include bindings project on melos script hooks
* Flutter uniffi
* Set on-demand resources
* Do not build non-uniffi libraries
* Change iosLibName
* Add BreezSDKLiquid as on demand resources
* Use downloaded framework
* Add Sources to published flutter package
* Set OTHER_LDFLAGS
* Add logging
* Refactor library initialization logic and throw an error if initialization fails
* Do not statically link framework on production
* Use uniFFI headers to generate FlutterBreezLiquidBindings
* Re add frb header
* Correct the library name
* Remove static_framework
* Move source header files
* Copy iOS podspecs to macOS folder
* Update version of macOS podspecs
* Remove Windows & Linux support
* Remove CMake scripts
* Remove breez_sdk_liquid.podspec from version script
* Cleanup older build scripts used by melos & just recipes
* Remove softlink & copy recipes
Add recipe descriptions
* Rename link-uniffi recipe to link-headers
Make sure headers are linked after uniffi is built
- Remove just gen recipe
Add recipe descriptions
* Set package versions on production files as well when publishing
* Include bindings project on melos script hooks
* chore: just version
* fix: remove unused files on "Set package version" step
* copy FFI header files
* [WIP] Add macOS support
* remove example app on Flutter plugin
* Link headers before running ffigen on CI workflow
* macOS: add macos/Sources folder to .gitignore
.
* macOS: Copy iOS sources to macOS sources after downloading bindings
* macOS: copy sources & framework file to macos folder on build-uniffi-swift script
* import breez_sdk_liquidFFI header on plugin file
Update flutter_breez_liquid.c
* cleanup header file artifacts
---------
Co-authored-by: Ross Savage <hello@satimoto.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
* 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
* 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>
* Generate Dart bindings
* flutter_rust_bridge has relative path issues with this new approach introduced in 2.0.0-dev.38, we'll be using the default rust_output path until it's addressed.
* Receive: Add magic routing hint support
* Send: add MRH support
* Filter out and reject self-transfers
* Extract self-transfer validation in own fn
* PrepareSendResponse: use onchain fee as fees_sat if MRH present
* Use onchain tx fee as payment fee, if MRH used for direct onchain tx
* Fix swap fee calculation when MRH is used
* Apply boltz-client patch that aborts send if tx broadcast fails
* Send with MRH: return pending payment
* Receive with MRH: validate BIP21 amount, address
* Emit remaining events for MRH Send, Receive
* Sync: update swap info and emit events after new tx data is persisted
* Extract MRH send into its own send_payment_via_mrh()
* Pending Send via swap: store tx fees for pseudo-tx
* Fix clippy
* Add SDK global logger
* Add bindings
* Fix path to internal uniffi log
* Exclude "set_log_stream" from generated RN methods
* Move logger-specific structs to a separate module
* Delegate init_logging to method in logger.rs
* Rename uniffi BindingLogger to UniffiBindingLogger
* Add set_log_stream for dart bindings
* Add SDK logger to Dart bindings
* Rename dart binding logger to DartBindingLogger
* Add rustdocs
* RN bindings: Add manual handling for setLogStream()
* Re-generate dart bindings
* Re-generate RN bindings
* Remove LOG_INIT cell
* Set global maximum log level once on initialization
Return a LiquidSdkError::Generic instead of Anyhow error when initializing log stream on Dart bindings
* Do not panic when initializing binding loggers
* Rename LogStream to Logger
---------
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>