@breeztech/breez-sdk-spark-react-native 0.24.1 → 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/android/build.gradle +7 -1
- package/cpp/generated/breez_sdk_spark.cpp +50 -0
- package/cpp/generated/breez_sdk_spark.hpp +8 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +279 -87
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +278 -86
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +2 -0
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +1089 -246
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +2 -0
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +1089 -246
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +4 -4
- package/scripts/post-ubrn.js +29 -0
- package/src/generated/breez_sdk_spark-ffi.ts +5 -0
- package/src/generated/breez_sdk_spark.ts +1793 -305
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breeztech/breez-sdk-spark-react-native",
|
|
3
|
-
"version": "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": "
|
|
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": "
|
|
215
|
-
"ios": "
|
|
214
|
+
"android": "447b05834ee7e103a8ae715c405d48eed8a1cc17f8150261b79603f9732ed2be",
|
|
215
|
+
"ios": "3dbc3592285316b31fa7521b8f4e8a92152f11b9e3ac071e7a7f6acc395865c6"
|
|
216
216
|
}
|
|
217
217
|
}
|
package/scripts/post-ubrn.js
CHANGED
|
@@ -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;
|