@functionland/react-native-fula 1.39.2 → 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 (86) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +226 -226
  3. package/android/build.gradle +1 -1
  4. package/android/gradle.properties +5 -5
  5. package/android/src/main/AndroidManifest.xml +3 -3
  6. package/android/src/main/AndroidManifestNew.xml +2 -2
  7. package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
  8. package/android/src/main/java/land/fx/fula/Cryptography.java +62 -62
  9. package/android/src/main/java/land/fx/fula/FulaModule.java +8 -6
  10. package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
  11. package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
  12. package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
  13. package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
  14. package/ios/Cryptography.swift +49 -49
  15. package/ios/Fula-Bridging-Header.h +3 -3
  16. package/ios/Fula.mm +166 -215
  17. package/ios/Fula.swift +1289 -1334
  18. package/ios/UserDataHelper.swift +143 -143
  19. package/lib/commonjs/index.js.map +1 -1
  20. package/lib/commonjs/interfaces/augment-api-errors.js.map +1 -1
  21. package/lib/commonjs/interfaces/augment-api-rpc.js.map +1 -1
  22. package/lib/commonjs/interfaces/augment-api-runtime.js.map +1 -1
  23. package/lib/commonjs/interfaces/augment-api.js.map +1 -1
  24. package/lib/commonjs/interfaces/augment-types.js.map +1 -1
  25. package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
  26. package/lib/commonjs/interfaces/index.js.map +1 -1
  27. package/lib/commonjs/interfaces/lookup.js +278 -278
  28. package/lib/commonjs/interfaces/lookup.js.map +1 -1
  29. package/lib/commonjs/interfaces/registry.js.map +1 -1
  30. package/lib/commonjs/interfaces/types-lookup.js.map +1 -1
  31. package/lib/commonjs/interfaces/types.js.map +1 -1
  32. package/lib/commonjs/protocols/blockchain.js +6 -2
  33. package/lib/commonjs/protocols/blockchain.js.map +1 -1
  34. package/lib/commonjs/protocols/chain-api.js +39 -10
  35. package/lib/commonjs/protocols/chain-api.js.map +1 -1
  36. package/lib/commonjs/protocols/fula.js +128 -114
  37. package/lib/commonjs/protocols/fula.js.map +1 -1
  38. package/lib/commonjs/protocols/fxblox.js +3 -3
  39. package/lib/commonjs/protocols/fxblox.js.map +1 -1
  40. package/lib/commonjs/types/blockchain.js.map +1 -1
  41. package/lib/commonjs/types/fxblox.js.map +1 -1
  42. package/lib/module/index.js.map +1 -1
  43. package/lib/module/interfaces/augment-api-errors.js.map +1 -1
  44. package/lib/module/interfaces/augment-api-rpc.js.map +1 -1
  45. package/lib/module/interfaces/augment-api-runtime.js.map +1 -1
  46. package/lib/module/interfaces/augment-api.js.map +1 -1
  47. package/lib/module/interfaces/augment-types.js.map +1 -1
  48. package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
  49. package/lib/module/interfaces/index.js.map +1 -1
  50. package/lib/module/interfaces/lookup.js +278 -278
  51. package/lib/module/interfaces/lookup.js.map +1 -1
  52. package/lib/module/interfaces/registry.js.map +1 -1
  53. package/lib/module/interfaces/types-lookup.js.map +1 -1
  54. package/lib/module/interfaces/types.js.map +1 -1
  55. package/lib/module/protocols/blockchain.js +6 -2
  56. package/lib/module/protocols/blockchain.js.map +1 -1
  57. package/lib/module/protocols/chain-api.js +35 -8
  58. package/lib/module/protocols/chain-api.js.map +1 -1
  59. package/lib/module/protocols/fula.js +128 -114
  60. package/lib/module/protocols/fula.js.map +1 -1
  61. package/lib/module/protocols/fxblox.js +3 -3
  62. package/lib/module/protocols/fxblox.js.map +1 -1
  63. package/lib/module/types/blockchain.js.map +1 -1
  64. package/lib/module/types/fxblox.js.map +1 -1
  65. package/lib/typescript/interfaces/fulaNativeModule.d.ts +2 -2
  66. package/lib/typescript/protocols/chain-api.d.ts +4 -0
  67. package/lib/typescript/protocols/chain-api.d.ts.map +1 -1
  68. package/package.json +3 -2
  69. package/react-native-fula.podspec +47 -47
  70. package/src/index.tsx +4 -4
  71. package/src/interfaces/augment-api-errors.ts +449 -449
  72. package/src/interfaces/augment-api-rpc.ts +617 -617
  73. package/src/interfaces/augment-api-runtime.ts +224 -224
  74. package/src/interfaces/augment-api.ts +10 -10
  75. package/src/interfaces/augment-types.ts +1230 -1230
  76. package/src/interfaces/fulaNativeModule.ts +2 -2
  77. package/src/interfaces/index.ts +4 -4
  78. package/src/interfaces/lookup.ts +1889 -1889
  79. package/src/interfaces/registry.ts +152 -152
  80. package/src/interfaces/types-lookup.ts +2043 -2043
  81. package/src/interfaces/types.ts +3 -3
  82. package/src/protocols/blockchain.ts +2 -2
  83. package/src/protocols/chain-api.ts +19 -1
  84. package/src/protocols/fula.ts +427 -427
  85. package/src/protocols/fxblox.ts +70 -70
  86. package/src/types/fxblox.ts +13 -13
@@ -1,107 +1,119 @@
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
- export const init = (identity, storePath, bloxAddr, exchange, autoFlush = false, rootCid = null, useRelay = true, refresh = false) => {
18
+ export const init = function (identity, storePath, bloxAddr, exchange) {
19
+ let autoFlush = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
20
+ let rootCid = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
21
+ let useRelay = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;
22
+ let refresh = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
19
23
  console.log('init in react-native started', identity, storePath, bloxAddr, exchange, autoFlush, useRelay);
20
24
  return Fula.initFula(identity, storePath, bloxAddr, exchange, autoFlush, rootCid, useRelay, refresh);
21
25
  };
22
26
 
23
- /**
24
- * Get gets the value corresponding to the given key from the local datastore.
25
- // The key must be a valid ipld.Link.
26
- * @param config
27
- * @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
28
32
  */
29
33
 
30
- export const newClient = (identity, storePath, bloxAddr, exchange, autoFlush = false, useRelay = true, refresh = false) => {
34
+ export const newClient = function (identity, storePath, bloxAddr, exchange) {
35
+ let autoFlush = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
36
+ let useRelay = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
37
+ let refresh = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
31
38
  console.log('newClient in react-native started', identity, storePath, bloxAddr, exchange, autoFlush, useRelay, refresh);
32
39
  return Fula.newClient(identity, storePath, bloxAddr, exchange, autoFlush, useRelay, refresh);
33
40
  };
34
41
 
35
- /**
36
- * rm removes all data
37
- * @param path
38
- * @returns string: new cid of the root
42
+ /**
43
+ * rm removes all data
44
+ * @param path
45
+ * @returns string: new cid of the root
39
46
  */
40
47
  export const logout = (identity, storePath) => {
41
48
  return Fula.logout(identity, storePath);
42
49
  };
43
50
 
44
- /**
45
- * Checks if there are any un-synced changes on the device
51
+ /**
52
+ * Checks if there are any un-synced changes on the device
46
53
  */
47
- export const checkFailedActions = (retry = false, timeout = 20) => {
54
+ export const checkFailedActions = function () {
55
+ let retry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
56
+ let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;
48
57
  return Fula.checkFailedActions(retry, timeout);
49
58
  };
50
59
 
51
- /**
52
- * 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
53
62
  */
54
- export const listFailedActions = (cids = []) => {
63
+ export const listFailedActions = function () {
64
+ let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
55
65
  return Fula.listFailedActions(cids);
56
66
  };
57
67
 
58
- /**
59
- * Lists the cids that are recent
68
+ /**
69
+ * Lists the cids that are recent
60
70
  */
61
71
  export const listRecentCidsAsString = () => {
62
72
  return Fula.listRecentCidsAsString();
63
73
  };
64
74
 
65
- /**
66
- * Clears the cids that ar recent
75
+ /**
76
+ * Clears the cids that ar recent
67
77
  */
68
- export const clearCidsFromRecent = (cids = []) => {
78
+ export const clearCidsFromRecent = function () {
79
+ let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
69
80
  return Fula.clearCidsFromRecent(cids);
70
81
  };
71
82
 
72
- /**
73
- * Checks if there are any un-synced changes on the device
83
+ /**
84
+ * Checks if there are any un-synced changes on the device
74
85
  */
75
- export const checkConnection = (timeout = 20) => {
86
+ export const checkConnection = function () {
87
+ let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20;
76
88
  return Fula.checkConnection(timeout);
77
89
  };
78
90
 
79
- /**
80
- * Get gets the value corresponding to the given key from the local datastore.
81
- // The key must be a valid ipld.Link.
82
- * @param key
83
- * @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
84
96
  */
85
97
  export const get = key => {
86
98
  return Fula.get(key);
87
99
  };
88
100
 
89
- /**
90
- * Has checks whether the value corresponding to the given key is present in the local datastore.
91
- // The key must be a valid ipld.Link.
92
- * @param key
93
- * @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
94
106
  */
95
107
  export const has = key => {
96
108
  return Fula.has(key);
97
109
  };
98
110
 
99
- /**
100
- * Push requests the given addr to download the root cid from this node.
101
- // The addr must be a valid multiaddr that includes peer ID.
102
- // this function.
103
- * @param addr
104
- * @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
105
117
  */
106
118
  export const push = () => {
107
119
  return Fula.push();
@@ -112,52 +124,52 @@ export const testData = (identity, bloxAddr) => {
112
124
  return Fula.testData(identity, bloxAddr);
113
125
  };
114
126
 
115
- /**
116
- * Put stores the given key value onto the local datastore.
117
- // The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
118
- // to the given key.
119
- * @param key, value
120
- * @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
121
133
  */
122
134
  export const put = (value, codec) => {
123
135
  return Fula.put(value, codec);
124
136
  };
125
137
 
126
- /**
127
- * mkdir creates a directory at the given path.
128
- * @param path
129
- * @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
130
142
  */
131
143
  export const mkdir = path => {
132
144
  return Fula.mkdir(path);
133
145
  };
134
146
 
135
- /**
136
- * writeFileContent writes content at a given path
137
- * @param path
138
- * @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
139
151
  */
140
152
  export const writeFileContent = (path, content) => {
141
153
  return Fula.writeFileContent(path, content);
142
154
  };
143
155
 
144
- /*
145
- // reads content of the file form localFilename (should include full absolute path to local file with read permission
146
- // writes content to the specified location by fulaTargetFilename in Fula filesystem
147
- // It keeps the original file modiifcation date
148
- // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
149
- // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
150
- // 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
151
163
  */
152
164
  export const writeFile = (fulaTargetFilename, localFilename) => {
153
165
  return Fula.writeFile(fulaTargetFilename, localFilename);
154
166
  };
155
167
 
156
- /**
157
- * ls lists the name of files and folders at a given path
158
- * @param path
159
- * @returns string: list of items
160
- * 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
161
173
  */
162
174
  export const ls = path => {
163
175
  return Fula.ls(path).then(res => {
@@ -188,86 +200,88 @@ export const ls = path => {
188
200
  });
189
201
  };
190
202
 
191
- /**
192
- * rm removes all files and folders at a given path
193
- * @param path
194
- * @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
195
207
  */
196
208
  export const rm = path => {
197
209
  return Fula.rm(path);
198
210
  };
199
211
 
200
- /**
201
- * cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
202
- * @param sourcePath, targetPath
203
- * @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
204
216
  */
205
217
  export const cp = (sourcePath, targetPath) => {
206
218
  return Fula.cp(sourcePath, targetPath);
207
219
  };
208
220
 
209
- /**
210
- * mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
211
- * @param sourcePath, targetPath
212
- * @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
213
225
  */
214
226
  export const mv = (sourcePath, targetPath) => {
215
227
  return Fula.mv(sourcePath, targetPath);
216
228
  };
217
229
 
218
- /*
219
- // reads content of the file form localFilename (should include full absolute path to local file with read permission
220
- // writes content to the specified location by fulaTargetFilename in Fula filesystem
221
- // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
222
- // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
223
- // 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
224
236
  */
225
237
  export const readFile = (fulaTargetFilename, localFilename) => {
226
238
  return Fula.readFile(fulaTargetFilename, localFilename);
227
239
  };
228
240
 
229
- /**
230
- * readFile reads content of a given path
231
- * @param path
232
- * @returns string: cotent
241
+ /**
242
+ * readFile reads content of a given path
243
+ * @param path
244
+ * @returns string: cotent
233
245
  */
234
246
  export const readFileContent = path => {
235
247
  return Fula.readFileContent(path);
236
248
  };
237
249
 
238
- /**
239
- * Shutdown closes all resources used by Client.
240
- // After calling this function Client must be discarded.
241
- * @param
242
- * @returns
250
+ /**
251
+ * Shutdown closes all resources used by Client.
252
+ // After calling this function Client must be discarded.
253
+ * @param
254
+ * @returns
243
255
  */
244
256
  export const shutdown = () => {
245
257
  return Fula.shutdown();
246
258
  };
247
259
 
248
- /**
249
- * setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
250
- * This can only be called on a peer that is added as an owner of blox by --authorizer parameter
251
- * @param peerId, allow
252
- * @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
253
265
  */
254
266
  export const setAuth = (peerId, allow) => {
255
267
  return Fula.setAuth(peerId, allow);
256
268
  };
257
269
 
258
- /**
259
- * isReady checks if the connection is ready to be used.
260
- * @param filesystemCheck: also check if the wnfs is ready
261
- * @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
262
274
  */
263
- export const isReady = (filesystemCheck = true) => {
275
+ export const isReady = function () {
276
+ let filesystemCheck = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
264
277
  return Fula.isReady(filesystemCheck);
265
278
  };
266
279
 
267
- /**
268
- * replicate replicates data on the nework
280
+ /**
281
+ * replicate replicates data on the nework
269
282
  */
270
- export const replicateRecentCids = async (api, seed, poolId, replicationNo = 4) => {
283
+ export const replicateRecentCids = async function (api, seed, poolId) {
284
+ let replicationNo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 4;
271
285
  let status = true;
272
286
  let msg = '';
273
287
  if (!api) {
@@ -1 +1 @@
1
- {"version":3,"names":["Fula","init","chainApiInit","batchUploadManifest","checkAccountBalance","getAccountIdFromSeed","registerLifecycleListener","console","log","identity","storePath","bloxAddr","exchange","autoFlush","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","length","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,yBAAyB,CAAC,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAML,IAAI,GAAGA,CAClBQ,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAChBC,SAAkB,GAAG,KAAK,EAC1BC,OAAsB,GAAG,IAAI,EAC7BC,QAAiB,GAAG,IAAI,EACxBC,OAAgB,GAAG,KAAK,KACyB;EACjDT,OAAO,CAACC,GAAG,CACT,8BAA8B,EAC9BC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTE,QACF,CAAC;EACD,OAAOf,IAAI,CAACiB,QAAQ,CAClBR,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,OAAO,EACPC,QAAQ,EACRC,OACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAME,SAAS,GAAGA,CACvBT,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAChBC,SAAkB,GAAG,KAAK,EAC1BE,QAAiB,GAAG,IAAI,EACxBC,OAAgB,GAAG,KAAK,KACJ;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cAAAN,kBAAA,eAA9BA,kBAAA,CAAgCO,MAAM,EAAE;cAC1C,MAAMlE,mBAAmB,CAACyD,UAAU,CAAC;cACrCH,GAAG,GAAGnC,GAAG,CAACuC,IAAI;YAChB,CAAC,MAAM;cACLL,MAAM,GAAG,KAAK;cACdC,GAAG,GAAG,yBAAyB;YACjC;UACF,CAAC,MAAM;YACLD,MAAM,GAAG,KAAK;YACdC,GAAG,GAAG,sBAAsB;UAC9B;QACF,CAAC,MAAM;UACLD,MAAM,GAAG,KAAK;UACdC,GAAG,GAAG,sBAAsB;QAC9B;MACF,CAAC,MAAM;QACLD,MAAM,GAAG,KAAK;QACdC,GAAG,GAAG,0DAA0D;MAClE;IACF,CAAC,CAAC,OAAOpB,CAAM,EAAE;MACfrD,OAAO,CAACC,GAAG,CAAC,YAAY,CAAC;MACzBD,OAAO,CAACC,GAAG,CAACoD,CAAC,CAAC;MACd,IAAIiC,YAAY,GAAG,EAAE;MAErB,IAAIjC,CAAC,YAAYkC,KAAK,EAAE;QACtB;QACAD,YAAY,GAAGjC,CAAC,CAACmC,OAAO;MAC1B,CAAC,MAAM;QACL;QACAF,YAAY,GAAGjC,CAAC,CAACoC,QAAQ,CAAC,CAAC;MAC7B;MACAjB,MAAM,GAAG,KAAK;MACdC,GAAG,GAAGa,YAAY;IACpB;EACF;;EAEA;EACA;EACA,OAAO;IAAEd,MAAM,EAAEA,MAAM;IAAEC,GAAG,EAAEA;EAAI,CAAC,CAAC,CAAC;AACvC,CAAC"}
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,yBAAyB,CAAC,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAML,IAAI,GAAG,SAAAA,CAClBQ,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAKiC;EAAA,IAJjDC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IAC1BG,OAAsB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IAC7BI,QAAiB,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IACxBK,OAAgB,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAExBP,OAAO,CAACC,GAAG,CACT,8BAA8B,EAC9BC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTK,QACF,CAAC;EACD,OA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CAACyD,UAAU,CAAC;cACrCH,GAAG,GAAGnC,GAAG,CAACuC,IAAI;YAChB,CAAC,MAAM;cACLL,MAAM,GAAG,KAAK;cACdC,GAAG,GAAG,yBAAyB;YACjC;UACF,CAAC,MAAM;YACLD,MAAM,GAAG,KAAK;YACdC,GAAG,GAAG,sBAAsB;UAC9B;QACF,CAAC,MAAM;UACLD,MAAM,GAAG,KAAK;UACdC,GAAG,GAAG,sBAAsB;QAC9B;MACF,CAAC,MAAM;QACLD,MAAM,GAAG,KAAK;QACdC,GAAG,GAAG,0DAA0D;MAClE;IACF,CAAC,CAAC,OAAOpB,CAAM,EAAE;MACfxD,OAAO,CAACC,GAAG,CAAC,YAAY,CAAC;MACzBD,OAAO,CAACC,GAAG,CAACuD,CAAC,CAAC;MACd,IAAIgC,YAAY,GAAG,EAAE;MAErB,IAAIhC,CAAC,YAAYiC,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":"..\\..\\..\\src","sources":["protocols/fxbl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AO,CAACC,GAAG,CAAC,qCAAqC,CAAC;EAClD,IAAIC,IAAI,GAAGJ,IAAI,CAACe,WAAW,CAAC,CAAC,CAC1BV,IAAI,CAAEC,GAAG,IAAK;IACb,IAAI;MACF,IAAIC,OAAkC,GAAGC,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxD,OAAOC,OAAO;IAChB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAI;QACF,OAAOF,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxB,CAAC,CAAC,OAAOK,EAAE,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
+ {"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,OAAO;IAChB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAI;QACF,OAAOF,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxB,CAAC,CAAC,OAAOK,EAAE,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;AAED,OAAO,MAAMU,MAAM,GAAGA,CAAA,KAAqC;EACzDZ,OAAO,CAACC,GAAG,CAAC,gCAAgC,CAAC;EAC7C,IAAIC,IAAI,GAAGJ,IAAI,CAACc,MAAM,CAAC,CAAC,CACrBT,IAAI,CAAEC,GAAG,IAAK;IACb,IAAI;MACF,IAAIC,OAA6B,GAAGC,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACnD,OAAOC,OAAO;IAChB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAI;QACF,OAAOF,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxB,CAAC,CAAC,OAAOK,EAAE,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;AAED,OAAO,MAAMW,WAAW,GAAGA,CAAA,KAAqC;EAC9Db,OAAO,CAACC,GAAG,CAAC,qCAAqC,CAAC;EAClD,IAAIC,IAAI,GAAGJ,IAAI,CAACe,WAAW,CAAC,CAAC,CAC1BV,IAAI,CAAEC,GAAG,IAAK;IACb,IAAI;MACF,IAAIC,OAAkC,GAAGC,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxD,OAAOC,OAAO;IAChB,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAI;QACF,OAAOF,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;MACxB,CAAC,CAAC,OAAOK,EAAE,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":"..\\..\\..\\src","sources":["types/blockchain.ts"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/blockchain.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/fxblox.ts"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/fxblox.ts"],"mappings":""}
@@ -46,8 +46,8 @@ interface FulaNativeModule {
46
46
  createPool: (seed: string, poolName: string) => Promise<string>;
47
47
  listPools: () => Promise<string>;
48
48
  joinPool: (poolID: string) => Promise<string>;
49
- leavePool: (poolID: number) => Promise<string>;
50
- cancelPoolJoin: (poolID: number) => Promise<string>;
49
+ leavePool: (poolID: string) => Promise<string>;
50
+ cancelPoolJoin: (poolID: string) => Promise<string>;
51
51
  listPoolJoinRequests: (poolID: number) => Promise<string>;
52
52
  votePoolJoinRequest: (seed: string, poolID: number, account: string, accept: boolean) => Promise<string>;
53
53
  newReplicationRequest: (seed: string, poolID: number, replicationFactor: number, cid: string) => Promise<string>;
@@ -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,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N,MAAM,wBACK,MAAM,KAC1B,QAAQ;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CA2D1B,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.39.2",
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.0.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
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';