@functionland/react-native-fula 1.8.0 → 1.12.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.
- package/README.md +214 -205
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.6/checksums/checksums.lock +0 -0
- package/android/.gradle/7.6/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.6/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.6/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.6/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.6/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.6/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.6/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/.idea/compiler.xml +1 -1
- package/android/.idea/gradle.xml +1 -0
- package/android/.idea/misc.xml +9 -9
- package/android/.idea/sonarlint/securityhotspotstore/index.pb +0 -0
- package/android/build.gradle +2 -1
- package/android/src/main/java/land/fx/fula/Cryptography.java +60 -60
- package/android/src/main/java/land/fx/fula/FulaModule.java +126 -17
- package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/commonjs/protocols/blockchain.js +12 -12
- package/lib/commonjs/protocols/blockchain.js.map +1 -1
- package/lib/commonjs/protocols/fula.js +113 -98
- package/lib/commonjs/protocols/fula.js.map +1 -1
- package/lib/commonjs/protocols/fxblox.js +23 -4
- package/lib/commonjs/protocols/fxblox.js.map +1 -1
- package/lib/commonjs/types/fxblox.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/module/protocols/blockchain.js +12 -12
- package/lib/module/protocols/blockchain.js.map +1 -1
- package/lib/module/protocols/fula.js +109 -96
- package/lib/module/protocols/fula.js.map +1 -1
- package/lib/module/protocols/fxblox.js +21 -3
- package/lib/module/protocols/fxblox.js.map +1 -1
- package/lib/module/types/fxblox.js.map +1 -1
- package/lib/typescript/interfaces/fulaNativeModule.d.ts +3 -0
- package/lib/typescript/protocols/fula.d.ts +5 -0
- package/lib/typescript/protocols/fxblox.d.ts +1 -0
- package/lib/typescript/types/fxblox.d.ts +4 -0
- package/package.json +1 -1
- package/src/index.tsx +4 -4
- package/src/interfaces/fulaNativeModule.ts +43 -8
- package/src/protocols/blockchain.ts +318 -274
- package/src/protocols/fula.ts +301 -286
- package/src/protocols/fxblox.ts +49 -28
- package/src/types/fxblox.ts +8 -4
package/src/protocols/fxblox.ts
CHANGED
|
@@ -1,28 +1,49 @@
|
|
|
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(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return res;
|
|
28
|
-
|
|
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 res = 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 (e) {
|
|
20
|
+
return res;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
.catch((err) => {
|
|
25
|
+
return err;
|
|
26
|
+
});
|
|
27
|
+
return res;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const reboot = (): Promise<BType.rebootResponse> => {
|
|
31
|
+
console.log('reboot in react-native started');
|
|
32
|
+
let res = 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 (e) {
|
|
41
|
+
return res;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.catch((err) => {
|
|
46
|
+
return err;
|
|
47
|
+
});
|
|
48
|
+
return res;
|
|
49
|
+
};
|
package/src/types/fxblox.ts
CHANGED