react-native-hyperkyc-sdk 0.1.0-alpha

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 (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/android/.DS_Store +0 -0
  4. package/android/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
  5. package/android/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/6.8/gc.properties +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  12. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/android/.gradle/checksums/checksums.lock +0 -0
  14. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  15. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  16. package/android/.gradle/configuration-cache/gc.properties +0 -0
  17. package/android/.gradle/vcs-1/gc.properties +0 -0
  18. package/android/.idea/.gitignore +3 -0
  19. package/android/.idea/compiler.xml +6 -0
  20. package/android/.idea/gradle.xml +18 -0
  21. package/android/.idea/jarRepositories.xml +40 -0
  22. package/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1_aar.xml +18 -0
  23. package/android/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1_aar.xml +15 -0
  24. package/android/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1.xml +13 -0
  25. package/android/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1_aar.xml +19 -0
  26. package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1_aar.xml +15 -0
  27. package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1_aar.xml +15 -0
  28. package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1_aar.xml +15 -0
  29. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1_aar.xml +15 -0
  30. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1_aar.xml +15 -0
  31. package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1_aar.xml +19 -0
  32. package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0.xml +13 -0
  33. package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0.xml +13 -0
  34. package/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3.xml +13 -0
  35. package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0.xml +13 -0
  36. package/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0.xml +13 -0
  37. package/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4.xml +13 -0
  38. package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0.xml +13 -0
  39. package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0.xml +13 -0
  40. package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0.xml +13 -0
  41. package/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2.xml +13 -0
  42. package/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml +11 -0
  43. package/android/.idea/misc.xml +9 -0
  44. package/android/.idea/modules/android.iml +62 -0
  45. package/android/.idea/modules.xml +8 -0
  46. package/android/.idea/vcs.xml +6 -0
  47. package/android/build.gradle +64 -0
  48. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  50. package/android/gradlew +185 -0
  51. package/android/gradlew.bat +89 -0
  52. package/android/local.properties +8 -0
  53. package/android/src/.DS_Store +0 -0
  54. package/android/src/main/.DS_Store +0 -0
  55. package/android/src/main/AndroidManifest.xml +4 -0
  56. package/android/src/main/java/.DS_Store +0 -0
  57. package/android/src/main/java/com/.DS_Store +0 -0
  58. package/android/src/main/java/com/reactnativehyperkycsdk/.DS_Store +0 -0
  59. package/android/src/main/java/com/reactnativehyperkycsdk/HyperkycSdkModule.java +149 -0
  60. package/android/src/main/java/com/reactnativehyperkycsdk/HyperkycSdkPackage.java +28 -0
  61. package/android/src/main/java/com/reactnativehyperkycsdk/HyperkycSdkUtils.java +64 -0
  62. package/ios/.DS_Store +0 -0
  63. package/ios/HyperkycSdk-Bridging-Header.h +11 -0
  64. package/ios/HyperkycSdk.m +11 -0
  65. package/ios/HyperkycSdk.swift +173 -0
  66. package/ios/HyperkycSdk.xcodeproj/project.pbxproj +293 -0
  67. package/ios/HyperkycSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  68. package/ios/HyperkycSdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  69. package/ios/HyperkycSdk.xcodeproj/project.xcworkspace/xcuserdata/niveditamuthusubramanian.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  70. package/ios/HyperkycSdk.xcodeproj/xcuserdata/niveditamuthusubramanian.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  71. package/lib/commonjs/index.js +24 -0
  72. package/lib/commonjs/index.js.map +1 -0
  73. package/lib/module/index.js +15 -0
  74. package/lib/module/index.js.map +1 -0
  75. package/lib/typescript/index.d.ts +1 -0
  76. package/package.json +147 -0
  77. package/react-native-hyperkyc-sdk.podspec +20 -0
  78. package/src/index.tsx +22 -0
package/package.json ADDED
@@ -0,0 +1,147 @@
1
+ {
2
+ "name": "react-native-hyperkyc-sdk",
3
+ "version": "0.1.0-alpha",
4
+ "description": "React Native wrapper for HyperKYC SDK",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "react-native-hyperkyc-sdk.podspec",
17
+ "!lib/typescript/example",
18
+ "!android/build",
19
+ "!ios/build",
20
+ "!**/__tests__",
21
+ "!**/__fixtures__",
22
+ "!**/__mocks__"
23
+ ],
24
+ "scripts": {
25
+ "test": "jest",
26
+ "typescript": "tsc --noEmit",
27
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
28
+ "prepare": "bob build",
29
+ "release": "release-it",
30
+ "example": "yarn --cwd example",
31
+ "pods": "cd example && pod-install --quiet",
32
+ "bootstrap": "yarn example && yarn && yarn pods"
33
+ },
34
+ "keywords": [
35
+ "react-native",
36
+ "ios",
37
+ "android"
38
+ ],
39
+ "repository": "http://github.com/hyperverge/react-native-hyperkyc-sdk",
40
+ "author": "nivedita <nivedita@hyperverge.co> (http://github.com/hyperverge)",
41
+ "license": "MIT",
42
+ "bugs": {
43
+ "url": "http://github.com/hyperverge/react-native-hyperkyc-sdk/issues"
44
+ },
45
+ "homepage": "http://github.com/hyperverge/react-native-hyperkyc-sdk#readme",
46
+ "publishConfig": {
47
+ "registry": "https://registry.npmjs.org/"
48
+ },
49
+ "devDependencies": {
50
+ "@commitlint/config-conventional": "^11.0.0",
51
+ "@react-native-community/eslint-config": "^2.0.0",
52
+ "@release-it/conventional-changelog": "^2.0.0",
53
+ "@types/jest": "^26.0.0",
54
+ "@types/react": "^16.9.19",
55
+ "@types/react-native": "0.62.13",
56
+ "commitlint": "^11.0.0",
57
+ "eslint": "^7.2.0",
58
+ "eslint-config-prettier": "^7.0.0",
59
+ "eslint-plugin-prettier": "^3.1.3",
60
+ "husky": "^6.0.0",
61
+ "jest": "^26.0.1",
62
+ "pod-install": "^0.1.0",
63
+ "prettier": "^2.0.5",
64
+ "react": "16.13.1",
65
+ "react-native": "0.63.4",
66
+ "react-native-builder-bob": "^0.18.0",
67
+ "release-it": "^14.2.2",
68
+ "typescript": "^4.1.3"
69
+ },
70
+ "peerDependencies": {
71
+ "react": "*",
72
+ "react-native": "*"
73
+ },
74
+ "jest": {
75
+ "preset": "react-native",
76
+ "modulePathIgnorePatterns": [
77
+ "<rootDir>/example/node_modules",
78
+ "<rootDir>/lib/"
79
+ ]
80
+ },
81
+ "commitlint": {
82
+ "extends": [
83
+ "@commitlint/config-conventional"
84
+ ]
85
+ },
86
+ "release-it": {
87
+ "git": {
88
+ "commitMessage": "chore: release ${version}",
89
+ "tagName": "v${version}"
90
+ },
91
+ "npm": {
92
+ "publish": true
93
+ },
94
+ "github": {
95
+ "release": true
96
+ },
97
+ "plugins": {
98
+ "@release-it/conventional-changelog": {
99
+ "preset": "angular"
100
+ }
101
+ }
102
+ },
103
+ "eslintConfig": {
104
+ "root": true,
105
+ "extends": [
106
+ "@react-native-community",
107
+ "prettier"
108
+ ],
109
+ "rules": {
110
+ "prettier/prettier": [
111
+ "error",
112
+ {
113
+ "quoteProps": "consistent",
114
+ "singleQuote": true,
115
+ "tabWidth": 2,
116
+ "trailingComma": "es5",
117
+ "useTabs": false
118
+ }
119
+ ]
120
+ }
121
+ },
122
+ "eslintIgnore": [
123
+ "node_modules/",
124
+ "lib/"
125
+ ],
126
+ "prettier": {
127
+ "quoteProps": "consistent",
128
+ "singleQuote": true,
129
+ "tabWidth": 2,
130
+ "trailingComma": "es5",
131
+ "useTabs": false
132
+ },
133
+ "react-native-builder-bob": {
134
+ "source": "src",
135
+ "output": "lib",
136
+ "targets": [
137
+ "commonjs",
138
+ "module",
139
+ [
140
+ "typescript",
141
+ {
142
+ "project": "tsconfig.build.json"
143
+ }
144
+ ]
145
+ ]
146
+ }
147
+ }
@@ -0,0 +1,20 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native-hyperkyc-sdk"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "10.0" }
14
+ s.source = { :git => "http://github.com/hyperverge/react-native-hyperkyc-sdk.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+
18
+ s.dependency "React-Core"
19
+ s.dependency "HyperKYC"
20
+ end
package/src/index.tsx ADDED
@@ -0,0 +1,22 @@
1
+ import { NativeModules, Platform } from 'react-native';
2
+
3
+ const LINKING_ERROR =
4
+ `The package 'react-native-hyperkyc-sdk' doesn't seem to be linked. Make sure: \n\n` +
5
+ Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
6
+ '- You rebuilt the app after installing the package\n' +
7
+ '- You are not using Expo managed workflow\n';
8
+
9
+ const HyperkycSdk = NativeModules.HyperkycSdk
10
+ ? NativeModules.HyperkycSdk
11
+ : new Proxy(
12
+ {},
13
+ {
14
+ get() {
15
+ throw new Error(LINKING_ERROR);
16
+ },
17
+ }
18
+ );
19
+
20
+ export function multiply(a: number, b: number): Promise<number> {
21
+ return HyperkycSdk.multiply(a, b);
22
+ }