@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/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * as fula from './protocols/fula';
|
|
2
|
-
export * as blockchain from './protocols/blockchain';
|
|
3
|
-
export * as chainApi from './protocols/chain-api';
|
|
4
|
-
export * as fxblox from './protocols/fxblox';
|
|
1
|
+
export * as fula from './protocols/fula';
|
|
2
|
+
export * as blockchain from './protocols/blockchain';
|
|
3
|
+
export * as chainApi from './protocols/chain-api';
|
|
4
|
+
export * as fxblox from './protocols/fxblox';
|
|
@@ -19,10 +19,11 @@ interface FulaNativeModule {
|
|
|
19
19
|
autoFlush: boolean, //set to false always unless you know what you are doing. This is to write actions to disk explicitly after each write
|
|
20
20
|
useRelay: boolean | null, // if true it forces the use of relay
|
|
21
21
|
refresh: boolean // if true it forces to refresh the fula object
|
|
22
|
-
|
|
22
|
+
) => Promise<string>;
|
|
23
23
|
isReady: (filesystemCheck: boolean) => Promise<boolean>;
|
|
24
24
|
logout: (identity: string, storePath: string) => Promise<boolean>;
|
|
25
25
|
checkFailedActions: (retry: boolean, timeout: number) => Promise<boolean>;
|
|
26
|
+
listFailedActions: (cids: string[]) => Promise<string[]>;
|
|
26
27
|
checkConnection: (timeout: number) => Promise<boolean>;
|
|
27
28
|
get: (key: string) => Promise<string>;
|
|
28
29
|
has: (key: Uint8Array) => Promise<boolean>;
|
|
@@ -47,7 +48,9 @@ interface FulaNativeModule {
|
|
|
47
48
|
|
|
48
49
|
shutdown: () => Promise<void>;
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
testData: (identity: string, bloxAddr: string) => Promise<string>;
|
|
52
|
+
|
|
53
|
+
//Blockchain related functions
|
|
51
54
|
createAccount: (seed: string) => Promise<string>;
|
|
52
55
|
checkAccountExists: (account: string) => Promise<string>;
|
|
53
56
|
createPool: (seed: string, poolName: string) => Promise<string>;
|
|
@@ -56,15 +59,47 @@ interface FulaNativeModule {
|
|
|
56
59
|
leavePool: (seed: string, poolID: number) => Promise<string>;
|
|
57
60
|
cancelPoolJoin: (seed: string, poolID: number) => Promise<string>;
|
|
58
61
|
listPoolJoinRequests: (poolID: number) => Promise<string>;
|
|
59
|
-
votePoolJoinRequest: (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
votePoolJoinRequest: (
|
|
63
|
+
seed: string,
|
|
64
|
+
poolID: number,
|
|
65
|
+
account: string,
|
|
66
|
+
accept: boolean
|
|
67
|
+
) => Promise<string>;
|
|
68
|
+
newReplicationRequest: (
|
|
69
|
+
seed: string,
|
|
70
|
+
poolID: number,
|
|
71
|
+
replicationFactor: number,
|
|
72
|
+
cid: string
|
|
73
|
+
) => Promise<string>;
|
|
74
|
+
newStoreRequest: (
|
|
75
|
+
seed: string,
|
|
76
|
+
poolID: number,
|
|
77
|
+
uploader: string,
|
|
78
|
+
cid: string
|
|
79
|
+
) => Promise<string>;
|
|
62
80
|
listAvailableReplicationRequests: (poolID: number) => Promise<string>;
|
|
63
|
-
removeReplicationRequest: (
|
|
64
|
-
|
|
65
|
-
|
|
81
|
+
removeReplicationRequest: (
|
|
82
|
+
seed: string,
|
|
83
|
+
poolID: number,
|
|
84
|
+
cid: string
|
|
85
|
+
) => Promise<string>;
|
|
86
|
+
removeStorer: (
|
|
87
|
+
seed: string,
|
|
88
|
+
storer: string,
|
|
89
|
+
poolID: number,
|
|
90
|
+
cid: string
|
|
91
|
+
) => Promise<string>;
|
|
92
|
+
removeStoredReplication: (
|
|
93
|
+
seed: string,
|
|
94
|
+
uploader: string,
|
|
95
|
+
poolID: number,
|
|
96
|
+
cid: string
|
|
97
|
+
) => Promise<string>;
|
|
98
|
+
|
|
99
|
+
//Hardware
|
|
66
100
|
bloxFreeSpace: () => Promise<string>;
|
|
67
101
|
wifiRemoveall: () => Promise<string>;
|
|
102
|
+
reboot: () => Promise<string>;
|
|
68
103
|
}
|
|
69
104
|
|
|
70
105
|
const LINKING_ERROR =
|