@thenovaweb/druid-ogold-rn-sdk 0.0.6 → 0.0.8
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 +95 -22
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,57 +1,130 @@
|
|
|
1
1
|
### `druid-ogold-rn-sdk`
|
|
2
2
|
|
|
3
|
-
Druid is a
|
|
3
|
+
Druid is a React Native package that enables clients to conduct **KYC** against their customers for easy onboarding and well-informed decision making.
|
|
4
4
|
|
|
5
|
-
The simplified process flow makes it a smooth experience
|
|
5
|
+
The simplified process flow makes it a smooth experience for end-users (customers).
|
|
6
|
+
|
|
7
|
+
---
|
|
6
8
|
|
|
7
9
|
### Existing Features
|
|
8
10
|
|
|
9
11
|
The version `0.0.x` has the following feature support:
|
|
10
12
|
|
|
11
|
-
| Feature | Description
|
|
12
|
-
| ----------------------- |
|
|
13
|
-
| Face Liveness Detection | Detects spoof, deepfake and malicious
|
|
14
|
-
| AI-Based OCR | Allows automated form filling with OCR
|
|
15
|
-
| ID Verification | Compares the image in the ID vs the live face
|
|
13
|
+
| Feature | Description |
|
|
14
|
+
| ----------------------- | --------------------------------------------------------------------------- |
|
|
15
|
+
| Face Liveness Detection | Detects spoof, deepfake, and malicious attempts, providing instant results. |
|
|
16
|
+
| AI-Based OCR | Allows automated form filling with OCR |
|
|
17
|
+
| ID Verification | Compares the image in the ID vs the live face |
|
|
16
18
|
|
|
17
19
|
#### Upcoming Features:
|
|
18
20
|
|
|
19
|
-
`
|
|
21
|
+
`v0.1.x`
|
|
20
22
|
|
|
21
23
|
| Feature | Description |
|
|
22
24
|
| ----------------- | ------------------------------------------------------------------------------ |
|
|
23
25
|
| Document ID Check | Checks if the uploaded document is a valid document (Passport, EmiratesID...). |
|
|
24
26
|
|
|
27
|
+
---
|
|
28
|
+
|
|
25
29
|
### Usage
|
|
26
30
|
|
|
27
|
-
In any
|
|
31
|
+
In any React Native component or screen, attach the following piece of code. This activates the widget. The widget requires secrets as a pre-requisite.
|
|
28
32
|
|
|
29
33
|
```ts
|
|
30
|
-
import Widget from
|
|
34
|
+
import Widget from '@thenovaweb/druid-ogold-rn-sdk';
|
|
35
|
+
import { View, StyleSheet } from 'react-native';
|
|
31
36
|
|
|
32
37
|
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
<View style={styles.widgetContainer}>
|
|
39
|
+
<Widget
|
|
40
|
+
phone="987654321"
|
|
41
|
+
email="email@email.com"
|
|
42
|
+
clientUuid="xxx-xxx-xxx"
|
|
43
|
+
clientSecret="xxx-xxx-xxx"
|
|
44
|
+
/>
|
|
45
|
+
</View>
|
|
41
46
|
);
|
|
42
47
|
|
|
43
48
|
const styles = StyleSheet.create({
|
|
44
49
|
widgetContainer: {
|
|
45
|
-
height: "100%", //
|
|
50
|
+
height: "100%", // Setting container height is important when using a view wrapper
|
|
46
51
|
},
|
|
47
52
|
});
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
The widget acts as an
|
|
55
|
+
The widget acts as an entry point to the workflow. It packs great capabilities and shows the status with relevant descriptions for each step of the onboarding flow.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Required Babel Configuration
|
|
60
|
+
|
|
61
|
+
To ensure **Reanimated 3** and other worklet-based features work correctly with this SDK, add the following `babel.config.js` to your project:
|
|
51
62
|
|
|
52
|
-
|
|
63
|
+
```js
|
|
64
|
+
module.exports = function (api) {
|
|
65
|
+
api.cache(true); // Cache the config for faster builds
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
presets: ["babel-preset-expo"], // Required for Expo + React Native
|
|
69
|
+
plugins: [
|
|
70
|
+
['react-native-worklets-core/plugin'], // Required for worklets
|
|
71
|
+
['react-native-reanimated/plugin', { processNestedWorklets: true }], // Required for Reanimated 3, must be last
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> ⚠️ Notes:
|
|
78
|
+
>
|
|
79
|
+
> * The `react-native-reanimated/plugin` **must always be last** in the plugins array.
|
|
80
|
+
> * This configuration is **minimal and required**; optional plugins (like `react-native-paper`) can be added in `env` blocks if needed.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Required Host App Dependencies
|
|
85
|
+
|
|
86
|
+
The host app must install the following native and Expo packages with these versions:
|
|
87
|
+
|
|
88
|
+
| Package | Version |
|
|
89
|
+
| ---------------------------------------- | -------- |
|
|
90
|
+
| @react-native-community/datetimepicker | ^8.4.1 |
|
|
91
|
+
| react-native-paper | ^5.14.5 |
|
|
92
|
+
| @react-native-vector-icons/feather | ^12.3.0 |
|
|
93
|
+
| react-native-reanimated | \~3.17.4 |
|
|
94
|
+
| react-native-safe-area-context | \~5.4.0 |
|
|
95
|
+
| react-native-screens | \~4.11.1 |
|
|
96
|
+
| react-native-vision-camera | \~4.7.2 |
|
|
97
|
+
| react-native-vision-camera-face-detector | ^1.8.9 |
|
|
98
|
+
| expo-image-picker | \~16.1.4 |
|
|
99
|
+
| expo-file-system | ^19.0.14 |
|
|
100
|
+
| expo-blur | \~14.1.4 |
|
|
101
|
+
| expo-linear-gradient | \~14.1.5 |
|
|
102
|
+
| expo-asset | \~11.1.7 |
|
|
103
|
+
| react-native-worklets-core | ^1.6.2 |
|
|
104
|
+
|
|
105
|
+
> Install command example:
|
|
106
|
+
>
|
|
107
|
+
> ```bash
|
|
108
|
+
> npm install @react-native-community/datetimepicker@^8.4.1 react-native-paper@^5.14.5 @react-native-vector-icons/feather@^12.3.0 react-native-reanimated@~3.17.4 react-native-safe-area-context@~5.4.0 react-native-screens@~4.11.1 react-native-vision-camera@~4.7.2 react-native-vision-camera-face-detector@^1.8.9 expo-image-picker@~16.1.4 expo-file-system@^19.0.14 expo-blur@~14.1.4 expo-linear-gradient@~14.1.5 expo-asset@~11.1.7 react-native-worklets-core@^1.6.2
|
|
109
|
+
> ```
|
|
110
|
+
>
|
|
111
|
+
> After installation, rebuild the app (`expo run:android` / `expo run:ios`) to ensure native modules are linked correctly.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### Android Configuration
|
|
116
|
+
|
|
117
|
+
Ensure your `android/app/build.gradle` has the following setting:
|
|
118
|
+
|
|
119
|
+
```gradle
|
|
120
|
+
android {
|
|
121
|
+
defaultConfig {
|
|
122
|
+
minSdkVersion 26 // Required for VisionCamera and Reanimated 3
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
53
126
|
|
|
54
|
-
|
|
127
|
+
---
|
|
55
128
|
|
|
56
129
|
### Documentation
|
|
57
130
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thenovaweb/druid-ogold-rn-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "A react native package for regulatory compliance.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
"expo-file-system": "^19.0.14",
|
|
64
64
|
"expo-blur": "~14.1.4",
|
|
65
65
|
"expo-linear-gradient": "~14.1.5",
|
|
66
|
-
"expo-asset": "~11.1.7"
|
|
66
|
+
"expo-asset": "~11.1.7",
|
|
67
|
+
"react-native-worklets-core": "^1.6.2"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"@types/lodash": "^4.17.20",
|