@breeztech/breez-sdk-spark-react-native 0.11.0-dev2 → 0.11.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.
Files changed (42) hide show
  1. package/README.md +16 -0
  2. package/android/CMakeLists.txt +4 -3
  3. package/{BreezSdkSparkReactNative.podspec → breeztech-breez-sdk-spark-react-native.podspec} +2 -2
  4. package/cpp/generated/breez_sdk_spark.cpp +1464 -539
  5. package/cpp/generated/breez_sdk_spark.hpp +96 -25
  6. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  7. package/lib/commonjs/generated/breez_sdk_spark.js +314 -85
  8. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  9. package/lib/commonjs/generated/breez_sdk_spark_bindings.js +2 -4
  10. package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
  11. package/lib/commonjs/index.js +1 -11
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  14. package/lib/module/generated/breez_sdk_spark.js +313 -84
  15. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  16. package/lib/module/generated/breez_sdk_spark_bindings.js +2 -4
  17. package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
  18. package/lib/module/index.js +0 -7
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
  21. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  22. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +1446 -91
  23. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  24. package/lib/typescript/commonjs/src/index.d.ts +0 -1
  25. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  26. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
  27. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  28. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +1446 -91
  29. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  30. package/lib/typescript/module/src/index.d.ts +0 -1
  31. package/lib/typescript/module/src/index.d.ts.map +1 -1
  32. package/package.json +4 -4
  33. package/plugin/build/index.d.ts +5 -0
  34. package/plugin/build/index.js +2 -2
  35. package/plugin/build/withBinaryArtifacts.d.ts +1 -1
  36. package/plugin/build/withBinaryArtifacts.js +5 -7
  37. package/plugin/build/withIOS.d.ts +5 -1
  38. package/plugin/build/withIOS.js +14 -4
  39. package/src/generated/breez_sdk_spark-ffi.ts +158 -82
  40. package/src/generated/breez_sdk_spark.ts +3008 -1245
  41. package/src/generated/breez_sdk_spark_bindings.ts +2 -2
  42. 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;AAejF,wBAAsB,eAAe,kBAEpC;;;;;AAGD,wBAGE"}
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.11.0-dev2",
3
+ "version": "0.11.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",
@@ -83,7 +83,7 @@
83
83
  "registry": "https://registry.npmjs.org/"
84
84
  },
85
85
  "dependencies": {
86
- "uniffi-bindgen-react-native": "^0.29.3-1"
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": "b2fb4497ed2500c489277bf2be97271671724eea6e68f1051b78feb2627dd0a2",
201
- "ios": "900599ff9ed957cd68a82f0cd257f046ae7890d75a6ba493d0527e3952e586c8"
200
+ "android": "12e8c7330845372cab3e92467e2dd119c0a671f1c9210b3cc64a0a96817f852a",
201
+ "ios": "5dae2860ef281cb77e08dc221a4dcb33add48034ec136c87d8bf3d7407bb459a"
202
202
  }
203
203
  }
@@ -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;
@@ -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);
@@ -1,4 +1,4 @@
1
- import type { ConfigPlugin } from '@expo/config-plugins';
1
+ import { type ConfigPlugin } from '@expo/config-plugins';
2
2
  /**
3
3
  * Downloads prebuilt binary artifacts for Android and iOS
4
4
  * This runs during expo prebuild to ensure binaries are available
@@ -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
- await downloadBinaryArtifacts();
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
- async function downloadBinaryArtifacts() {
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 {};
@@ -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
- // Currently no additional iOS configuration needed
10
- // The podspec handles minimum version and framework linking
11
- return config;
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;