Commit Graph

171 Commits

Author SHA1 Message Date
Ross Savage
b78d53b436 Add swift framework plists (#536)
* Add a Info.plist per framework

* Update dart bindings
2024-10-24 16:58:55 +02:00
Roei Erez
8cf6a26dc0 Merge branch 'v0.4.0'
* v0.4.0:
  Fix SDK checkout (#528)
  update version to 0.4.0-rc3
  update version to 0.4.0-rc2
  Fix details fields error
  Add notification plugin CI
  update version to 0.4.0-rc1
2024-10-22 10:36:32 +03:00
Roei Erez
8cce2afe5d Add react native bindings 2024-10-18 11:25:10 +02:00
Roei Erez
c999cedaa3 Implement flutter bindings 2024-10-18 11:25:06 +02:00
ok300
cbe835b565 GetInfoResponse: add fingerprint (#532)
* GetInfoResponse: add fingerprint

* Re-generate dart ffi with `just ffigen`

* Re-generate dart ffi with `just gen`
2024-10-17 14:36:33 +00:00
Roei Erez
31fcfaa3db update version to 0.4.0-rc3 2024-10-14 11:45:16 +03:00
Ross Savage
0884106159 Add prepare_lnurl_pay (#524)
* Add prepare_lnurl_pay

* Move fields into prepare response
2024-10-14 10:06:14 +02:00
Ross Savage
7202e62967 Add notification plugin CI (#526)
* Add notification plugin CI

* Fix details fields error
2024-10-14 09:50:13 +02:00
Roei Erez
63d9305acd update version to 0.4.0-rc2 2024-10-14 10:44:14 +03:00
Ross Savage
c1afb5efa1 Fix details fields error
(cherry picked from commit 7588ba5579684d380be6981c00b5be08052494e9)
2024-10-14 10:40:56 +03:00
Roei Erez
e2fd502827 update version to 0.4.0-rc1 2024-10-13 15:01:46 +03:00
Ross Savage
3867fa91da Get Payment (#476)
* Get payment by destination

* CI fixes

* Remove claim_address from query

* Add PaymentDestination enum

* Add payment hash as a payment query option

* Bump Flutter dependencies

* Move destination/address queries to list_payments

* Apply suggestions from code review

Co-authored-by: yse <70684173+hydra-yse@users.noreply.github.com>

---------

Co-authored-by: yse <70684173+hydra-yse@users.noreply.github.com>
2024-10-10 17:44:32 +02:00
yse
42f4ca0129 feat: require Breez API key globally on mainnet (#520) 2024-10-08 16:17:34 +02:00
ok300
046e7ab1c8 list-refundables: show refundable amount, not swap amount (#516)
* 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>
2024-10-07 15:56:02 +00:00
Ross Savage
228bf9ab36 Re-add convenience Flutter gen command (#514)
* 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>
2024-10-03 13:48:12 +03:00
Erdem Yerebasmaz
1389d49f03 Update flutter_rust_bridge to 2.4.0 (#511) 2024-10-01 13:31:55 +03:00
Erdem Yerebasmaz
f6fa503cb9 Flutter uniFFI (#510)
* 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>
2024-10-01 10:59:11 +03:00
Roei Erez
4d1690bfc4 update version to 0.3.4 2024-09-25 12:36:13 +03:00
Ross Savage
a6eb72c44c Fix pay onchain claim fee (#499)
* Fix pay onchain claim fee

* Bump flutter example dependencies

(cherry picked from commit 9c0e469ad1)
2024-09-25 10:51:17 +02:00
Roei Erez
24d41de656 update versions 2024-09-25 09:31:55 +03:00
Roei Erez
cd9cb9c46c update version to 0.3.2 2024-09-24 16:47:32 +03:00
yse
783c5ac450 feat: refactor refund logic and support lowball broadcasts (#407) 2024-09-20 15:57:54 +02:00
yse
189e257f89 feat: add lowball broadcast support with API key for all transaction types (#489) 2024-09-20 13:04:49 +02:00
Ross Savage
bfa7c24f83 Fix the namespace conflict (#490) 2024-09-18 13:19:50 +02:00
Ross Savage
471cb77e27 Build SDK bindings for Flutter (#488)
* Add build SDK bindings scripts for flutter

* Remove REMOVE_RECURSE to prevent bindings deletion

* Address feedback
2024-09-16 14:19:56 +02:00
ok300
e8cd66f81f prepare-pay-onchain: add option for drain (#464)
* 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
2024-09-11 15:52:56 +00:00
Ross Savage
d42e37ce1e Fix CI and notfication plugin issues (#485) 2024-09-11 15:06:21 +02:00
Ross Savage
c141d8e0a4 Change short_channel_id to string (#484)
* Change short_channel_id to string

* Bump sdk-common
2024-09-11 12:54:39 +02:00
Ross Savage
bd39b7ab02 RN: Prevent conversion of ReadableMap to HashMap (#482)
* Prevent conversion of ReadableMap to HashMap

* Handle Null ReadableType
2024-09-09 20:04:14 +02:00
yse
2dc3d57309 fix: set PaymentDetails as mandatory, default to LiquidAddress (#474) 2024-09-09 13:00:22 +02:00
Ross Savage
abf63931de Set optional prepare params as null (#472) 2024-09-05 15:21:23 +02:00
Ross Savage
7440445d3d Fix macOS platform definition (#467) 2024-09-04 09:59:50 +02:00
Ross Savage
77a789310e Override the access modifier for exported symbols (#466) 2024-09-02 16:29:21 +02:00
Erdem Yerebasmaz
c2db7ebfea Update flutter_rust_bridge to 2.3.0 (#465) 2024-09-02 16:30:12 +03:00
Ross Savage
b493f3dc03 Swift notification plugin (#436)
* 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
2024-08-30 09:20:13 +02:00
Ross Savage
924618c99e Android notification plugin (#433)
* Add Android notification plugin

* Hash and compare payment swapId

* Hash the metadata

* Validate min sendable amount

* Set the PaymentMethod

* chore: apply breaking changes from BIP21 support

* Handle Lightning payments on SwapUpdated events

* Update Flutter

* Improve payment text

---------

Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
2024-08-29 14:05:24 +02:00
Ross Savage
6b78919df8 Add sign_message and check_message (#443)
* Add sign and check message methods

* Use lightning message_signing module to verify the message signature

* Use hash engine
2024-08-29 08:42:16 +02:00
Ross Savage
deb9ed1b09 Add description hash to receive payment (#440)
* Add option to hash description

* Fix Flutter gen

* Switch to upstream boltz-rust

* Address feedback
2024-08-29 08:17:10 +02:00
Ross Savage
34774647bf Integrate webhooks (#410)
* 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
2024-08-29 08:03:50 +02:00
Ross Savage
251c252374 Add Go/CS bindings (#147)
* Publish Go/CS packages

* Fix optional param ordering

* Fix CI installed bindgens
2024-08-28 15:14:20 +02:00
Ross Savage
59f5e0636c Handle in RN codegen multiple fields in enum variant (#453)
* Update RN example

* Handle enum variants with multiple fields
2024-08-23 06:12:39 +02:00
yse
1a89bcd6c1 feat: add BIP21 support (#414)
Co-authored-by: Erdem Yerebasmaz <erdem@yerebasmaz.com>
Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
2024-08-22 12:23:36 +02:00
Erdem Yerebasmaz
5248dfc235 Depend on sdk-common with liquid feature (#452)
* Add copy script to packages/react-native makefile
  * Reorder scripts
* Depend on sdk-common with liquid feature
  * chore: cargo update
* Generate Dart bindings
* Generate UniFFI bindings
* Simplify import resolution by using prelude::*
  * Applies changes from https://github.com/breez/breez-sdk-greenlight/pull/1078
2024-08-20 18:50:27 +03:00
Erdem Yerebasmaz
0cb02ce435 Bugfix: Update production podpsec's version with version script (#447)
* Add just recipe to update version number on podspec files & Cmake scripts

* Resolve relative path of root from script directory

* fix: Update production podpsec's version with version script

* Run 'just version'

* Update melos dependency

* Check if versions on podspec & cmake scripts were updated properly on CI

* Update versions on podspec & cmake scripts on publish

* Declare license type on podspec

* Add platform-specific link recipes

* Add copy recipes to be used in CI workflows
2024-08-20 14:51:07 +03:00
Erdem Yerebasmaz
265724101c Bump flutter_rust_bridge to 2.2.0 (#442) 2024-08-13 11:46:08 +03:00
Erdem Yerebasmaz
3703fd3477 Allow working with local library on iOS (#434)
* Update SDK range and update dependencies to latest

* Correct the output folder creation on codegen just recipe

* Create a podspec for local development

* Use production podspec when publishing

* Remove spec.platform as deployment targets are already set
2024-08-07 14:59:00 +03:00
Roei Erez
fe112a8bf7 Merge branch 'v0.2.1' 2024-08-04 12:21:12 +03:00
Roei Erez
d123a77b12 update version to 0.2.1 2024-08-01 16:27:08 +03:00
Erdem Yerebasmaz
2c4441e977 Bugfix: Correct the relative path on bindings scripts (#425)
* Correct the path of breez_sdk_liquid.kt on .gitignore

* Fix relative path on bindings-android script

* Update bindings README

'python' & 'swift' scripts are not available on this crate

* chore: ran melos pub-upgrade
2024-08-01 11:11:04 +03:00
Erdem Yerebasmaz
859c128475 Update tag names 2024-07-25 19:34:42 +03:00