@breeztech/breez-sdk-spark-react-native 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark-react-native",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "React Native bindings for the Breez SDK - Nodeless (Spark Implementation)",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -97,7 +97,7 @@
97
97
  "registry": "https://registry.npmjs.org/"
98
98
  },
99
99
  "dependencies": {
100
- "uniffi-bindgen-react-native": "^0.29.3-1"
100
+ "uniffi-bindgen-react-native": "git+https://github.com/breez/uniffi-bindgen-react-native.git#309bc8fa7fc56d4358dc75a78135a54d8225786b"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@commitlint/config-conventional": "^17.0.2",
@@ -211,7 +211,7 @@
211
211
  "version": "0.49.0"
212
212
  },
213
213
  "checksums": {
214
- "android": "bd7873a3e78068643d2bf6528e4b592aa5a9dfdb4baed91370b1149ce27caac0",
215
- "ios": "957bd08d92434449b9e6274b423467880901537b54a10b595b6976500bcc6897"
214
+ "android": "447b05834ee7e103a8ae715c405d48eed8a1cc17f8150261b79603f9732ed2be",
215
+ "ios": "3dbc3592285316b31fa7521b8f4e8a92152f11b9e3ac071e7a7f6acc395865c6"
216
216
  }
217
217
  }
@@ -15,6 +15,9 @@
15
15
  * those hand-written files (which live under
16
16
  * `android/src/main/kotlin/...` to survive `yarn ubrn:clean`)
17
17
  * are actually compiled
18
+ * - guard `apply plugin: "kotlin-android"` so it is skipped when AGP
19
+ * has already registered the `kotlin` extension (AGP 9+ built-in
20
+ * Kotlin), which otherwise fails configuration
18
21
  *
19
22
  * 2. android/src/main/java/.../BreezSdkSparkReactNativePackage.kt
20
23
  * - register BreezSdkSparkPasskeyModule alongside the generated
@@ -137,6 +140,32 @@ patchFile(
137
140
  }
138
141
  );
139
142
 
143
+ patchFile(
144
+ 'android/build.gradle',
145
+ 'AGP 9 built-in Kotlin guard',
146
+ (content, label, relPath) => {
147
+ if (content.includes("project.extensions.findByName('kotlin')")) {
148
+ return content;
149
+ }
150
+ // Anchored on both applies, not just the Kotlin one: the guard is only
151
+ // correct after AGP has registered its extensions, so a reordering
152
+ // upstream must fail here rather than inject it where findByName always
153
+ // returns null.
154
+ const anchor = `apply plugin: "com.android.library"
155
+ apply plugin: "kotlin-android"`;
156
+ requireAnchor(content, anchor, label, relPath);
157
+ const injected = `apply plugin: "com.android.library"
158
+ // AGP 9 ships built-in Kotlin support and registers the \`kotlin\` extension
159
+ // itself. Applying the Kotlin plugin on top of it fails configuration with
160
+ // "Cannot add extension with name 'kotlin'". Only apply it when nothing has
161
+ // registered that extension yet.
162
+ if (project.extensions.findByName('kotlin') == null) {
163
+ apply plugin: "kotlin-android"
164
+ }`;
165
+ return content.replace(anchor, injected);
166
+ }
167
+ );
168
+
140
169
  // ---------------------------------------------------------------------------
141
170
  // 2. android/src/main/java/.../BreezSdkSparkReactNativePackage.kt
142
171
  // ---------------------------------------------------------------------------
@@ -109,6 +109,10 @@ interface NativeModuleInterface {
109
109
  ptr: bigint,
110
110
  request: Uint8Array
111
111
  ): bigint;
112
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_exit(
113
+ ptr: bigint,
114
+ request: Uint8Array
115
+ ): bigint;
112
116
  ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
113
117
  ptr: bigint,
114
118
  request: Uint8Array
@@ -1144,6 +1148,7 @@ interface NativeModuleInterface {
1144
1148
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin(): number;
1145
1149
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available(): number;
1146
1150
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message(): number;
1151
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_exit(): number;
1147
1152
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit(): number;
1148
1153
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment(): number;
1149
1154
  ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_lightning_address_transfer(): number;