@functionland/react-native-fula 1.41.0 → 1.41.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.
Files changed (80) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +226 -226
  3. package/android/gradle.properties +5 -5
  4. package/android/src/main/AndroidManifest.xml +3 -3
  5. package/android/src/main/AndroidManifestNew.xml +2 -2
  6. package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
  7. package/android/src/main/java/land/fx/fula/Cryptography.java +62 -62
  8. package/android/src/main/java/land/fx/fula/FulaModule.java +0 -0
  9. package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
  10. package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
  11. package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
  12. package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
  13. package/ios/Cryptography.swift +49 -49
  14. package/ios/Fula-Bridging-Header.h +3 -3
  15. package/ios/Fula.mm +166 -215
  16. package/ios/Fula.swift +1289 -1334
  17. package/ios/UserDataHelper.swift +143 -143
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/interfaces/augment-api-errors.js.map +1 -1
  20. package/lib/commonjs/interfaces/augment-api-rpc.js.map +1 -1
  21. package/lib/commonjs/interfaces/augment-api-runtime.js.map +1 -1
  22. package/lib/commonjs/interfaces/augment-api.js.map +1 -1
  23. package/lib/commonjs/interfaces/augment-types.js.map +1 -1
  24. package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
  25. package/lib/commonjs/interfaces/index.js.map +1 -1
  26. package/lib/commonjs/interfaces/lookup.js +278 -278
  27. package/lib/commonjs/interfaces/lookup.js.map +1 -1
  28. package/lib/commonjs/interfaces/registry.js.map +1 -1
  29. package/lib/commonjs/interfaces/types-lookup.js.map +1 -1
  30. package/lib/commonjs/interfaces/types.js.map +1 -1
  31. package/lib/commonjs/protocols/blockchain.js.map +1 -1
  32. package/lib/commonjs/protocols/chain-api.js +34 -13
  33. package/lib/commonjs/protocols/chain-api.js.map +1 -1
  34. package/lib/commonjs/protocols/fula.js +106 -106
  35. package/lib/commonjs/protocols/fula.js.map +1 -1
  36. package/lib/commonjs/protocols/fxblox.js +3 -3
  37. package/lib/commonjs/protocols/fxblox.js.map +1 -1
  38. package/lib/commonjs/types/blockchain.js.map +1 -1
  39. package/lib/commonjs/types/fxblox.js.map +1 -1
  40. package/lib/module/index.js.map +1 -1
  41. package/lib/module/interfaces/augment-api-errors.js.map +1 -1
  42. package/lib/module/interfaces/augment-api-rpc.js.map +1 -1
  43. package/lib/module/interfaces/augment-api-runtime.js.map +1 -1
  44. package/lib/module/interfaces/augment-api.js.map +1 -1
  45. package/lib/module/interfaces/augment-types.js.map +1 -1
  46. package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
  47. package/lib/module/interfaces/index.js.map +1 -1
  48. package/lib/module/interfaces/lookup.js +278 -278
  49. package/lib/module/interfaces/lookup.js.map +1 -1
  50. package/lib/module/interfaces/registry.js.map +1 -1
  51. package/lib/module/interfaces/types-lookup.js.map +1 -1
  52. package/lib/module/interfaces/types.js.map +1 -1
  53. package/lib/module/protocols/blockchain.js.map +1 -1
  54. package/lib/module/protocols/chain-api.js +30 -11
  55. package/lib/module/protocols/chain-api.js.map +1 -1
  56. package/lib/module/protocols/fula.js +106 -106
  57. package/lib/module/protocols/fula.js.map +1 -1
  58. package/lib/module/protocols/fxblox.js +3 -3
  59. package/lib/module/protocols/fxblox.js.map +1 -1
  60. package/lib/module/types/blockchain.js.map +1 -1
  61. package/lib/module/types/fxblox.js.map +1 -1
  62. package/lib/typescript/protocols/chain-api.d.ts +4 -0
  63. package/lib/typescript/protocols/chain-api.d.ts.map +1 -1
  64. package/package.json +3 -2
  65. package/react-native-fula.podspec +47 -47
  66. package/src/index.tsx +4 -4
  67. package/src/interfaces/augment-api-errors.ts +449 -449
  68. package/src/interfaces/augment-api-rpc.ts +617 -617
  69. package/src/interfaces/augment-api-runtime.ts +224 -224
  70. package/src/interfaces/augment-api.ts +10 -10
  71. package/src/interfaces/augment-types.ts +1230 -1230
  72. package/src/interfaces/index.ts +4 -4
  73. package/src/interfaces/lookup.ts +1889 -1889
  74. package/src/interfaces/registry.ts +152 -152
  75. package/src/interfaces/types-lookup.ts +2043 -2043
  76. package/src/interfaces/types.ts +3 -3
  77. package/src/protocols/chain-api.ts +308 -290
  78. package/src/protocols/fula.ts +427 -427
  79. package/src/protocols/fxblox.ts +70 -70
  80. package/src/types/fxblox.ts +13 -13
@@ -1,70 +1,70 @@
1
- import Fula from '../interfaces/fulaNativeModule';
2
- import type * as BType from '../types/fxblox';
3
-
4
- /**
5
- * send a command to Blox hardware to remove all save wifis.
6
- * @returns json{status:true if success, false if fails; msg: error message or success log}
7
- */
8
-
9
- export const wifiRemoveall = (): Promise<BType.wifiRemoveallResponse> => {
10
- console.log('wifiRemoveall in react-native started');
11
- let res2 = Fula.wifiRemoveall()
12
- .then((res) => {
13
- try {
14
- let jsonRes: BType.wifiRemoveallResponse = JSON.parse(res);
15
- return jsonRes;
16
- } catch (e) {
17
- try {
18
- return JSON.parse(res);
19
- } catch (e2) {
20
- return res;
21
- }
22
- }
23
- })
24
- .catch((err) => {
25
- return err;
26
- });
27
- return res2;
28
- };
29
-
30
- export const reboot = (): Promise<BType.rebootResponse> => {
31
- console.log('reboot in react-native started');
32
- let res2 = Fula.reboot()
33
- .then((res) => {
34
- try {
35
- let jsonRes: BType.rebootResponse = JSON.parse(res);
36
- return jsonRes;
37
- } catch (e) {
38
- try {
39
- return JSON.parse(res);
40
- } catch (e2) {
41
- return res;
42
- }
43
- }
44
- })
45
- .catch((err) => {
46
- return err;
47
- });
48
- return res2;
49
- };
50
-
51
- export const eraseBlData = (): Promise<BType.rebootResponse> => {
52
- console.log('eraseBlData in react-native started');
53
- let res2 = Fula.eraseBlData()
54
- .then((res) => {
55
- try {
56
- let jsonRes: BType.eraseBlDataResponse = JSON.parse(res);
57
- return jsonRes;
58
- } catch (e) {
59
- try {
60
- return JSON.parse(res);
61
- } catch (e2) {
62
- return res;
63
- }
64
- }
65
- })
66
- .catch((err) => {
67
- return err;
68
- });
69
- return res2;
70
- };
1
+ import Fula from '../interfaces/fulaNativeModule';
2
+ import type * as BType from '../types/fxblox';
3
+
4
+ /**
5
+ * send a command to Blox hardware to remove all save wifis.
6
+ * @returns json{status:true if success, false if fails; msg: error message or success log}
7
+ */
8
+
9
+ export const wifiRemoveall = (): Promise<BType.wifiRemoveallResponse> => {
10
+ console.log('wifiRemoveall in react-native started');
11
+ let res2 = Fula.wifiRemoveall()
12
+ .then((res) => {
13
+ try {
14
+ let jsonRes: BType.wifiRemoveallResponse = JSON.parse(res);
15
+ return jsonRes;
16
+ } catch (e) {
17
+ try {
18
+ return JSON.parse(res);
19
+ } catch (e2) {
20
+ return res;
21
+ }
22
+ }
23
+ })
24
+ .catch((err) => {
25
+ return err;
26
+ });
27
+ return res2;
28
+ };
29
+
30
+ export const reboot = (): Promise<BType.rebootResponse> => {
31
+ console.log('reboot in react-native started');
32
+ let res2 = Fula.reboot()
33
+ .then((res) => {
34
+ try {
35
+ let jsonRes: BType.rebootResponse = JSON.parse(res);
36
+ return jsonRes;
37
+ } catch (e) {
38
+ try {
39
+ return JSON.parse(res);
40
+ } catch (e2) {
41
+ return res;
42
+ }
43
+ }
44
+ })
45
+ .catch((err) => {
46
+ return err;
47
+ });
48
+ return res2;
49
+ };
50
+
51
+ export const eraseBlData = (): Promise<BType.rebootResponse> => {
52
+ console.log('eraseBlData in react-native started');
53
+ let res2 = Fula.eraseBlData()
54
+ .then((res) => {
55
+ try {
56
+ let jsonRes: BType.eraseBlDataResponse = JSON.parse(res);
57
+ return jsonRes;
58
+ } catch (e) {
59
+ try {
60
+ return JSON.parse(res);
61
+ } catch (e2) {
62
+ return res;
63
+ }
64
+ }
65
+ })
66
+ .catch((err) => {
67
+ return err;
68
+ });
69
+ return res2;
70
+ };
@@ -1,13 +1,13 @@
1
- export interface wifiRemoveallResponse {
2
- status: boolean;
3
- msg: string;
4
- }
5
- export interface rebootResponse {
6
- status: boolean;
7
- msg: string;
8
- }
9
-
10
- export interface eraseBlDataResponse {
11
- status: boolean;
12
- msg: string;
13
- }
1
+ export interface wifiRemoveallResponse {
2
+ status: boolean;
3
+ msg: string;
4
+ }
5
+ export interface rebootResponse {
6
+ status: boolean;
7
+ msg: string;
8
+ }
9
+
10
+ export interface eraseBlDataResponse {
11
+ status: boolean;
12
+ msg: string;
13
+ }