@breeztech/breez-sdk-spark-react-native 0.11.0-dev2 → 0.12.1
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/README.md +16 -0
- package/android/CMakeLists.txt +4 -3
- package/{BreezSdkSparkReactNative.podspec → breeztech-breez-sdk-spark-react-native.podspec} +2 -2
- package/cpp/generated/breez_sdk_spark.cpp +1460 -536
- package/cpp/generated/breez_sdk_spark.hpp +94 -25
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +314 -85
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js +2 -4
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/commonjs/index.js +1 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +313 -84
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark_bindings.js +2 -4
- package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/module/index.js +0 -7
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
- 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 +1446 -91
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
- 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 +1446 -91
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/plugin/build/index.d.ts +5 -0
- package/plugin/build/index.js +2 -2
- package/plugin/build/withBinaryArtifacts.d.ts +1 -1
- package/plugin/build/withBinaryArtifacts.js +5 -7
- package/plugin/build/withIOS.d.ts +5 -1
- package/plugin/build/withIOS.js +14 -4
- package/src/generated/breez_sdk_spark-ffi.ts +158 -82
- package/src/generated/breez_sdk_spark.ts +3012 -1249
- package/src/generated/breez_sdk_spark_bindings.ts +2 -2
- package/src/index.tsx +0 -7
|
@@ -2,7 +2,6 @@ export * from './generated/breez_sdk_spark';
|
|
|
2
2
|
export * from './generated/breez_sdk_spark_bindings';
|
|
3
3
|
import * as breez_sdk_spark from './generated/breez_sdk_spark';
|
|
4
4
|
import * as breez_sdk_spark_bindings from './generated/breez_sdk_spark_bindings';
|
|
5
|
-
export declare function uniffiInitAsync(): Promise<void>;
|
|
6
5
|
declare const _default: {
|
|
7
6
|
breez_sdk_spark: typeof breez_sdk_spark;
|
|
8
7
|
breez_sdk_spark_bindings: typeof breez_sdk_spark_bindings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AAKrD,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,wBAAwB,MAAM,sCAAsC,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAaA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AAKrD,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,wBAAwB,MAAM,sCAAsC,CAAC;;;;;AAajF,wBAGE"}
|
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.12.1",
|
|
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",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"registry": "https://registry.npmjs.org/"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"uniffi-bindgen-react-native": "^0.
|
|
86
|
+
"uniffi-bindgen-react-native": "^0.28.3-5"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@commitlint/config-conventional": "^17.0.2",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"version": "0.49.0"
|
|
198
198
|
},
|
|
199
199
|
"checksums": {
|
|
200
|
-
"android": "
|
|
201
|
-
"ios": "
|
|
200
|
+
"android": "fa6b4309229f0e3858a2883fe85ff4b999618c291faea03ccb7556dacb9e3382",
|
|
201
|
+
"ios": "ae93da62ef9596953320cdbcb6ebf2f41180fcdc96b4d532c9075c2933a3388f"
|
|
202
202
|
}
|
|
203
203
|
}
|
package/plugin/build/index.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export type BreezSdkPluginOptions = {
|
|
|
5
5
|
* Set to true if you want to handle binary downloads manually
|
|
6
6
|
*/
|
|
7
7
|
skipBinaryDownload?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Add webcredentials:keys.breez.technology to the iOS Associated Domains
|
|
10
|
+
* entitlement, required for passkey-based seed derivation (default: false)
|
|
11
|
+
*/
|
|
12
|
+
enablePasskey?: boolean;
|
|
8
13
|
};
|
|
9
14
|
declare const _default: ConfigPlugin<void | BreezSdkPluginOptions>;
|
|
10
15
|
export default _default;
|
package/plugin/build/index.js
CHANGED
|
@@ -6,14 +6,14 @@ const withAndroid_1 = require("./withAndroid");
|
|
|
6
6
|
const withIOS_1 = require("./withIOS");
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
8
|
const withBreezSdk = (config, options) => {
|
|
9
|
-
const { skipBinaryDownload = false } = options || {};
|
|
9
|
+
const { skipBinaryDownload = false, enablePasskey = false } = options || {};
|
|
10
10
|
return (0, config_plugins_1.withPlugins)(config, [
|
|
11
11
|
// Download binary artifacts first
|
|
12
12
|
...(skipBinaryDownload ? [] : [withBinaryArtifacts_1.withBinaryArtifacts]),
|
|
13
13
|
// Configure Android
|
|
14
14
|
withAndroid_1.withBreezSdkAndroid,
|
|
15
15
|
// Configure iOS
|
|
16
|
-
withIOS_1.withBreezSdkIOS,
|
|
16
|
+
[withIOS_1.withBreezSdkIOS, { enablePasskey }],
|
|
17
17
|
]);
|
|
18
18
|
};
|
|
19
19
|
exports.default = (0, config_plugins_1.createRunOncePlugin)(withBreezSdk, utils_1.sdkPackage.name, utils_1.sdkPackage.version);
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.withBinaryArtifacts = void 0;
|
|
37
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
37
38
|
const path = __importStar(require("path"));
|
|
38
39
|
const fs = __importStar(require("fs"));
|
|
39
40
|
const child_process_1 = require("child_process");
|
|
@@ -42,22 +43,19 @@ const child_process_1 = require("child_process");
|
|
|
42
43
|
* This runs during expo prebuild to ensure binaries are available
|
|
43
44
|
*/
|
|
44
45
|
const withBinaryArtifacts = (config) => {
|
|
45
|
-
return {
|
|
46
|
-
...config,
|
|
47
|
-
async prebuildAsync(config) {
|
|
46
|
+
return (0, config_plugins_1.withDangerousMod)(config, ['android', (config) => {
|
|
48
47
|
try {
|
|
49
|
-
|
|
48
|
+
downloadBinaryArtifacts();
|
|
50
49
|
}
|
|
51
50
|
catch (error) {
|
|
52
51
|
console.warn('Failed to download Breez SDK binary artifacts:', error);
|
|
53
52
|
console.warn('You may need to run the postinstall script manually or check your network connection.');
|
|
54
53
|
}
|
|
55
54
|
return config;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
55
|
+
}]);
|
|
58
56
|
};
|
|
59
57
|
exports.withBinaryArtifacts = withBinaryArtifacts;
|
|
60
|
-
|
|
58
|
+
function downloadBinaryArtifacts() {
|
|
61
59
|
const packageRoot = findPackageRoot();
|
|
62
60
|
if (!packageRoot) {
|
|
63
61
|
throw new Error('Could not find @breeztech/breez-sdk-spark-react-native package');
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
type WithIOSOptions = {
|
|
3
|
+
enablePasskey: boolean;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
6
|
* Configure iOS build settings for Breez SDK
|
|
4
7
|
* The podspec already defines the minimum iOS version via min_ios_version_supported
|
|
5
8
|
*/
|
|
6
|
-
export declare const withBreezSdkIOS: ConfigPlugin
|
|
9
|
+
export declare const withBreezSdkIOS: ConfigPlugin<WithIOSOptions>;
|
|
10
|
+
export {};
|
package/plugin/build/withIOS.js
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withBreezSdkIOS = void 0;
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
5
|
/**
|
|
5
6
|
* Configure iOS build settings for Breez SDK
|
|
6
7
|
* The podspec already defines the minimum iOS version via min_ios_version_supported
|
|
7
8
|
*/
|
|
8
|
-
const withBreezSdkIOS = (config) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const withBreezSdkIOS = (config, { enablePasskey }) => {
|
|
10
|
+
if (!enablePasskey) {
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
13
|
+
return (0, config_plugins_1.withEntitlementsPlist)(config, (config) => {
|
|
14
|
+
const domain = 'webcredentials:keys.breez.technology';
|
|
15
|
+
const domains = config.modResults['com.apple.developer.associated-domains'] ?? [];
|
|
16
|
+
if (!domains.includes(domain)) {
|
|
17
|
+
domains.push(domain);
|
|
18
|
+
}
|
|
19
|
+
config.modResults['com.apple.developer.associated-domains'] = domains;
|
|
20
|
+
return config;
|
|
21
|
+
});
|
|
12
22
|
};
|
|
13
23
|
exports.withBreezSdkIOS = withBreezSdkIOS;
|