From e4fa6f411488ca6e4dc209db59a741d27eb66b1d Mon Sep 17 00:00:00 2001 From: Roy Sheinfeld <31890660+kingonly@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:44:38 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f8b1ba637..f6e61b0e8 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,8 @@ See the instructions in each sub project readme on how to build, test and run. - [x] C# bindings - [x] Python bindings - [x] Spend all funds -- [ ] Webhook for receiving payments -- [ ] Mobile Notifications -- [ ] Offline receive via notifications +- [x] Webhook for receiving payments +- [x] Offline receive via notifications - [ ] LSPS2 support - [ ] LSPS1 support - [ ] Send/receive bolt12 From 8edb18842057925f4eb5972d58a0597c519746a2 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz <4012752+erdemyerebasmaz@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:59:51 +0300 Subject: [PATCH 2/4] Upgrade flutter_rust_bridge to 1.82.6 --- libs/Cargo.lock | 4 +- libs/sdk-bindings/Cargo.toml | 2 +- libs/sdk-core/Cargo.toml | 2 +- libs/sdk-core/src/bridge_generated.rs | 4 +- libs/sdk-flutter/lib/bridge_generated.dart | 2 +- .../lib/bridge_generated.freezed.dart | 66 +++++++++---------- libs/sdk-flutter/makefile | 2 +- libs/sdk-flutter/pubspec.lock | 42 ++++++------ libs/sdk-flutter/pubspec.yaml | 4 +- tools/sdk-cli/Cargo.lock | 4 +- 10 files changed, 66 insertions(+), 66 deletions(-) diff --git a/libs/Cargo.lock b/libs/Cargo.lock index 4093e8b92..7567cc05b 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -1118,9 +1118,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.4" +version = "1.82.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae25c4523d6064e90202fb1bfd847f3e3c30026803a20ddfe55fbbe9fbc199d" +checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" dependencies = [ "allo-isolate", "anyhow", diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index 601042a31..f44113ada 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -26,7 +26,7 @@ camino = "1.1.1" lightning-invoice = "*" log = "*" once_cell = "*" -flutter_rust_bridge = "=1.82.4" +flutter_rust_bridge = "=1.82.6" tiny-bip39 = "*" tonic = { version = "^0.8", features = [ "tls", diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index adbe10e9c..63e4e760f 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -8,7 +8,7 @@ name = "breez_sdk_core" crate-type = ["staticlib", "cdylib", "lib"] [dependencies] -flutter_rust_bridge = "=1.82.4" +flutter_rust_bridge = "=1.82.6" aes = "0.8" anyhow = { version = "1.0", features = ["backtrace"] } cbc = { version = "0.1", features = ["std"] } diff --git a/libs/sdk-core/src/bridge_generated.rs b/libs/sdk-core/src/bridge_generated.rs index 8861bd5fb..f48746f75 100644 --- a/libs/sdk-core/src/bridge_generated.rs +++ b/libs/sdk-core/src/bridge_generated.rs @@ -9,7 +9,7 @@ clippy::too_many_arguments )] // AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.4. +// Generated by `flutter_rust_bridge`@ 1.82.6. use crate::binding::*; use core::panic::UnwindSafe; @@ -2138,4 +2138,4 @@ support::lazy_static! { #[path = "bridge_generated.io.rs"] mod io; #[cfg(not(target_family = "wasm"))] -pub use io::*; +pub use self::io::*; diff --git a/libs/sdk-flutter/lib/bridge_generated.dart b/libs/sdk-flutter/lib/bridge_generated.dart index dfd5b8355..10f4c98b2 100644 --- a/libs/sdk-flutter/lib/bridge_generated.dart +++ b/libs/sdk-flutter/lib/bridge_generated.dart @@ -1,5 +1,5 @@ // AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.4. +// Generated by `flutter_rust_bridge`@ 1.82.6. // ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const import 'dart:convert'; diff --git a/libs/sdk-flutter/lib/bridge_generated.freezed.dart b/libs/sdk-flutter/lib/bridge_generated.freezed.dart index ef7091acd..57c8d6d1c 100644 --- a/libs/sdk-flutter/lib/bridge_generated.freezed.dart +++ b/libs/sdk-flutter/lib/bridge_generated.freezed.dart @@ -120,7 +120,7 @@ class _$AesSuccessActionDataResult_DecryptedImpl implements AesSuccessActionData } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AesSuccessActionDataResult_DecryptedImpl && @@ -257,7 +257,7 @@ class _$AesSuccessActionDataResult_ErrorStatusImpl implements AesSuccessActionDa } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AesSuccessActionDataResult_ErrorStatusImpl && @@ -486,7 +486,7 @@ class _$BreezEvent_NewBlockImpl implements BreezEvent_NewBlock { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_NewBlockImpl && @@ -655,7 +655,7 @@ class _$BreezEvent_InvoicePaidImpl implements BreezEvent_InvoicePaid { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_InvoicePaidImpl && @@ -807,7 +807,7 @@ class _$BreezEvent_SyncedImpl implements BreezEvent_Synced { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); } @@ -962,7 +962,7 @@ class _$BreezEvent_PaymentSucceedImpl implements BreezEvent_PaymentSucceed { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_PaymentSucceedImpl && @@ -1131,7 +1131,7 @@ class _$BreezEvent_PaymentFailedImpl implements BreezEvent_PaymentFailed { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_PaymentFailedImpl && @@ -1283,7 +1283,7 @@ class _$BreezEvent_BackupStartedImpl implements BreezEvent_BackupStarted { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_BackupStartedImpl); } @@ -1421,7 +1421,7 @@ class _$BreezEvent_BackupSucceededImpl implements BreezEvent_BackupSucceeded { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_BackupSucceededImpl); } @@ -1577,7 +1577,7 @@ class _$BreezEvent_BackupFailedImpl implements BreezEvent_BackupFailed { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_BackupFailedImpl && @@ -1841,7 +1841,7 @@ class _$InputType_BitcoinAddressImpl implements InputType_BitcoinAddress { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_BitcoinAddressImpl && @@ -2010,7 +2010,7 @@ class _$InputType_Bolt11Impl implements InputType_Bolt11 { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_Bolt11Impl && @@ -2177,7 +2177,7 @@ class _$InputType_NodeIdImpl implements InputType_NodeId { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_NodeIdImpl && @@ -2342,7 +2342,7 @@ class _$InputType_UrlImpl implements InputType_Url { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_UrlImpl && @@ -2510,7 +2510,7 @@ class _$InputType_LnUrlPayImpl implements InputType_LnUrlPay { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_LnUrlPayImpl && @@ -2679,7 +2679,7 @@ class _$InputType_LnUrlWithdrawImpl implements InputType_LnUrlWithdraw { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_LnUrlWithdrawImpl && @@ -2849,7 +2849,7 @@ class _$InputType_LnUrlAuthImpl implements InputType_LnUrlAuth { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_LnUrlAuthImpl && @@ -3018,7 +3018,7 @@ class _$InputType_LnUrlErrorImpl implements InputType_LnUrlError { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$InputType_LnUrlErrorImpl && @@ -3228,7 +3228,7 @@ class _$LnUrlCallbackStatus_OkImpl implements LnUrlCallbackStatus_Ok { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); } @@ -3348,7 +3348,7 @@ class _$LnUrlCallbackStatus_ErrorStatusImpl implements LnUrlCallbackStatus_Error } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_ErrorStatusImpl && @@ -3549,7 +3549,7 @@ class _$LnUrlPayResult_EndpointSuccessImpl implements LnUrlPayResult_EndpointSuc } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlPayResult_EndpointSuccessImpl && @@ -3691,7 +3691,7 @@ class _$LnUrlPayResult_EndpointErrorImpl implements LnUrlPayResult_EndpointError } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlPayResult_EndpointErrorImpl && @@ -3832,7 +3832,7 @@ class _$LnUrlPayResult_PayErrorImpl implements LnUrlPayResult_PayError { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlPayResult_PayErrorImpl && @@ -4033,7 +4033,7 @@ class _$LnUrlWithdrawResult_OkImpl implements LnUrlWithdrawResult_Ok { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlWithdrawResult_OkImpl && @@ -4168,7 +4168,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl implements LnUrlWithdrawResult_Error } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LnUrlWithdrawResult_ErrorStatusImpl && @@ -4376,7 +4376,7 @@ class _$NodeConfig_GreenlightImpl implements NodeConfig_Greenlight { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NodeConfig_GreenlightImpl && @@ -4579,7 +4579,7 @@ class _$NodeCredentials_GreenlightImpl implements NodeCredentials_Greenlight { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NodeCredentials_GreenlightImpl && @@ -4769,7 +4769,7 @@ class _$PaymentDetails_LnImpl implements PaymentDetails_Ln { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentDetails_LnImpl && @@ -4903,7 +4903,7 @@ class _$PaymentDetails_ClosedChannelImpl implements PaymentDetails_ClosedChannel } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PaymentDetails_ClosedChannelImpl && @@ -5112,7 +5112,7 @@ class _$ReportIssueRequest_PaymentFailureImpl implements ReportIssueRequest_Paym } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ReportIssueRequest_PaymentFailureImpl && @@ -5319,7 +5319,7 @@ class _$SuccessActionProcessed_AesImpl implements SuccessActionProcessed_Aes { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SuccessActionProcessed_AesImpl && @@ -5459,7 +5459,7 @@ class _$SuccessActionProcessed_MessageImpl implements SuccessActionProcessed_Mes } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SuccessActionProcessed_MessageImpl && @@ -5600,7 +5600,7 @@ class _$SuccessActionProcessed_UrlImpl implements SuccessActionProcessed_Url { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SuccessActionProcessed_UrlImpl && diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 9ab526cd6..47aaa8d62 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -15,7 +15,7 @@ all: ios android dev: ios-dev android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 1.82.4 + cargo install flutter_rust_bridge_codegen --version 1.82.6 flutter_rust_bridge_codegen ios: $(SOURCES) flutter_rust_bridge diff --git a/libs/sdk-flutter/pubspec.lock b/libs/sdk-flutter/pubspec.lock index f9a9fd6f6..da660a91e 100644 --- a/libs/sdk-flutter/pubspec.lock +++ b/libs/sdk-flutter/pubspec.lock @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_resolvers - sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: built_value - sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" + sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 url: "https://pub.dev" source: hosted - version: "8.8.0" + version: "8.8.1" characters: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" clock: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: code_builder - sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f + sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.9.0" collection: dependency: transitive description: @@ -250,10 +250,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: "7c5e94d037ccb0de7b5f7de3ff2491548d292b5aad01b01f5a5703f8aac9389b" + sha256: "02720226035257ad0b571c1256f43df3e1556a499f6bcb004849a0faaa0e87f0" url: "https://pub.dev" source: hosted - version: "1.82.4" + version: "1.82.6" flutter_test: dependency: "direct dev" description: flutter @@ -263,10 +263,10 @@ packages: dependency: "direct main" description: name: freezed - sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a" + sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.4.6" freezed_annotation: dependency: "direct main" description: @@ -303,10 +303,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" http_multi_server: dependency: transitive description: @@ -415,10 +415,10 @@ packages: dependency: transitive description: name: petitparser - sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.0.2" pointycastle: dependency: transitive description: @@ -508,10 +508,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_span: dependency: transitive description: @@ -604,10 +604,10 @@ packages: dependency: transitive description: name: uuid - sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921 + sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.2.2" vector_math: dependency: transitive description: @@ -657,5 +657,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" + dart: ">=3.2.0 <4.0.0" flutter: ">=3.10.0" diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index b93ec328b..18ea9c130 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: sdk: flutter ### flutter_rust_bridge_codegen dependencies ffi: ^2.1.0 - flutter_rust_bridge: 1.82.4 # breez-sdk requirement - freezed: ^2.4.5 + flutter_rust_bridge: ^1.82.6 # breez-sdk requirement + freezed: ^2.4.6 freezed_annotation: ^2.4.1 ### rxdart: ^0.27.7 diff --git a/tools/sdk-cli/Cargo.lock b/tools/sdk-cli/Cargo.lock index aeb5132f8..fc7c9ddca 100644 --- a/tools/sdk-cli/Cargo.lock +++ b/tools/sdk-cli/Cargo.lock @@ -1004,9 +1004,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.4" +version = "1.82.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae25c4523d6064e90202fb1bfd847f3e3c30026803a20ddfe55fbbe9fbc199d" +checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" dependencies = [ "allo-isolate", "anyhow", From 323b0cac829ee5038c659ede057d63dd25372ef8 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz <4012752+erdemyerebasmaz@users.noreply.github.com> Date: Mon, 18 Dec 2023 18:00:25 +0300 Subject: [PATCH 3/4] Update breez sdk version from 0.2.10 to 0.2.12 on remaining files --- libs/Cargo.lock | 4 ++-- libs/Cargo.toml | 2 +- libs/sdk-flutter/ios/breez_sdk.podspec | 2 +- libs/sdk-flutter/ios/breez_sdk.podspec.production | 4 ++-- libs/sdk-flutter/pubspec.yaml | 2 +- libs/sdk-react-native/example/package.json | 2 +- libs/sdk-react-native/package.json | 2 +- tools/sdk-cli/Cargo.lock | 4 ++-- tools/sdk-cli/Cargo.toml | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/Cargo.lock b/libs/Cargo.lock index 7567cc05b..e8e49f999 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -547,7 +547,7 @@ dependencies = [ [[package]] name = "breez-sdk-core" -version = "0.2.10" +version = "0.2.12" dependencies = [ "aes", "anyhow", @@ -596,7 +596,7 @@ dependencies = [ [[package]] name = "breez_sdk" -version = "0.2.10" +version = "0.2.12" dependencies = [ "anyhow", "breez-sdk-core", diff --git a/libs/Cargo.toml b/libs/Cargo.toml index 26b2ce8d9..203a587ea 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -13,7 +13,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.2.10" +version = "0.2.12" [workspace.dependencies] uniffi = "0.23.0" diff --git a/libs/sdk-flutter/ios/breez_sdk.podspec b/libs/sdk-flutter/ios/breez_sdk.podspec index 119fa2fdd..91fa23918 100644 --- a/libs/sdk-flutter/ios/breez_sdk.podspec +++ b/libs/sdk-flutter/ios/breez_sdk.podspec @@ -2,7 +2,7 @@ # Run `pod lib lint breez_sdk.podspec` to validate before publishing. Pod::Spec.new do |s| s.name = 'breez_sdk' - s.version = '0.2.10' + s.version = '0.2.12' s.summary = 'BreezSDK flutter plugin.' s.description = <<-DESC BreezSDK flutter plugin. diff --git a/libs/sdk-flutter/ios/breez_sdk.podspec.production b/libs/sdk-flutter/ios/breez_sdk.podspec.production index 25b125183..6201c202e 100644 --- a/libs/sdk-flutter/ios/breez_sdk.podspec.production +++ b/libs/sdk-flutter/ios/breez_sdk.podspec.production @@ -2,7 +2,7 @@ # Run `pod lib lint breez_sdk.podspec` to validate before publishing. Pod::Spec.new do |s| s.name = 'breez_sdk' - s.version = '0.2.10' + s.version = '0.2.12' s.summary = 'BreezSDK flutter plugin.' s.description = <<-DESC BreezSDK flutter plugin. @@ -20,5 +20,5 @@ Pod::Spec.new do |s| # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = {'STRIP_STYLE' => 'non-global', 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } s.swift_version = '5.0' - s.dependency "breez_sdkFFI", "0.2.10" + s.dependency "breez_sdkFFI", "0.2.12" end diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 18ea9c130..19fd10401 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: breez_sdk description: A new flutter plugin project. -version: 0.2.10 +version: 0.2.12 publish_to: none environment: diff --git a/libs/sdk-react-native/example/package.json b/libs/sdk-react-native/example/package.json index 59d427680..40fe21e2c 100644 --- a/libs/sdk-react-native/example/package.json +++ b/libs/sdk-react-native/example/package.json @@ -13,7 +13,7 @@ "rebuild": "rm -rf node_modules && yarn && yarn pods" }, "dependencies": { - "@breeztech/react-native-breez-sdk": "0.2.10", + "@breeztech/react-native-breez-sdk": "0.2.12", "@dreson4/react-native-quick-bip39": "^0.0.5", "react": "18.1.0", "react-native": "0.70.6", diff --git a/libs/sdk-react-native/package.json b/libs/sdk-react-native/package.json index 086d07e27..54b74eaf6 100644 --- a/libs/sdk-react-native/package.json +++ b/libs/sdk-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@breeztech/react-native-breez-sdk", - "version": "0.2.10", + "version": "0.2.12", "description": "React Native Breez SDK", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/tools/sdk-cli/Cargo.lock b/tools/sdk-cli/Cargo.lock index fc7c9ddca..03133b8fe 100644 --- a/tools/sdk-cli/Cargo.lock +++ b/tools/sdk-cli/Cargo.lock @@ -440,7 +440,7 @@ dependencies = [ [[package]] name = "breez-sdk-cli" -version = "0.2.10" +version = "0.2.12" dependencies = [ "anyhow", "breez-sdk-core", @@ -457,7 +457,7 @@ dependencies = [ [[package]] name = "breez-sdk-core" -version = "0.2.10" +version = "0.2.12" dependencies = [ "aes", "anyhow", diff --git a/tools/sdk-cli/Cargo.toml b/tools/sdk-cli/Cargo.toml index 372dbc81c..209ff730c 100644 --- a/tools/sdk-cli/Cargo.toml +++ b/tools/sdk-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "breez-sdk-cli" -version = "0.2.10" +version = "0.2.12" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 498a523e9894e4633f5273f1194b9f0e0fe71fca Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz <4012752+erdemyerebasmaz@users.noreply.github.com> Date: Mon, 18 Dec 2023 21:14:57 +0300 Subject: [PATCH 4/4] Revert [Pass flutter_rust_bridge_codegen config to pubspec.yaml] and generate bindings Reverts e397f1693abfdca67b1008ae8783ebd4d3093394 as this feature of flutter_rust_bridge isn't matured yet and it's documentation does not reflect the truth. c-output param value was being ignored. --- .../ios/Classes/bridge_generated.h | 45 ++++++++++++------- libs/sdk-flutter/makefile | 2 +- libs/sdk-flutter/pubspec.yaml | 9 ---- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/libs/sdk-flutter/ios/Classes/bridge_generated.h b/libs/sdk-flutter/ios/Classes/bridge_generated.h index b3233f70e..3c27519ba 100644 --- a/libs/sdk-flutter/ios/Classes/bridge_generated.h +++ b/libs/sdk-flutter/ios/Classes/bridge_generated.h @@ -91,9 +91,20 @@ typedef struct wire_SendPaymentRequest { uint64_t *amount_msat; } wire_SendPaymentRequest; +typedef struct wire_TlvEntry { + uint64_t field_number; + struct wire_uint_8_list *value; +} wire_TlvEntry; + +typedef struct wire_list_tlv_entry { + struct wire_TlvEntry *ptr; + int32_t len; +} wire_list_tlv_entry; + typedef struct wire_SendSpontaneousPaymentRequest { struct wire_uint_8_list *node_id; uint64_t amount_msat; + struct wire_list_tlv_entry *extra_tlvs; } wire_SendSpontaneousPaymentRequest; typedef struct wire_OpeningFeeParams { @@ -186,15 +197,15 @@ typedef struct wire_BuyBitcoinRequest { struct wire_OpeningFeeParams *opening_fee_params; } wire_BuyBitcoinRequest; -typedef struct wire_SweepRequest { +typedef struct wire_RedeemOnchainFundsRequest { struct wire_uint_8_list *to_address; uint32_t sat_per_vbyte; -} wire_SweepRequest; +} wire_RedeemOnchainFundsRequest; -typedef struct wire_PrepareSweepRequest { +typedef struct wire_PrepareRedeemOnchainFundsRequest { struct wire_uint_8_list *to_address; - uint64_t sat_per_vbyte; -} wire_PrepareSweepRequest; + uint32_t sat_per_vbyte; +} wire_PrepareRedeemOnchainFundsRequest; typedef struct wire_PrepareRefundRequest { struct wire_uint_8_list *swap_address; @@ -312,9 +323,10 @@ void wire_receive_onchain(int64_t port_, struct wire_ReceiveOnchainRequest *req) void wire_buy_bitcoin(int64_t port_, struct wire_BuyBitcoinRequest *req); -void wire_sweep(int64_t port_, struct wire_SweepRequest *req); +void wire_redeem_onchain_funds(int64_t port_, struct wire_RedeemOnchainFundsRequest *req); -void wire_prepare_sweep(int64_t port_, struct wire_PrepareSweepRequest *req); +void wire_prepare_redeem_onchain_funds(int64_t port_, + struct wire_PrepareRedeemOnchainFundsRequest *req); void wire_list_refundables(int64_t port_); @@ -362,14 +374,16 @@ struct wire_OpenChannelFeeRequest *new_box_autoadd_open_channel_fee_request_0(vo struct wire_OpeningFeeParams *new_box_autoadd_opening_fee_params_0(void); -struct wire_PrepareRefundRequest *new_box_autoadd_prepare_refund_request_0(void); +struct wire_PrepareRedeemOnchainFundsRequest *new_box_autoadd_prepare_redeem_onchain_funds_request_0(void); -struct wire_PrepareSweepRequest *new_box_autoadd_prepare_sweep_request_0(void); +struct wire_PrepareRefundRequest *new_box_autoadd_prepare_refund_request_0(void); struct wire_ReceiveOnchainRequest *new_box_autoadd_receive_onchain_request_0(void); struct wire_ReceivePaymentRequest *new_box_autoadd_receive_payment_request_0(void); +struct wire_RedeemOnchainFundsRequest *new_box_autoadd_redeem_onchain_funds_request_0(void); + struct wire_RefundRequest *new_box_autoadd_refund_request_0(void); struct wire_ReportIssueRequest *new_box_autoadd_report_issue_request_0(void); @@ -388,14 +402,14 @@ struct wire_SignMessageRequest *new_box_autoadd_sign_message_request_0(void); struct wire_StaticBackupRequest *new_box_autoadd_static_backup_request_0(void); -struct wire_SweepRequest *new_box_autoadd_sweep_request_0(void); - uint32_t *new_box_autoadd_u32_0(uint32_t value); uint64_t *new_box_autoadd_u64_0(uint64_t value); struct wire_list_payment_type_filter *new_list_payment_type_filter_0(int32_t len); +struct wire_list_tlv_entry *new_list_tlv_entry_0(int32_t len); + struct wire_uint_8_list *new_uint_8_list_0(int32_t len); union NodeConfigKind *inflate_NodeConfig_Greenlight(void); @@ -446,8 +460,8 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) wire_send_onchain); dummy_var ^= ((int64_t) (void*) wire_receive_onchain); dummy_var ^= ((int64_t) (void*) wire_buy_bitcoin); - dummy_var ^= ((int64_t) (void*) wire_sweep); - dummy_var ^= ((int64_t) (void*) wire_prepare_sweep); + dummy_var ^= ((int64_t) (void*) wire_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) wire_prepare_redeem_onchain_funds); dummy_var ^= ((int64_t) (void*) wire_list_refundables); dummy_var ^= ((int64_t) (void*) wire_prepare_refund); dummy_var ^= ((int64_t) (void*) wire_refund); @@ -471,10 +485,11 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) new_box_autoadd_node_config_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_open_channel_fee_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_opening_fee_params_0); + dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_redeem_onchain_funds_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_refund_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_sweep_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_receive_onchain_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_receive_payment_request_0); + dummy_var ^= ((int64_t) (void*) new_box_autoadd_redeem_onchain_funds_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_refund_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_report_issue_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_report_payment_failure_details_0); @@ -484,10 +499,10 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) new_box_autoadd_send_spontaneous_payment_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_sign_message_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_static_backup_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_sweep_request_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_u32_0); dummy_var ^= ((int64_t) (void*) new_box_autoadd_u64_0); dummy_var ^= ((int64_t) (void*) new_list_payment_type_filter_0); + dummy_var ^= ((int64_t) (void*) new_list_tlv_entry_0); dummy_var ^= ((int64_t) (void*) new_uint_8_list_0); dummy_var ^= ((int64_t) (void*) inflate_NodeConfig_Greenlight); dummy_var ^= ((int64_t) (void*) inflate_ReportIssueRequest_PaymentFailure); diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 47aaa8d62..f457ebf4a 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -16,7 +16,7 @@ dev: ios-dev android flutter_rust_bridge: cargo install flutter_rust_bridge_codegen --version 1.82.6 - flutter_rust_bridge_codegen + flutter_rust_bridge_codegen --dart-format-line-length 110 -r ../sdk-core/src/binding.rs -d lib/bridge_generated.dart -c ios/Classes/bridge_generated.h ios: $(SOURCES) flutter_rust_bridge make -C ../sdk-bindings bindings-swift diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 19fd10401..fd817b133 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -43,12 +43,3 @@ flutter: pluginClass: BreezSDKPlugin ios: pluginClass: BreezSDKPlugin - -flutter_rust_bridge: - rust_input: - - ../sdk-core/src/binding.rs - dart_output: - - lib/bridge_generated.dart - c-output: - - ios/Classes/bridge_generated.h - dart_format_line_length: 110