@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.
- package/LICENSE +20 -20
- package/README.md +226 -226
- package/android/gradle.properties +5 -5
- package/android/src/main/AndroidManifest.xml +3 -3
- package/android/src/main/AndroidManifestNew.xml +2 -2
- package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
- package/android/src/main/java/land/fx/fula/Cryptography.java +62 -62
- package/android/src/main/java/land/fx/fula/FulaModule.java +0 -0
- package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
- package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
- package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
- package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
- package/ios/Cryptography.swift +49 -49
- package/ios/Fula-Bridging-Header.h +3 -3
- package/ios/Fula.mm +166 -215
- package/ios/Fula.swift +1289 -1334
- package/ios/UserDataHelper.swift +143 -143
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/interfaces/augment-api-errors.js.map +1 -1
- package/lib/commonjs/interfaces/augment-api-rpc.js.map +1 -1
- package/lib/commonjs/interfaces/augment-api-runtime.js.map +1 -1
- package/lib/commonjs/interfaces/augment-api.js.map +1 -1
- package/lib/commonjs/interfaces/augment-types.js.map +1 -1
- package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/commonjs/interfaces/index.js.map +1 -1
- package/lib/commonjs/interfaces/lookup.js +278 -278
- package/lib/commonjs/interfaces/lookup.js.map +1 -1
- package/lib/commonjs/interfaces/registry.js.map +1 -1
- package/lib/commonjs/interfaces/types-lookup.js.map +1 -1
- package/lib/commonjs/interfaces/types.js.map +1 -1
- package/lib/commonjs/protocols/blockchain.js.map +1 -1
- package/lib/commonjs/protocols/chain-api.js +34 -13
- package/lib/commonjs/protocols/chain-api.js.map +1 -1
- package/lib/commonjs/protocols/fula.js +106 -106
- package/lib/commonjs/protocols/fula.js.map +1 -1
- package/lib/commonjs/protocols/fxblox.js +3 -3
- package/lib/commonjs/protocols/fxblox.js.map +1 -1
- package/lib/commonjs/types/blockchain.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/augment-api-errors.js.map +1 -1
- package/lib/module/interfaces/augment-api-rpc.js.map +1 -1
- package/lib/module/interfaces/augment-api-runtime.js.map +1 -1
- package/lib/module/interfaces/augment-api.js.map +1 -1
- package/lib/module/interfaces/augment-types.js.map +1 -1
- package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/module/interfaces/index.js.map +1 -1
- package/lib/module/interfaces/lookup.js +278 -278
- package/lib/module/interfaces/lookup.js.map +1 -1
- package/lib/module/interfaces/registry.js.map +1 -1
- package/lib/module/interfaces/types-lookup.js.map +1 -1
- package/lib/module/interfaces/types.js.map +1 -1
- package/lib/module/protocols/blockchain.js.map +1 -1
- package/lib/module/protocols/chain-api.js +30 -11
- package/lib/module/protocols/chain-api.js.map +1 -1
- package/lib/module/protocols/fula.js +106 -106
- package/lib/module/protocols/fula.js.map +1 -1
- package/lib/module/protocols/fxblox.js +3 -3
- package/lib/module/protocols/fxblox.js.map +1 -1
- package/lib/module/types/blockchain.js.map +1 -1
- package/lib/module/types/fxblox.js.map +1 -1
- package/lib/typescript/protocols/chain-api.d.ts +4 -0
- package/lib/typescript/protocols/chain-api.d.ts.map +1 -1
- package/package.json +3 -2
- package/react-native-fula.podspec +47 -47
- package/src/index.tsx +4 -4
- package/src/interfaces/augment-api-errors.ts +449 -449
- package/src/interfaces/augment-api-rpc.ts +617 -617
- package/src/interfaces/augment-api-runtime.ts +224 -224
- package/src/interfaces/augment-api.ts +10 -10
- package/src/interfaces/augment-types.ts +1230 -1230
- package/src/interfaces/index.ts +4 -4
- package/src/interfaces/lookup.ts +1889 -1889
- package/src/interfaces/registry.ts +152 -152
- package/src/interfaces/types-lookup.ts +2043 -2043
- package/src/interfaces/types.ts +3 -3
- package/src/protocols/chain-api.ts +308 -290
- package/src/protocols/fula.ts +427 -427
- package/src/protocols/fxblox.ts +70 -70
- package/src/types/fxblox.ts +13 -13
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import Fula from '../interfaces/fulaNativeModule';
|
|
2
2
|
import { init as chainApiInit, batchUploadManifest, checkAccountBalance, getAccountIdFromSeed } from './chain-api';
|
|
3
|
-
/**
|
|
4
|
-
* Register the app's lifecycle listeners to handle foreground, background, and termination states.
|
|
3
|
+
/**
|
|
4
|
+
* Register the app's lifecycle listeners to handle foreground, background, and termination states.
|
|
5
5
|
*/
|
|
6
6
|
export const registerLifecycleListener = () => {
|
|
7
7
|
console.log('called registerLifecycleListener');
|
|
8
8
|
return Fula.registerLifecycleListener();
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
13
|
-
// The key must be a valid ipld.Link.
|
|
14
|
-
* @param config
|
|
15
|
-
* @returns boolean
|
|
11
|
+
/**
|
|
12
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
13
|
+
// The key must be a valid ipld.Link.
|
|
14
|
+
* @param config
|
|
15
|
+
* @returns boolean
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -24,11 +24,11 @@ export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
|
24
24
|
return Fula.initFula(identity, storePath, bloxAddr, exchange, autoFlush, rootCid, useRelay, refresh);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
29
|
-
// The key must be a valid ipld.Link.
|
|
30
|
-
* @param config
|
|
31
|
-
* @returns boolean
|
|
27
|
+
/**
|
|
28
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
29
|
+
// The key must be a valid ipld.Link.
|
|
30
|
+
* @param config
|
|
31
|
+
* @returns boolean
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -39,17 +39,17 @@ export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
|
39
39
|
return Fula.newClient(identity, storePath, bloxAddr, exchange, autoFlush, useRelay, refresh);
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* rm removes all data
|
|
44
|
-
* @param path
|
|
45
|
-
* @returns string: new cid of the root
|
|
42
|
+
/**
|
|
43
|
+
* rm removes all data
|
|
44
|
+
* @param path
|
|
45
|
+
* @returns string: new cid of the root
|
|
46
46
|
*/
|
|
47
47
|
export const logout = (identity, storePath) => {
|
|
48
48
|
return Fula.logout(identity, storePath);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* Checks if there are any un-synced changes on the device
|
|
51
|
+
/**
|
|
52
|
+
* Checks if there are any un-synced changes on the device
|
|
53
53
|
*/
|
|
54
54
|
export const checkFailedActions = function () {
|
|
55
55
|
let retry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -57,63 +57,63 @@ export const checkFailedActions = function () {
|
|
|
57
57
|
return Fula.checkFailedActions(retry, timeout);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* Lists the cids that failed to be sent to backend and are kept only locally
|
|
60
|
+
/**
|
|
61
|
+
* Lists the cids that failed to be sent to backend and are kept only locally
|
|
62
62
|
*/
|
|
63
63
|
export const listFailedActions = function () {
|
|
64
64
|
let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
65
65
|
return Fula.listFailedActions(cids);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* Lists the cids that are recent
|
|
68
|
+
/**
|
|
69
|
+
* Lists the cids that are recent
|
|
70
70
|
*/
|
|
71
71
|
export const listRecentCidsAsString = () => {
|
|
72
72
|
return Fula.listRecentCidsAsString();
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* Clears the cids that ar recent
|
|
75
|
+
/**
|
|
76
|
+
* Clears the cids that ar recent
|
|
77
77
|
*/
|
|
78
78
|
export const clearCidsFromRecent = function () {
|
|
79
79
|
let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
80
80
|
return Fula.clearCidsFromRecent(cids);
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
/**
|
|
84
|
-
* Checks if there are any un-synced changes on the device
|
|
83
|
+
/**
|
|
84
|
+
* Checks if there are any un-synced changes on the device
|
|
85
85
|
*/
|
|
86
86
|
export const checkConnection = function () {
|
|
87
87
|
let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20;
|
|
88
88
|
return Fula.checkConnection(timeout);
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
/**
|
|
92
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
93
|
-
// The key must be a valid ipld.Link.
|
|
94
|
-
* @param key
|
|
95
|
-
* @returns value
|
|
91
|
+
/**
|
|
92
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
93
|
+
// The key must be a valid ipld.Link.
|
|
94
|
+
* @param key
|
|
95
|
+
* @returns value
|
|
96
96
|
*/
|
|
97
97
|
export const get = key => {
|
|
98
98
|
return Fula.get(key);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
* Has checks whether the value corresponding to the given key is present in the local datastore.
|
|
103
|
-
// The key must be a valid ipld.Link.
|
|
104
|
-
* @param key
|
|
105
|
-
* @returns boolean
|
|
101
|
+
/**
|
|
102
|
+
* Has checks whether the value corresponding to the given key is present in the local datastore.
|
|
103
|
+
// The key must be a valid ipld.Link.
|
|
104
|
+
* @param key
|
|
105
|
+
* @returns boolean
|
|
106
106
|
*/
|
|
107
107
|
export const has = key => {
|
|
108
108
|
return Fula.has(key);
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
/**
|
|
112
|
-
* Push requests the given addr to download the root cid from this node.
|
|
113
|
-
// The addr must be a valid multiaddr that includes peer ID.
|
|
114
|
-
// this function.
|
|
115
|
-
* @param addr
|
|
116
|
-
* @returns null or error
|
|
111
|
+
/**
|
|
112
|
+
* Push requests the given addr to download the root cid from this node.
|
|
113
|
+
// The addr must be a valid multiaddr that includes peer ID.
|
|
114
|
+
// this function.
|
|
115
|
+
* @param addr
|
|
116
|
+
* @returns null or error
|
|
117
117
|
*/
|
|
118
118
|
export const push = () => {
|
|
119
119
|
return Fula.push();
|
|
@@ -124,52 +124,52 @@ export const testData = (identity, bloxAddr) => {
|
|
|
124
124
|
return Fula.testData(identity, bloxAddr);
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
/**
|
|
128
|
-
* Put stores the given key value onto the local datastore.
|
|
129
|
-
// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
|
|
130
|
-
// to the given key.
|
|
131
|
-
* @param key, value
|
|
132
|
-
* @returns null or string
|
|
127
|
+
/**
|
|
128
|
+
* Put stores the given key value onto the local datastore.
|
|
129
|
+
// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
|
|
130
|
+
// to the given key.
|
|
131
|
+
* @param key, value
|
|
132
|
+
* @returns null or string
|
|
133
133
|
*/
|
|
134
134
|
export const put = (value, codec) => {
|
|
135
135
|
return Fula.put(value, codec);
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
-
/**
|
|
139
|
-
* mkdir creates a directory at the given path.
|
|
140
|
-
* @param path
|
|
141
|
-
* @returns string: new cid of the root
|
|
138
|
+
/**
|
|
139
|
+
* mkdir creates a directory at the given path.
|
|
140
|
+
* @param path
|
|
141
|
+
* @returns string: new cid of the root
|
|
142
142
|
*/
|
|
143
143
|
export const mkdir = path => {
|
|
144
144
|
return Fula.mkdir(path);
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
/**
|
|
148
|
-
* writeFileContent writes content at a given path
|
|
149
|
-
* @param path
|
|
150
|
-
* @returns string: new cid of the root
|
|
147
|
+
/**
|
|
148
|
+
* writeFileContent writes content at a given path
|
|
149
|
+
* @param path
|
|
150
|
+
* @returns string: new cid of the root
|
|
151
151
|
*/
|
|
152
152
|
export const writeFileContent = (path, content) => {
|
|
153
153
|
return Fula.writeFileContent(path, content);
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
/*
|
|
157
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
158
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
159
|
-
// It keeps the original file modiifcation date
|
|
160
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
161
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
162
|
-
// Returns: new cid of the root after this file is placed in the tree
|
|
156
|
+
/*
|
|
157
|
+
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
158
|
+
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
159
|
+
// It keeps the original file modiifcation date
|
|
160
|
+
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
161
|
+
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
162
|
+
// Returns: new cid of the root after this file is placed in the tree
|
|
163
163
|
*/
|
|
164
164
|
export const writeFile = (fulaTargetFilename, localFilename) => {
|
|
165
165
|
return Fula.writeFile(fulaTargetFilename, localFilename);
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
/**
|
|
169
|
-
* ls lists the name of files and folders at a given path
|
|
170
|
-
* @param path
|
|
171
|
-
* @returns string: list of items
|
|
172
|
-
* TODO: Findout how is the string and convert to array
|
|
168
|
+
/**
|
|
169
|
+
* ls lists the name of files and folders at a given path
|
|
170
|
+
* @param path
|
|
171
|
+
* @returns string: list of items
|
|
172
|
+
* TODO: Findout how is the string and convert to array
|
|
173
173
|
*/
|
|
174
174
|
export const ls = path => {
|
|
175
175
|
return Fula.ls(path).then(res => {
|
|
@@ -200,85 +200,85 @@ export const ls = path => {
|
|
|
200
200
|
});
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
-
/**
|
|
204
|
-
* rm removes all files and folders at a given path
|
|
205
|
-
* @param path
|
|
206
|
-
* @returns string: new cid of the root
|
|
203
|
+
/**
|
|
204
|
+
* rm removes all files and folders at a given path
|
|
205
|
+
* @param path
|
|
206
|
+
* @returns string: new cid of the root
|
|
207
207
|
*/
|
|
208
208
|
export const rm = path => {
|
|
209
209
|
return Fula.rm(path);
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
/**
|
|
213
|
-
* cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
214
|
-
* @param sourcePath, targetPath
|
|
215
|
-
* @returns string: new cid of the root
|
|
212
|
+
/**
|
|
213
|
+
* cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
214
|
+
* @param sourcePath, targetPath
|
|
215
|
+
* @returns string: new cid of the root
|
|
216
216
|
*/
|
|
217
217
|
export const cp = (sourcePath, targetPath) => {
|
|
218
218
|
return Fula.cp(sourcePath, targetPath);
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
-
/**
|
|
222
|
-
* mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
223
|
-
* @param sourcePath, targetPath
|
|
224
|
-
* @returns string: new cid of the root
|
|
221
|
+
/**
|
|
222
|
+
* mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
223
|
+
* @param sourcePath, targetPath
|
|
224
|
+
* @returns string: new cid of the root
|
|
225
225
|
*/
|
|
226
226
|
export const mv = (sourcePath, targetPath) => {
|
|
227
227
|
return Fula.mv(sourcePath, targetPath);
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
-
/*
|
|
231
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
232
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
233
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
234
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
235
|
-
// Returns: new cid of the root after this file is placed in the tree
|
|
230
|
+
/*
|
|
231
|
+
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
232
|
+
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
233
|
+
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
234
|
+
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
235
|
+
// Returns: new cid of the root after this file is placed in the tree
|
|
236
236
|
*/
|
|
237
237
|
export const readFile = (fulaTargetFilename, localFilename) => {
|
|
238
238
|
return Fula.readFile(fulaTargetFilename, localFilename);
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
/**
|
|
242
|
-
* readFile reads content of a given path
|
|
243
|
-
* @param path
|
|
244
|
-
* @returns string: cotent
|
|
241
|
+
/**
|
|
242
|
+
* readFile reads content of a given path
|
|
243
|
+
* @param path
|
|
244
|
+
* @returns string: cotent
|
|
245
245
|
*/
|
|
246
246
|
export const readFileContent = path => {
|
|
247
247
|
return Fula.readFileContent(path);
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
* Shutdown closes all resources used by Client.
|
|
252
|
-
// After calling this function Client must be discarded.
|
|
253
|
-
* @param
|
|
254
|
-
* @returns
|
|
250
|
+
/**
|
|
251
|
+
* Shutdown closes all resources used by Client.
|
|
252
|
+
// After calling this function Client must be discarded.
|
|
253
|
+
* @param
|
|
254
|
+
* @returns
|
|
255
255
|
*/
|
|
256
256
|
export const shutdown = () => {
|
|
257
257
|
return Fula.shutdown();
|
|
258
258
|
};
|
|
259
259
|
|
|
260
|
-
/**
|
|
261
|
-
* setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
|
|
262
|
-
* This can only be called on a peer that is added as an owner of blox by --authorizer parameter
|
|
263
|
-
* @param peerId, allow
|
|
264
|
-
* @returns boolean: true if successful or false if not
|
|
260
|
+
/**
|
|
261
|
+
* setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
|
|
262
|
+
* This can only be called on a peer that is added as an owner of blox by --authorizer parameter
|
|
263
|
+
* @param peerId, allow
|
|
264
|
+
* @returns boolean: true if successful or false if not
|
|
265
265
|
*/
|
|
266
266
|
export const setAuth = (peerId, allow) => {
|
|
267
267
|
return Fula.setAuth(peerId, allow);
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
/**
|
|
271
|
-
* isReady checks if the connection is ready to be used.
|
|
272
|
-
* @param filesystemCheck: also check if the wnfs is ready
|
|
273
|
-
* @returns boolean: true if ready or false if not
|
|
270
|
+
/**
|
|
271
|
+
* isReady checks if the connection is ready to be used.
|
|
272
|
+
* @param filesystemCheck: also check if the wnfs is ready
|
|
273
|
+
* @returns boolean: true if ready or false if not
|
|
274
274
|
*/
|
|
275
275
|
export const isReady = function () {
|
|
276
276
|
let filesystemCheck = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
277
277
|
return Fula.isReady(filesystemCheck);
|
|
278
278
|
};
|
|
279
279
|
|
|
280
|
-
/**
|
|
281
|
-
* replicate replicates data on the nework
|
|
280
|
+
/**
|
|
281
|
+
* replicate replicates data on the nework
|
|
282
282
|
*/
|
|
283
283
|
export const replicateRecentCids = async function (api, seed, poolId) {
|
|
284
284
|
let replicationNo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Fula","init","chainApiInit","batchUploadManifest","checkAccountBalance","getAccountIdFromSeed","registerLifecycleListener","console","log","identity","storePath","bloxAddr","exchange","autoFlush","arguments","length","undefined","rootCid","useRelay","refresh","initFula","newClient","logout","checkFailedActions","retry","timeout","listFailedActions","cids","listRecentCidsAsString","clearCidsFromRecent","checkConnection","get","key","has","push","testData","put","value","codec","mkdir","path","writeFileContent","content","writeFile","fulaTargetFilename","localFilename","ls","then","res","lsResult","lsRows","split","element","rowItems","item","name","created","modified","jsonRes","JSON","parse","stringify","catch","e","rm","cp","sourcePath","targetPath","mv","readFile","readFileContent","shutdown","setAuth","peerId","allow","isReady","filesystemCheck","replicateRecentCids","api","seed","poolId","replicationNo","status","msg","account","accountBal","recentCids","hash","_signedBlock$block","signedBlock","rpc","chain","getBlock","block","extrinsics","errorMessage","Error","message","toString"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["Fula","init","chainApiInit","batchUploadManifest","checkAccountBalance","getAccountIdFromSeed","registerLifecycleListener","console","log","identity","storePath","bloxAddr","exchange","autoFlush","arguments","length","undefined","rootCid","useRelay","refresh","initFula","newClient","logout","checkFailedActions","retry","timeout","listFailedActions","cids","listRecentCidsAsString","clearCidsFromRecent","checkConnection","get","key","has","push","testData","put","value","codec","mkdir","path","writeFileContent","content","writeFile","fulaTargetFilename","localFilename","ls","then","res","lsResult","lsRows","split","element","rowItems","item","name","created","modified","jsonRes","JSON","parse","stringify","catch","e","rm","cp","sourcePath","targetPath","mv","readFile","readFileContent","shutdown","setAuth","peerId","allow","isReady","filesystemCheck","replicateRecentCids","api","seed","poolId","replicationNo","status","msg","account","accountBal","recentCids","hash","_signedBlock$block","signedBlock","rpc","chain","getBlock","block","extrinsics","errorMessage","Error","message","toString"],"sourceRoot":"../../../src","sources":["protocols/fula.ts"],"mappings":"AAAA,OAAOA,IAAI,MAAM,gCAAgC;AACjD,SACEC,IAAI,IAAIC,YAAY,EACpBC,mBAAmB,EACnBC,mBAAmB,EACnBC,oBAAoB,QACf,aAAa;AAGpB;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAqB;EAC5DC,OAAO,CAACC,GAAG,CAAC,kCAAkC,CAAC;EAC/C,OAAOR,IAAI,CAACM,yB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iC,KAAK,EAAE;QACtB;QACAD,YAAY,GAAGhC,CAAC,CAACkC,OAAO;MAC1B,CAAC,MAAM;QACL;QACAF,YAAY,GAAGhC,CAAC,CAACmC,QAAQ,CAAC,CAAC;MAC7B;MACAhB,MAAM,GAAG,KAAK;MACdC,GAAG,GAAGY,YAAY;IACpB;EACF;;EAEA;EACA;EACA,OAAO;IAAEb,MAAM,EAAEA,MAAM;IAAEC,GAAG,EAAEA;EAAI,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Fula from '../interfaces/fulaNativeModule';
|
|
2
|
-
/**
|
|
3
|
-
* send a command to Blox hardware to remove all save wifis.
|
|
4
|
-
* @returns json{status:true if success, false if fails; msg: error message or success log}
|
|
2
|
+
/**
|
|
3
|
+
* send a command to Blox hardware to remove all save wifis.
|
|
4
|
+
* @returns json{status:true if success, false if fails; msg: error message or success log}
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export const wifiRemoveall = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Fula","wifiRemoveall","console","log","res2","then","res","jsonRes","JSON","parse","e","e2","catch","err","reboot","eraseBlData"],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":["Fula","wifiRemoveall","console","log","res2","then","res","jsonRes","JSON","parse","e","e2","catch","err","reboot","eraseBlData"],"sourceRoot":"../../../src","sources":["protocols/fxblox.ts"],"mappings":"AAAA,OAAOA,IAAI,MAAM,gCAAgC;AAGjD;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAA4C;EACvEC,OAAO,CAACC,GAAG,CAAC,uCAAuC,CAAC;EACpD,IAAIC,IAAI,GAAGJ,IAAI,CAACC,aAAa,CAAC,CAAC,CAC5BI,IAAI,CAAEC,GAAG,IAAK;IACb,IAAI;MACF,IAAIC,OAAoC,GAAGC,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MAC1D,OAAOC,OAA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E,EAAE;QACX,OAAOL,GAAG;MACZ;IACF;EACF,CAAC,CAAC,CACDM,KAAK,CAAEC,GAAG,IAAK;IACd,OAAOA,GAAG;EACZ,CAAC,CAAC;EACJ,OAAOT,IAAI;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/blockchain.ts"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/fxblox.ts"],"mappings":""}
|
|
@@ -5,6 +5,10 @@ export declare const disconnectApi: (api: ApiPromise) => Promise<void>;
|
|
|
5
5
|
export declare const batchUploadManifest: (api: ApiPromise | undefined, seed: string, cids_i: string[], poolId_i: number, replicationFactor_i?: number) => Promise<{
|
|
6
6
|
hash: string;
|
|
7
7
|
}>;
|
|
8
|
+
export declare const createHexSeedFromString: (seed: string) => Promise<string>;
|
|
9
|
+
export declare const getLocalAccount: (seed: string) => {
|
|
10
|
+
account: string;
|
|
11
|
+
};
|
|
8
12
|
export declare const listPools: (api: ApiPromise | undefined, start?: number, length?: number) => Promise<BType.PoolListResponse>;
|
|
9
13
|
export declare const checkJoinRequest: (api: ApiPromise | undefined, poolId: number, accountId: string) => Promise<BType.PoolRequest | null>;
|
|
10
14
|
export declare const getUserPool: (api: ApiPromise | undefined, accountId: string) => Promise<BType.PoolUsers | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-api.d.ts","sourceRoot":"","sources":["../../../src/protocols/chain-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAc,MAAM,eAAe,CAAC;AAGvD,OAAO,KAAK,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAMlD,eAAO,MAAM,IAAI,eACJ,MAAM,KAChB,QAAQ,UAAU,CAOpB,CAAC;AAEF,eAA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,CAAC;AAEF,eAAO,MAAM,uBAAuB,SAC5B,MAAM,KACX,QAAQ,MAAM,CAIhB,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAQ/D,CAAC;AAKF,eAAO,MAAM,SAAS,QACf,UAAU,GAAG,SAAS,UACpB,MAAM,WACL,MAAM,KACb,QAAQ,MAAM,gBAAgB,CAiChC,CAAC;AAKF,eAAO,MAAM,gBAAgB,QACtB,UAAU,GAAG,SAAS,UACnB,MAAM,aACH,MAAM,KAChB,QAAQ,MAAM,WAAW,GAAG,IAAI,CAuBlC,CAAC;AAEF,eAAO,MAAM,WAAW,QACjB,UAAU,GAAG,SAAS,aAChB,MAAM,KAChB,QAAQ,MAAM,SAAS,GAAG,IAAI,CAyBhC,CAAC;AAQF,eAAO,MAAM,mBAAmB,QACzB,UAAU,GAAG,SAAS,aAChB,MAAM,KAChB,QAAQ,MAAM,CAuBhB,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAgB,MAAM,KAAG,QAAQ,MAAM,CASvE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionland/react-native-fula",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
"@polkadot/typegen": "^10.10.1",
|
|
174
174
|
"@polkadot/util": "^10.2.6",
|
|
175
175
|
"@polkadot/util-crypto": "^10.2.6",
|
|
176
|
-
"text-encoding": "^0.7.0"
|
|
176
|
+
"text-encoding": "^0.7.0",
|
|
177
|
+
"yarn": "^1.22.21"
|
|
177
178
|
}
|
|
178
179
|
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
-
|
|
6
|
-
Pod::Spec.new do |s|
|
|
7
|
-
s.name = "react-native-fula"
|
|
8
|
-
s.version = package["version"]
|
|
9
|
-
s.summary = package["description"]
|
|
10
|
-
s.homepage = package["homepage"]
|
|
11
|
-
s.license = package["license"]
|
|
12
|
-
s.authors = package["author"]
|
|
13
|
-
|
|
14
|
-
s.platforms = { :ios => "13.0" }
|
|
15
|
-
s.source = { :git => "https://github.com/functionland/react-native-fula.git", :tag => "v#{s.version}" }
|
|
16
|
-
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
-
|
|
19
|
-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
-
install_modules_dependencies(s)
|
|
23
|
-
else
|
|
24
|
-
s.dependency "React-Core"
|
|
25
|
-
|
|
26
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
-
s.pod_target_xcconfig = {
|
|
30
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
-
}
|
|
34
|
-
s.dependency "React-Codegen"
|
|
35
|
-
s.dependency "RCT-Folly"
|
|
36
|
-
s.dependency "RCTRequired"
|
|
37
|
-
s.dependency "RCTTypeSafety"
|
|
38
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
s.dependency 'Fula','~> 1.
|
|
42
|
-
s.dependency "Wnfs", "1.1.1"
|
|
43
|
-
s.dependency 'CryptoSwift', '~> 1.7.1'
|
|
44
|
-
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
45
|
-
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
46
|
-
|
|
47
|
-
end
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "react-native-fula"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => "13.0" }
|
|
15
|
+
s.source = { :git => "https://github.com/functionland/react-native-fula.git", :tag => "v#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
+
|
|
19
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
else
|
|
24
|
+
s.dependency "React-Core"
|
|
25
|
+
|
|
26
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
s.pod_target_xcconfig = {
|
|
30
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
+
}
|
|
34
|
+
s.dependency "React-Codegen"
|
|
35
|
+
s.dependency "RCT-Folly"
|
|
36
|
+
s.dependency "RCTRequired"
|
|
37
|
+
s.dependency "RCTTypeSafety"
|
|
38
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
s.dependency 'Fula','~> 1.41.0'
|
|
42
|
+
s.dependency "Wnfs", "1.1.1"
|
|
43
|
+
s.dependency 'CryptoSwift', '~> 1.7.1'
|
|
44
|
+
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
45
|
+
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
|
|
46
|
+
|
|
47
|
+
end
|
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';
|