* 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>
* Re-add convenience Flutter gen command
* Decouple building ios framework step from bindings-swift script
* Add comments to uniffi build scripts.
* Make init-sdk part of init recipe
* Reorder recipes
* generate ios framework by default on gen recipe
* softlink C headers as part of their generator recipes
* Add convenience build recipe to generate everything needed for Flutter when developing the SDK
* Update Check Dart/Flutter bindings CI step
---------
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
* 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
* Add extend_incomplete_failed_send_swaps() on first sync
* Find lockup txs
* Send Swaps: find refund txs
* Simplify recover_send_swap_tx_ids, add recover_receive_swap_tx_ids
* recover_receive_swap_tx_ids: batch tx lookups
* Move onchain-restore methods to own module
* Store restored data in own struct
* Fix CI: bump pubspec.lock dependencies
* LiquidChainService: add get_scripts_history_electrum()
* restore_onchain: rely on batch call to fetch histories of all known swaps
* Rename get_scripts_history_electrum
* Rename restore_onchain.rs, flatten onchain inner module
* Rename ImmutableDb to SwapsList
* Simplify logic in restore.rs
* restore.rs: Add chain swap support, simplify logic
* restore.rs: add logging when script retrieval fails
* restore.rs: remove unused field create_resp
* restore.rs: rename SwapCompositeData to SwapHistory
* restore.rs: allow unused fields in simulated immutable data
* restore.rs: cargo fmt
* Cargo fmt
* Fix failing test
* When fetching script history, also fetch if tx is confirmed or not
* Recover send swaps: fetch claim tx IDs
* Recover onchain data: persist reconstructed swaps
* Simplify recover_from_onchain: store swap txs per swap ID
* Receive swaps: do not treat lockup/claim txs as pair
* Clarify meaning of partial swap state
* Cargo clippy
* Receive Chain Swap: distinguish BTC lockup from claim/refund tx
* Send Chain Swap: distinguish BTC lockup/claim by vout, not by history order
* get_partial_state: default to Created when state is unclear
* Receive Chain Swaps: differentiate BTC refund from BTC claim txs
* Send Swaps: clarify reason for defaulting to TimedOut on no lockup
* Chain swaps: add docs for meaning of server, user txs
* Recover Receive swaps: cover the case when only the lockup is available
* HistoryTxId: store confirmation block height
* Receive swaps: differentiate claim tx from swapper refund tx
* recover_from_onchain: extract immutable DB (swaps list) as arg
* Rename get_partial_state to derive_partial_state
* Restore: remove validation steps
* Restore chain swaps: treat as Complete only when claim is confirmed
* Fix clippy warnings
* Remove restore call from sync call
* Add Swift notification plugin
* Hash the metadata
* Validate min sendable amount
* Remove initializer as base class, UNNotificationServiceExtension, has no default initializer
* Set the PaymentMethod
* Handle PaymentDetails in SwapUpdated
* Improve payment text