@functionland/react-native-fula 1.36.3 → 1.37.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/android/build.gradle +1 -1
- package/android/src/main/java/land/fx/fula/FulaModule.java +1537 -1535
- package/ios/Fula.mm +215 -215
- package/ios/Fula.swift +1334 -1334
- package/lib/commonjs/protocols/fula.js +107 -106
- package/lib/commonjs/protocols/fula.js.map +1 -1
- package/lib/module/protocols/fula.js +107 -106
- package/lib/module/protocols/fula.js.map +1 -1
- package/lib/typescript/protocols/fula.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/interfaces/fulaNativeModule.ts +141 -141
- package/src/protocols/fula.ts +427 -426
|
@@ -1,17 +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
|
+
console.log('called registerLifecycleListener');
|
|
7
8
|
return Fula.registerLifecycleListener();
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
12
|
-
// The key must be a valid ipld.Link.
|
|
13
|
-
* @param config
|
|
14
|
-
* @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
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -23,11 +24,11 @@ export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
|
23
24
|
return Fula.initFula(identity, storePath, bloxAddr, exchange, autoFlush, rootCid, useRelay, refresh);
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
/**
|
|
27
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
28
|
-
// The key must be a valid ipld.Link.
|
|
29
|
-
* @param config
|
|
30
|
-
* @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
|
|
31
32
|
*/
|
|
32
33
|
|
|
33
34
|
export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -38,17 +39,17 @@ export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
|
38
39
|
return Fula.newClient(identity, storePath, bloxAddr, exchange, autoFlush, useRelay, refresh);
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
/**
|
|
42
|
-
* rm removes all data
|
|
43
|
-
* @param path
|
|
44
|
-
* @returns string: new cid of the root
|
|
42
|
+
/**
|
|
43
|
+
* rm removes all data
|
|
44
|
+
* @param path
|
|
45
|
+
* @returns string: new cid of the root
|
|
45
46
|
*/
|
|
46
47
|
export const logout = (identity, storePath) => {
|
|
47
48
|
return Fula.logout(identity, storePath);
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
/**
|
|
51
|
-
* Checks if there are any un-synced changes on the device
|
|
51
|
+
/**
|
|
52
|
+
* Checks if there are any un-synced changes on the device
|
|
52
53
|
*/
|
|
53
54
|
export const checkFailedActions = function () {
|
|
54
55
|
let retry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -56,63 +57,63 @@ export const checkFailedActions = function () {
|
|
|
56
57
|
return Fula.checkFailedActions(retry, timeout);
|
|
57
58
|
};
|
|
58
59
|
|
|
59
|
-
/**
|
|
60
|
-
* 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
|
|
61
62
|
*/
|
|
62
63
|
export const listFailedActions = function () {
|
|
63
64
|
let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
64
65
|
return Fula.listFailedActions(cids);
|
|
65
66
|
};
|
|
66
67
|
|
|
67
|
-
/**
|
|
68
|
-
* Lists the cids that are recent
|
|
68
|
+
/**
|
|
69
|
+
* Lists the cids that are recent
|
|
69
70
|
*/
|
|
70
71
|
export const listRecentCidsAsString = () => {
|
|
71
72
|
return Fula.listRecentCidsAsString();
|
|
72
73
|
};
|
|
73
74
|
|
|
74
|
-
/**
|
|
75
|
-
* Clears the cids that ar recent
|
|
75
|
+
/**
|
|
76
|
+
* Clears the cids that ar recent
|
|
76
77
|
*/
|
|
77
78
|
export const clearCidsFromRecent = function () {
|
|
78
79
|
let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
79
80
|
return Fula.clearCidsFromRecent(cids);
|
|
80
81
|
};
|
|
81
82
|
|
|
82
|
-
/**
|
|
83
|
-
* Checks if there are any un-synced changes on the device
|
|
83
|
+
/**
|
|
84
|
+
* Checks if there are any un-synced changes on the device
|
|
84
85
|
*/
|
|
85
86
|
export const checkConnection = function () {
|
|
86
87
|
let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20;
|
|
87
88
|
return Fula.checkConnection(timeout);
|
|
88
89
|
};
|
|
89
90
|
|
|
90
|
-
/**
|
|
91
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
92
|
-
// The key must be a valid ipld.Link.
|
|
93
|
-
* @param key
|
|
94
|
-
* @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
|
|
95
96
|
*/
|
|
96
97
|
export const get = key => {
|
|
97
98
|
return Fula.get(key);
|
|
98
99
|
};
|
|
99
100
|
|
|
100
|
-
/**
|
|
101
|
-
* Has checks whether the value corresponding to the given key is present in the local datastore.
|
|
102
|
-
// The key must be a valid ipld.Link.
|
|
103
|
-
* @param key
|
|
104
|
-
* @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
|
|
105
106
|
*/
|
|
106
107
|
export const has = key => {
|
|
107
108
|
return Fula.has(key);
|
|
108
109
|
};
|
|
109
110
|
|
|
110
|
-
/**
|
|
111
|
-
* Push requests the given addr to download the root cid from this node.
|
|
112
|
-
// The addr must be a valid multiaddr that includes peer ID.
|
|
113
|
-
// this function.
|
|
114
|
-
* @param addr
|
|
115
|
-
* @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
|
|
116
117
|
*/
|
|
117
118
|
export const push = () => {
|
|
118
119
|
return Fula.push();
|
|
@@ -123,52 +124,52 @@ export const testData = (identity, bloxAddr) => {
|
|
|
123
124
|
return Fula.testData(identity, bloxAddr);
|
|
124
125
|
};
|
|
125
126
|
|
|
126
|
-
/**
|
|
127
|
-
* Put stores the given key value onto the local datastore.
|
|
128
|
-
// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
|
|
129
|
-
// to the given key.
|
|
130
|
-
* @param key, value
|
|
131
|
-
* @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
|
|
132
133
|
*/
|
|
133
134
|
export const put = (value, codec) => {
|
|
134
135
|
return Fula.put(value, codec);
|
|
135
136
|
};
|
|
136
137
|
|
|
137
|
-
/**
|
|
138
|
-
* mkdir creates a directory at the given path.
|
|
139
|
-
* @param path
|
|
140
|
-
* @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
|
|
141
142
|
*/
|
|
142
143
|
export const mkdir = path => {
|
|
143
144
|
return Fula.mkdir(path);
|
|
144
145
|
};
|
|
145
146
|
|
|
146
|
-
/**
|
|
147
|
-
* writeFileContent writes content at a given path
|
|
148
|
-
* @param path
|
|
149
|
-
* @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
|
|
150
151
|
*/
|
|
151
152
|
export const writeFileContent = (path, content) => {
|
|
152
153
|
return Fula.writeFileContent(path, content);
|
|
153
154
|
};
|
|
154
155
|
|
|
155
|
-
/*
|
|
156
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
157
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
158
|
-
// It keeps the original file modiifcation date
|
|
159
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
160
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
161
|
-
// 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
|
|
162
163
|
*/
|
|
163
164
|
export const writeFile = (fulaTargetFilename, localFilename) => {
|
|
164
165
|
return Fula.writeFile(fulaTargetFilename, localFilename);
|
|
165
166
|
};
|
|
166
167
|
|
|
167
|
-
/**
|
|
168
|
-
* ls lists the name of files and folders at a given path
|
|
169
|
-
* @param path
|
|
170
|
-
* @returns string: list of items
|
|
171
|
-
* 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
|
|
172
173
|
*/
|
|
173
174
|
export const ls = path => {
|
|
174
175
|
return Fula.ls(path).then(res => {
|
|
@@ -199,85 +200,85 @@ export const ls = path => {
|
|
|
199
200
|
});
|
|
200
201
|
};
|
|
201
202
|
|
|
202
|
-
/**
|
|
203
|
-
* rm removes all files and folders at a given path
|
|
204
|
-
* @param path
|
|
205
|
-
* @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
|
|
206
207
|
*/
|
|
207
208
|
export const rm = path => {
|
|
208
209
|
return Fula.rm(path);
|
|
209
210
|
};
|
|
210
211
|
|
|
211
|
-
/**
|
|
212
|
-
* cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
213
|
-
* @param sourcePath, targetPath
|
|
214
|
-
* @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
|
|
215
216
|
*/
|
|
216
217
|
export const cp = (sourcePath, targetPath) => {
|
|
217
218
|
return Fula.cp(sourcePath, targetPath);
|
|
218
219
|
};
|
|
219
220
|
|
|
220
|
-
/**
|
|
221
|
-
* mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
222
|
-
* @param sourcePath, targetPath
|
|
223
|
-
* @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
|
|
224
225
|
*/
|
|
225
226
|
export const mv = (sourcePath, targetPath) => {
|
|
226
227
|
return Fula.mv(sourcePath, targetPath);
|
|
227
228
|
};
|
|
228
229
|
|
|
229
|
-
/*
|
|
230
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
231
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
232
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
233
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
234
|
-
// 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
|
|
235
236
|
*/
|
|
236
237
|
export const readFile = (fulaTargetFilename, localFilename) => {
|
|
237
238
|
return Fula.readFile(fulaTargetFilename, localFilename);
|
|
238
239
|
};
|
|
239
240
|
|
|
240
|
-
/**
|
|
241
|
-
* readFile reads content of a given path
|
|
242
|
-
* @param path
|
|
243
|
-
* @returns string: cotent
|
|
241
|
+
/**
|
|
242
|
+
* readFile reads content of a given path
|
|
243
|
+
* @param path
|
|
244
|
+
* @returns string: cotent
|
|
244
245
|
*/
|
|
245
246
|
export const readFileContent = path => {
|
|
246
247
|
return Fula.readFileContent(path);
|
|
247
248
|
};
|
|
248
249
|
|
|
249
|
-
/**
|
|
250
|
-
* Shutdown closes all resources used by Client.
|
|
251
|
-
// After calling this function Client must be discarded.
|
|
252
|
-
* @param
|
|
253
|
-
* @returns
|
|
250
|
+
/**
|
|
251
|
+
* Shutdown closes all resources used by Client.
|
|
252
|
+
// After calling this function Client must be discarded.
|
|
253
|
+
* @param
|
|
254
|
+
* @returns
|
|
254
255
|
*/
|
|
255
256
|
export const shutdown = () => {
|
|
256
257
|
return Fula.shutdown();
|
|
257
258
|
};
|
|
258
259
|
|
|
259
|
-
/**
|
|
260
|
-
* setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
|
|
261
|
-
* This can only be called on a peer that is added as an owner of blox by --authorizer parameter
|
|
262
|
-
* @param peerId, allow
|
|
263
|
-
* @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
|
|
264
265
|
*/
|
|
265
266
|
export const setAuth = (peerId, allow) => {
|
|
266
267
|
return Fula.setAuth(peerId, allow);
|
|
267
268
|
};
|
|
268
269
|
|
|
269
|
-
/**
|
|
270
|
-
* isReady checks if the connection is ready to be used.
|
|
271
|
-
* @param filesystemCheck: also check if the wnfs is ready
|
|
272
|
-
* @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
|
|
273
274
|
*/
|
|
274
275
|
export const isReady = function () {
|
|
275
276
|
let filesystemCheck = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
276
277
|
return Fula.isReady(filesystemCheck);
|
|
277
278
|
};
|
|
278
279
|
|
|
279
|
-
/**
|
|
280
|
-
* replicate replicates data on the nework
|
|
280
|
+
/**
|
|
281
|
+
* replicate replicates data on the nework
|
|
281
282
|
*/
|
|
282
283
|
export const replicateRecentCids = async function (api, seed, poolId) {
|
|
283
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","identity","storePath","bloxAddr","exchange","autoFlush","arguments","length","undefined","rootCid","useRelay","refresh","
|
|
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,SA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AY,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fula.d.ts","sourceRoot":"","sources":["../../../src/protocols/fula.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,QAAQ,IAAI,
|
|
1
|
+
{"version":3,"file":"fula.d.ts","sourceRoot":"","sources":["../../../src/protocols/fula.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,QAAQ,IAAI,CAGxD,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,aACL,MAAM,aACL,MAAM,YACP,MAAM,YACN,MAAM,cACL,OAAO,YACT,MAAM,GAAG,IAAI,aACZ,OAAO,YACR,OAAO;YACG,MAAM;aAAW,MAAM;EAoB3C,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,SAAS,aACV,MAAM,aACL,MAAM,YACP,MAAM,YACN,MAAM,cACL,OAAO,aACR,OAAO,YACR,OAAO,KACf,QAAQ,MAAM,CAoBhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,aACP,MAAM,aACL,MAAM,KAChB,QAAQ,OAAO,CAEjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,WACtB,OAAO,YACL,MAAM,KACd,QAAQ,OAAO,CAEjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAU,MAAM,EAAE,KAAQ,QAAQ,MAAM,EAAE,C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AO,MAAM,EAAE,eAAgB,MAAM,cAAc,MAAM,KAAG,QAAQ,MAAM,CAEzE,CAAC;AASF,eAAO,MAAM,QAAQ,uBACC,MAAM,iBACX,MAAM,KACpB,QAAQ,MAAM,CAEhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,QAAQ,MAAM,CAE5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,QAAQ,IAAI,CAEvC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,WAAY,MAAM,SAAS,OAAO,KAAG,QAAQ,OAAO,CAEvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,qBAAqB,OAAO,KAAU,QAAQ,OAAO,CAExE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,QACzB,UAAU,QACT,MAAM,UACJ,MAAM,kBACC,MAAM;YACF,OAAO;SAAO,MAAM;EA0ExC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionland/react-native-fula",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
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",
|