@onekeyfe/react-native-check-biometric-auth-changed 0.1.2

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 (47) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +39 -0
  3. package/ReactNativeCheckBiometricAuthChanged.podspec +29 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +128 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/ReactNativeCheckBiometricAuthChanged.kt +12 -0
  10. package/android/src/main/java/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/ReactNativeCheckBiometricAuthChangedPackage.kt +22 -0
  11. package/ios/ReactNativeCheckBiometricAuthChanged.swift +22 -0
  12. package/lib/module/ReactNativeCheckBiometricAuthChanged.nitro.js +4 -0
  13. package/lib/module/ReactNativeCheckBiometricAuthChanged.nitro.js.map +1 -0
  14. package/lib/module/index.js +8 -0
  15. package/lib/module/index.js.map +1 -0
  16. package/lib/module/package.json +1 -0
  17. package/lib/typescript/package.json +1 -0
  18. package/lib/typescript/src/ReactNativeCheckBiometricAuthChanged.nitro.d.ts +8 -0
  19. package/lib/typescript/src/ReactNativeCheckBiometricAuthChanged.nitro.d.ts.map +1 -0
  20. package/lib/typescript/src/index.d.ts +2 -0
  21. package/lib/typescript/src/index.d.ts.map +1 -0
  22. package/nitro.json +17 -0
  23. package/nitrogen/generated/android/c++/JHybridReactNativeCheckBiometricAuthChangedSpec.cpp +64 -0
  24. package/nitrogen/generated/android/c++/JHybridReactNativeCheckBiometricAuthChangedSpec.hpp +65 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/HybridReactNativeCheckBiometricAuthChangedSpec.kt +58 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyfe/reactnativecheckbiometricauthchanged/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.kt +35 -0
  27. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.cmake +81 -0
  28. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchanged+autolinking.gradle +27 -0
  29. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.cpp +44 -0
  30. package/nitrogen/generated/android/onekeyfe_reactnativecheckbiometricauthchangedOnLoad.hpp +25 -0
  31. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged+autolinking.rb +60 -0
  32. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.cpp +49 -0
  33. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp +110 -0
  34. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Umbrella.hpp +44 -0
  35. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChangedAutolinking.mm +33 -0
  36. package/nitrogen/generated/ios/ReactNativeCheckBiometricAuthChangedAutolinking.swift +25 -0
  37. package/nitrogen/generated/ios/c++/HybridReactNativeCheckBiometricAuthChangedSpecSwift.cpp +11 -0
  38. package/nitrogen/generated/ios/c++/HybridReactNativeCheckBiometricAuthChangedSpecSwift.hpp +76 -0
  39. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  40. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  41. package/nitrogen/generated/ios/swift/HybridReactNativeCheckBiometricAuthChangedSpec.swift +56 -0
  42. package/nitrogen/generated/ios/swift/HybridReactNativeCheckBiometricAuthChangedSpec_cxx.swift +138 -0
  43. package/nitrogen/generated/shared/c++/HybridReactNativeCheckBiometricAuthChangedSpec.cpp +21 -0
  44. package/nitrogen/generated/shared/c++/HybridReactNativeCheckBiometricAuthChangedSpec.hpp +62 -0
  45. package/package.json +173 -0
  46. package/src/ReactNativeCheckBiometricAuthChanged.nitro.ts +6 -0
  47. package/src/index.tsx +11 -0
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// Func_void_std__exception_ptr.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * Wraps a Swift `(_ error: Error) -> Void` as a class.
13
+ * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
14
+ */
15
+ public final class Func_void_std__exception_ptr {
16
+ public typealias bridge = margelo.nitro.onekeyfe_reactnativecheckbiometricauthchanged.bridge.swift
17
+
18
+ private let closure: (_ error: Error) -> Void
19
+
20
+ public init(_ closure: @escaping (_ error: Error) -> Void) {
21
+ self.closure = closure
22
+ }
23
+
24
+ @inline(__always)
25
+ public func call(error: std.exception_ptr) -> Void {
26
+ self.closure(RuntimeError.from(cppError: error))
27
+ }
28
+
29
+ /**
30
+ * Casts this instance to a retained unsafe raw pointer.
31
+ * This acquires one additional strong reference on the object!
32
+ */
33
+ @inline(__always)
34
+ public func toUnsafe() -> UnsafeMutableRawPointer {
35
+ return Unmanaged.passRetained(self).toOpaque()
36
+ }
37
+
38
+ /**
39
+ * Casts an unsafe pointer to a `Func_void_std__exception_ptr`.
40
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_std__exception_ptr>`.
41
+ * This removes one strong reference from the object!
42
+ */
43
+ @inline(__always)
44
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__exception_ptr {
45
+ return Unmanaged<Func_void_std__exception_ptr>.fromOpaque(pointer).takeRetainedValue()
46
+ }
47
+ }
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpec.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+
11
+ /// See ``HybridReactNativeCheckBiometricAuthChangedSpec``
12
+ public protocol HybridReactNativeCheckBiometricAuthChangedSpec_protocol: HybridObject {
13
+ // Properties
14
+
15
+
16
+ // Methods
17
+ func checkChanged() throws -> Promise<Bool>
18
+ }
19
+
20
+ public extension HybridReactNativeCheckBiometricAuthChangedSpec_protocol {
21
+ /// Default implementation of ``HybridObject.toString``
22
+ func toString() -> String {
23
+ return "[HybridObject ReactNativeCheckBiometricAuthChanged]"
24
+ }
25
+ }
26
+
27
+ /// See ``HybridReactNativeCheckBiometricAuthChangedSpec``
28
+ open class HybridReactNativeCheckBiometricAuthChangedSpec_base {
29
+ private weak var cxxWrapper: HybridReactNativeCheckBiometricAuthChangedSpec_cxx? = nil
30
+ public init() { }
31
+ public func getCxxWrapper() -> HybridReactNativeCheckBiometricAuthChangedSpec_cxx {
32
+ #if DEBUG
33
+ guard self is HybridReactNativeCheckBiometricAuthChangedSpec else {
34
+ fatalError("`self` is not a `HybridReactNativeCheckBiometricAuthChangedSpec`! Did you accidentally inherit from `HybridReactNativeCheckBiometricAuthChangedSpec_base` instead of `HybridReactNativeCheckBiometricAuthChangedSpec`?")
35
+ }
36
+ #endif
37
+ if let cxxWrapper = self.cxxWrapper {
38
+ return cxxWrapper
39
+ } else {
40
+ let cxxWrapper = HybridReactNativeCheckBiometricAuthChangedSpec_cxx(self as! HybridReactNativeCheckBiometricAuthChangedSpec)
41
+ self.cxxWrapper = cxxWrapper
42
+ return cxxWrapper
43
+ }
44
+ }
45
+ }
46
+
47
+ /**
48
+ * A Swift base-protocol representing the ReactNativeCheckBiometricAuthChanged HybridObject.
49
+ * Implement this protocol to create Swift-based instances of ReactNativeCheckBiometricAuthChanged.
50
+ * ```swift
51
+ * class HybridReactNativeCheckBiometricAuthChanged : HybridReactNativeCheckBiometricAuthChangedSpec {
52
+ * // ...
53
+ * }
54
+ * ```
55
+ */
56
+ public typealias HybridReactNativeCheckBiometricAuthChangedSpec = HybridReactNativeCheckBiometricAuthChangedSpec_protocol & HybridReactNativeCheckBiometricAuthChangedSpec_base
@@ -0,0 +1,138 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpec_cxx.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * A class implementation that bridges HybridReactNativeCheckBiometricAuthChangedSpec over to C++.
13
+ * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
14
+ *
15
+ * Also, some Swift types need to be bridged with special handling:
16
+ * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
17
+ * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
18
+ * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
19
+ */
20
+ open class HybridReactNativeCheckBiometricAuthChangedSpec_cxx {
21
+ /**
22
+ * The Swift <> C++ bridge's namespace (`margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged::bridge::swift`)
23
+ * from `ReactNativeCheckBiometricAuthChanged-Swift-Cxx-Bridge.hpp`.
24
+ * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
25
+ */
26
+ public typealias bridge = margelo.nitro.onekeyfe_reactnativecheckbiometricauthchanged.bridge.swift
27
+
28
+ /**
29
+ * Holds an instance of the `HybridReactNativeCheckBiometricAuthChangedSpec` Swift protocol.
30
+ */
31
+ private var __implementation: any HybridReactNativeCheckBiometricAuthChangedSpec
32
+
33
+ /**
34
+ * Holds a weak pointer to the C++ class that wraps the Swift class.
35
+ */
36
+ private var __cxxPart: bridge.std__weak_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_
37
+
38
+ /**
39
+ * Create a new `HybridReactNativeCheckBiometricAuthChangedSpec_cxx` that wraps the given `HybridReactNativeCheckBiometricAuthChangedSpec`.
40
+ * All properties and methods bridge to C++ types.
41
+ */
42
+ public init(_ implementation: any HybridReactNativeCheckBiometricAuthChangedSpec) {
43
+ self.__implementation = implementation
44
+ self.__cxxPart = .init()
45
+ /* no base class */
46
+ }
47
+
48
+ /**
49
+ * Get the actual `HybridReactNativeCheckBiometricAuthChangedSpec` instance this class wraps.
50
+ */
51
+ @inline(__always)
52
+ public func getHybridReactNativeCheckBiometricAuthChangedSpec() -> any HybridReactNativeCheckBiometricAuthChangedSpec {
53
+ return __implementation
54
+ }
55
+
56
+ /**
57
+ * Casts this instance to a retained unsafe raw pointer.
58
+ * This acquires one additional strong reference on the object!
59
+ */
60
+ public func toUnsafe() -> UnsafeMutableRawPointer {
61
+ return Unmanaged.passRetained(self).toOpaque()
62
+ }
63
+
64
+ /**
65
+ * Casts an unsafe pointer to a `HybridReactNativeCheckBiometricAuthChangedSpec_cxx`.
66
+ * The pointer has to be a retained opaque `Unmanaged<HybridReactNativeCheckBiometricAuthChangedSpec_cxx>`.
67
+ * This removes one strong reference from the object!
68
+ */
69
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridReactNativeCheckBiometricAuthChangedSpec_cxx {
70
+ return Unmanaged<HybridReactNativeCheckBiometricAuthChangedSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
71
+ }
72
+
73
+ /**
74
+ * Gets (or creates) the C++ part of this Hybrid Object.
75
+ * The C++ part is a `std::shared_ptr<HybridReactNativeCheckBiometricAuthChangedSpec>`.
76
+ */
77
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_ {
78
+ let cachedCxxPart = self.__cxxPart.lock()
79
+ if Bool(fromCxx: cachedCxxPart) {
80
+ return cachedCxxPart
81
+ } else {
82
+ let newCxxPart = bridge.create_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(self.toUnsafe())
83
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridReactNativeCheckBiometricAuthChangedSpec_(newCxxPart)
84
+ return newCxxPart
85
+ }
86
+ }
87
+
88
+
89
+
90
+ /**
91
+ * Get the memory size of the Swift class (plus size of any other allocations)
92
+ * so the JS VM can properly track it and garbage-collect the JS object if needed.
93
+ */
94
+ @inline(__always)
95
+ public var memorySize: Int {
96
+ return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
+ }
98
+
99
+ /**
100
+ * Call dispose() on the Swift class.
101
+ * This _may_ be called manually from JS.
102
+ */
103
+ @inline(__always)
104
+ public func dispose() {
105
+ self.__implementation.dispose()
106
+ }
107
+
108
+ /**
109
+ * Call toString() on the Swift class.
110
+ */
111
+ @inline(__always)
112
+ public func toString() -> String {
113
+ return self.__implementation.toString()
114
+ }
115
+
116
+ // Properties
117
+
118
+
119
+ // Methods
120
+ @inline(__always)
121
+ public final func checkChanged() -> bridge.Result_std__shared_ptr_Promise_bool___ {
122
+ do {
123
+ let __result = try self.__implementation.checkChanged()
124
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
125
+ let __promise = bridge.create_std__shared_ptr_Promise_bool__()
126
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
127
+ __result
128
+ .then({ __result in __promiseHolder.resolve(__result) })
129
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
130
+ return __promise
131
+ }()
132
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__resultCpp)
133
+ } catch (let __error) {
134
+ let __exceptionPtr = __error.toCpp()
135
+ return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,21 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpec.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridReactNativeCheckBiometricAuthChangedSpec.hpp"
9
+
10
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
11
+
12
+ void HybridReactNativeCheckBiometricAuthChangedSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridMethod("checkChanged", &HybridReactNativeCheckBiometricAuthChangedSpec::checkChanged);
18
+ });
19
+ }
20
+
21
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
@@ -0,0 +1,62 @@
1
+ ///
2
+ /// HybridReactNativeCheckBiometricAuthChangedSpec.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+
17
+
18
+ #include <NitroModules/Promise.hpp>
19
+
20
+ namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged {
21
+
22
+ using namespace margelo::nitro;
23
+
24
+ /**
25
+ * An abstract base class for `ReactNativeCheckBiometricAuthChanged`
26
+ * Inherit this class to create instances of `HybridReactNativeCheckBiometricAuthChangedSpec` in C++.
27
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
28
+ * @example
29
+ * ```cpp
30
+ * class HybridReactNativeCheckBiometricAuthChanged: public HybridReactNativeCheckBiometricAuthChangedSpec {
31
+ * public:
32
+ * HybridReactNativeCheckBiometricAuthChanged(...): HybridObject(TAG) { ... }
33
+ * // ...
34
+ * };
35
+ * ```
36
+ */
37
+ class HybridReactNativeCheckBiometricAuthChangedSpec: public virtual HybridObject {
38
+ public:
39
+ // Constructor
40
+ explicit HybridReactNativeCheckBiometricAuthChangedSpec(): HybridObject(TAG) { }
41
+
42
+ // Destructor
43
+ ~HybridReactNativeCheckBiometricAuthChangedSpec() override = default;
44
+
45
+ public:
46
+ // Properties
47
+
48
+
49
+ public:
50
+ // Methods
51
+ virtual std::shared_ptr<Promise<bool>> checkChanged() = 0;
52
+
53
+ protected:
54
+ // Hybrid Setup
55
+ void loadHybridMethods() override;
56
+
57
+ protected:
58
+ // Tag for logging
59
+ static constexpr auto TAG = "ReactNativeCheckBiometricAuthChanged";
60
+ };
61
+
62
+ } // namespace margelo::nitro::onekeyfe_reactnativecheckbiometricauthchanged
package/package.json ADDED
@@ -0,0 +1,173 @@
1
+ {
2
+ "name": "@onekeyfe/react-native-check-biometric-auth-changed",
3
+ "version": "0.1.2",
4
+ "description": "react-native-check-biometric-auth-changed",
5
+ "workspaces": [
6
+ "example"
7
+ ],
8
+ "main": "./lib/module/index.js",
9
+ "types": "./lib/typescript/src/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "source": "./src/index.tsx",
13
+ "types": "./lib/typescript/src/index.d.ts",
14
+ "default": "./lib/module/index.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "src",
20
+ "lib",
21
+ "android",
22
+ "ios",
23
+ "cpp",
24
+ "nitrogen",
25
+ "nitro.json",
26
+ "*.podspec",
27
+ "react-native.config.js",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!**/__tests__",
35
+ "!**/__fixtures__",
36
+ "!**/__mocks__",
37
+ "!**/.*"
38
+ ],
39
+ "scripts": {
40
+ "example": "yarn workspace @onekeyfe/react-native-check-biometric-auth-changed-example",
41
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
42
+ "prepare": "bob build",
43
+ "nitrogen": "nitrogen",
44
+ "typecheck": "tsc",
45
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
46
+ "test": "jest",
47
+ "release": "yarn nitrogen && yarn prepare && npm whoami && npm publish --access public"
48
+ },
49
+ "keywords": [
50
+ "react-native",
51
+ "ios",
52
+ "android"
53
+ ],
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/OneKeyHQ/app-modules/react-native-check-biometric-auth-changed/onekeyfe-react-native-check-biometric-auth-changed.git"
57
+ },
58
+ "author": "@onekeyfeonekeyfe <huanming@onekey.so> (https://github.com/OneKeyHQ/app-modules/react-native-check-biometric-auth-changed)",
59
+ "license": "MIT",
60
+ "bugs": {
61
+ "url": "https://github.com/OneKeyHQ/app-modules/react-native-check-biometric-auth-changed/onekeyfe-react-native-check-biometric-auth-changed/issues"
62
+ },
63
+ "homepage": "https://github.com/OneKeyHQ/app-modules/react-native-check-biometric-auth-changed/onekeyfe-react-native-check-biometric-auth-changed#readme",
64
+ "publishConfig": {
65
+ "registry": "https://registry.npmjs.org/"
66
+ },
67
+ "devDependencies": {
68
+ "@commitlint/config-conventional": "^19.8.1",
69
+ "@eslint/compat": "^1.3.2",
70
+ "@eslint/eslintrc": "^3.3.1",
71
+ "@eslint/js": "^9.35.0",
72
+ "@react-native/babel-preset": "0.83.0",
73
+ "@react-native/eslint-config": "0.83.0",
74
+ "@release-it/conventional-changelog": "^10.0.1",
75
+ "@types/jest": "^29.5.14",
76
+ "@types/react": "^19.2.0",
77
+ "commitlint": "^19.8.1",
78
+ "del-cli": "^6.0.0",
79
+ "eslint": "^9.35.0",
80
+ "eslint-config-prettier": "^10.1.8",
81
+ "eslint-plugin-prettier": "^5.5.4",
82
+ "jest": "^29.7.0",
83
+ "lefthook": "^2.0.3",
84
+ "nitrogen": "^0.31.10",
85
+ "prettier": "^2.8.8",
86
+ "react": "19.2.0",
87
+ "react-native": "0.83.0",
88
+ "react-native-builder-bob": "^0.40.13",
89
+ "react-native-nitro-modules": "^0.31.10",
90
+ "release-it": "^19.0.4",
91
+ "turbo": "^2.5.6",
92
+ "typescript": "^5.9.2"
93
+ },
94
+ "peerDependencies": {
95
+ "react": "*",
96
+ "react-native": "*",
97
+ "react-native-nitro-modules": "^0.31.10"
98
+ },
99
+ "react-native-builder-bob": {
100
+ "source": "src",
101
+ "output": "lib",
102
+ "targets": [
103
+ [
104
+ "custom",
105
+ {
106
+ "script": "nitrogen",
107
+ "clean": "nitrogen/"
108
+ }
109
+ ],
110
+ [
111
+ "module",
112
+ {
113
+ "esm": true
114
+ }
115
+ ],
116
+ [
117
+ "typescript",
118
+ {
119
+ "project": "tsconfig.build.json"
120
+ }
121
+ ]
122
+ ]
123
+ },
124
+ "prettier": {
125
+ "quoteProps": "consistent",
126
+ "singleQuote": true,
127
+ "tabWidth": 2,
128
+ "trailingComma": "es5",
129
+ "useTabs": false
130
+ },
131
+ "jest": {
132
+ "preset": "react-native",
133
+ "modulePathIgnorePatterns": [
134
+ "<rootDir>/example/node_modules",
135
+ "<rootDir>/lib/"
136
+ ]
137
+ },
138
+ "commitlint": {
139
+ "extends": [
140
+ "@commitlint/config-conventional"
141
+ ]
142
+ },
143
+ "release-it": {
144
+ "git": {
145
+ "commitMessage": "chore: release ${version}",
146
+ "tagName": "v${version}"
147
+ },
148
+ "npm": {
149
+ "publish": true
150
+ },
151
+ "github": {
152
+ "release": true
153
+ },
154
+ "plugins": {
155
+ "@release-it/conventional-changelog": {
156
+ "preset": {
157
+ "name": "angular"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "create-react-native-library": {
163
+ "type": "nitro-module",
164
+ "languages": "kotlin-swift",
165
+ "tools": [
166
+ "eslint",
167
+ "jest",
168
+ "lefthook",
169
+ "release-it"
170
+ ],
171
+ "version": "0.56.0"
172
+ }
173
+ }
@@ -0,0 +1,6 @@
1
+ import type { HybridObject } from 'react-native-nitro-modules';
2
+
3
+ export interface ReactNativeCheckBiometricAuthChanged
4
+ extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
5
+ checkChanged(): Promise<boolean>;
6
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,11 @@
1
+ import { NitroModules } from 'react-native-nitro-modules';
2
+ import type { ReactNativeCheckBiometricAuthChanged } from './ReactNativeCheckBiometricAuthChanged.nitro';
3
+
4
+ const ReactNativeCheckBiometricAuthChangedHybridObject =
5
+ NitroModules.createHybridObject<ReactNativeCheckBiometricAuthChanged>(
6
+ 'ReactNativeCheckBiometricAuthChanged'
7
+ );
8
+
9
+ export function checkBiometricAuthChanged(): Promise<boolean> {
10
+ return ReactNativeCheckBiometricAuthChangedHybridObject.checkChanged();
11
+ }