@ethersphere/bee-js 4.1.0 → 5.0.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 +2 -2
- package/dist/cjs/{src/bee-debug.js → bee-debug.js} +8 -4
- package/dist/cjs/{src/bee.js → bee.js} +9 -3
- package/dist/cjs/{src/chunk → chunk}/bmt.js +0 -0
- package/dist/cjs/{src/chunk → chunk}/cac.js +0 -0
- package/dist/cjs/{src/chunk → chunk}/serialize.js +0 -0
- package/dist/cjs/{src/chunk → chunk}/signer.js +0 -0
- package/dist/cjs/{src/chunk → chunk}/soc.js +5 -1
- package/dist/cjs/{src/chunk → chunk}/span.js +0 -0
- package/dist/cjs/{src/feed → feed}/identifier.js +0 -0
- package/dist/cjs/{src/feed → feed}/index.js +5 -1
- package/dist/cjs/{src/feed → feed}/json.js +0 -0
- package/dist/cjs/{src/feed → feed}/retrievable.js +0 -0
- package/dist/cjs/{src/feed → feed}/topic.js +0 -0
- package/dist/cjs/{src/feed → feed}/type.js +0 -0
- package/dist/cjs/{src/index.js → index.js} +5 -1
- package/dist/cjs/{src/modules → modules}/bytes.js +0 -0
- package/dist/cjs/{src/modules → modules}/bzz.js +0 -0
- package/dist/cjs/{src/modules → modules}/chunk.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/balance.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/chequebook.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/chunk.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/connectivity.js +2 -2
- package/dist/cjs/{src/modules → modules}/debug/settlements.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/stamps.js +1 -1
- package/dist/cjs/{src/modules → modules}/debug/states.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/status.js +3 -3
- package/dist/cjs/{src/modules → modules}/debug/tag.js +0 -0
- package/dist/cjs/{src/modules → modules}/debug/transactions.js +0 -0
- package/dist/cjs/{src/modules → modules}/feed.js +0 -0
- package/dist/cjs/{src/modules → modules}/pinning.js +1 -5
- package/dist/cjs/{src/modules → modules}/pss.js +0 -0
- package/dist/cjs/{src/modules → modules}/soc.js +0 -0
- package/dist/cjs/{src/modules → modules}/status.js +0 -0
- package/dist/cjs/{src/modules → modules}/stewardship.js +0 -0
- package/dist/cjs/{src/modules → modules}/tag.js +0 -0
- package/dist/cjs/{src/types → types}/debug.js +0 -0
- package/dist/cjs/{src/types → types}/index.js +5 -1
- package/dist/cjs/{src/types → types}/ky-options.js +0 -0
- package/dist/cjs/{src/types → types}/ky-universal/common.js +0 -0
- package/dist/cjs/{src/types → types}/ky-universal/hooks.js +0 -0
- package/dist/cjs/{src/types → types}/ky-universal/retry.js +0 -0
- package/dist/cjs/{src/utils → utils}/bytes.js +0 -0
- package/dist/cjs/{src/utils → utils}/collection.browser.js +0 -0
- package/dist/cjs/{src/utils → utils}/collection.js +0 -0
- package/dist/cjs/{src/utils → utils}/collection.node.js +0 -0
- package/dist/cjs/{src/utils → utils}/data.browser.js +0 -0
- package/dist/cjs/{src/utils → utils}/data.js +0 -0
- package/dist/cjs/{src/utils → utils}/error.js +0 -0
- package/dist/cjs/{src/utils → utils}/eth.js +0 -0
- package/dist/cjs/{src/utils → utils}/expose.js +0 -0
- package/dist/cjs/{src/utils → utils}/file.js +0 -0
- package/dist/cjs/{src/utils → utils}/hash.js +0 -0
- package/dist/cjs/{src/utils → utils}/headers.js +0 -0
- package/dist/cjs/{src/utils → utils}/hex.js +0 -0
- package/dist/cjs/{src/utils → utils}/http.js +0 -0
- package/dist/cjs/{src/utils → utils}/merge.js +0 -0
- package/dist/cjs/{src/utils → utils}/pss.js +0 -0
- package/dist/cjs/{src/utils → utils}/reference.js +0 -0
- package/dist/cjs/utils/sleep.js +23 -0
- package/dist/cjs/{src/utils → utils}/stamps.js +0 -0
- package/dist/cjs/{src/utils → utils}/stream.js +0 -0
- package/dist/cjs/{src/utils → utils}/tar.js +0 -0
- package/dist/cjs/{src/utils → utils}/type.js +1 -1
- package/dist/cjs/{src/utils → utils}/uint64.js +0 -0
- package/dist/cjs/{src/utils → utils}/url.js +0 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/{src/bee-debug.js → bee-debug.js} +2 -2
- package/dist/mjs/{src/bee.js → bee.js} +4 -2
- package/dist/mjs/{src/chunk → chunk}/bmt.js +0 -0
- package/dist/mjs/{src/chunk → chunk}/cac.js +0 -0
- package/dist/mjs/{src/chunk → chunk}/serialize.js +0 -0
- package/dist/mjs/{src/chunk → chunk}/signer.js +0 -0
- package/dist/mjs/{src/chunk → chunk}/soc.js +0 -0
- package/dist/mjs/{src/chunk → chunk}/span.js +0 -0
- package/dist/mjs/{src/feed → feed}/identifier.js +0 -0
- package/dist/mjs/{src/feed → feed}/index.js +0 -0
- package/dist/mjs/{src/feed → feed}/json.js +0 -0
- package/dist/mjs/{src/feed → feed}/retrievable.js +0 -0
- package/dist/mjs/{src/feed → feed}/topic.js +0 -0
- package/dist/mjs/{src/feed → feed}/type.js +0 -0
- package/dist/mjs/{src/index.js → index.js} +0 -0
- package/dist/mjs/{src/modules → modules}/bytes.js +0 -0
- package/dist/mjs/{src/modules → modules}/bzz.js +0 -0
- package/dist/mjs/{src/modules → modules}/chunk.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/balance.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/chequebook.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/chunk.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/connectivity.js +2 -2
- package/dist/mjs/{src/modules → modules}/debug/settlements.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/stamps.js +1 -1
- package/dist/mjs/{src/modules → modules}/debug/states.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/status.js +3 -3
- package/dist/mjs/{src/modules → modules}/debug/tag.js +0 -0
- package/dist/mjs/{src/modules → modules}/debug/transactions.js +0 -0
- package/dist/mjs/{src/modules → modules}/feed.js +0 -0
- package/dist/mjs/{src/modules → modules}/pinning.js +1 -7
- package/dist/mjs/{src/modules → modules}/pss.js +0 -0
- package/dist/mjs/{src/modules → modules}/soc.js +0 -0
- package/dist/mjs/{src/modules → modules}/status.js +0 -0
- package/dist/mjs/{src/modules → modules}/stewardship.js +0 -0
- package/dist/mjs/{src/modules → modules}/tag.js +0 -0
- package/dist/mjs/{src/types → types}/debug.js +0 -0
- package/dist/mjs/{src/types → types}/index.js +0 -0
- package/dist/mjs/{src/types → types}/ky-options.js +0 -0
- package/dist/mjs/{src/types → types}/ky-universal/common.js +0 -0
- package/dist/mjs/{src/types → types}/ky-universal/hooks.js +0 -0
- package/dist/mjs/{src/types → types}/ky-universal/retry.js +0 -0
- package/dist/mjs/{src/utils → utils}/bytes.js +0 -0
- package/dist/mjs/{src/utils → utils}/collection.browser.js +0 -0
- package/dist/mjs/{src/utils → utils}/collection.js +0 -0
- package/dist/mjs/{src/utils → utils}/collection.node.js +0 -0
- package/dist/mjs/{src/utils → utils}/data.browser.js +0 -0
- package/dist/mjs/{src/utils → utils}/data.js +0 -0
- package/dist/mjs/{src/utils → utils}/error.js +0 -0
- package/dist/mjs/{src/utils → utils}/eth.js +0 -0
- package/dist/mjs/{src/utils → utils}/expose.js +0 -0
- package/dist/mjs/{src/utils → utils}/file.js +0 -0
- package/dist/mjs/{src/utils → utils}/hash.js +0 -0
- package/dist/mjs/{src/utils → utils}/headers.js +0 -0
- package/dist/mjs/{src/utils → utils}/hex.js +0 -0
- package/dist/mjs/{src/utils → utils}/http.js +0 -0
- package/dist/mjs/{src/utils → utils}/merge.js +0 -0
- package/dist/mjs/{src/utils → utils}/pss.js +0 -0
- package/dist/mjs/{src/utils → utils}/reference.js +0 -0
- package/dist/mjs/utils/sleep.js +43 -0
- package/dist/mjs/{src/utils → utils}/stamps.js +0 -0
- package/dist/mjs/{src/utils → utils}/stream.js +0 -0
- package/dist/mjs/{src/utils → utils}/tar.js +0 -0
- package/dist/mjs/{src/utils → utils}/type.js +1 -1
- package/dist/mjs/{src/utils → utils}/uint64.js +0 -0
- package/dist/mjs/{src/utils → utils}/url.js +0 -0
- package/dist/types/{src/bee-debug.d.ts → bee-debug.d.ts} +0 -0
- package/dist/types/{src/bee.d.ts → bee.d.ts} +2 -3
- package/dist/types/{src/chunk → chunk}/bmt.d.ts +0 -0
- package/dist/types/{src/chunk → chunk}/cac.d.ts +0 -0
- package/dist/types/{src/chunk → chunk}/serialize.d.ts +0 -0
- package/dist/types/{src/chunk → chunk}/signer.d.ts +0 -0
- package/dist/types/{src/chunk → chunk}/soc.d.ts +0 -0
- package/dist/types/{src/chunk → chunk}/span.d.ts +0 -0
- package/dist/types/{src/feed → feed}/identifier.d.ts +0 -0
- package/dist/types/{src/feed → feed}/index.d.ts +0 -0
- package/dist/types/{src/feed → feed}/json.d.ts +0 -0
- package/dist/types/{src/feed → feed}/retrievable.d.ts +0 -0
- package/dist/types/{src/feed → feed}/topic.d.ts +0 -0
- package/dist/types/{src/feed → feed}/type.d.ts +0 -0
- package/dist/types/{src/index.d.ts → index.d.ts} +0 -0
- package/dist/types/{src/modules → modules}/bytes.d.ts +0 -0
- package/dist/types/{src/modules → modules}/bzz.d.ts +0 -0
- package/dist/types/{src/modules → modules}/chunk.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/balance.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/chequebook.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/chunk.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/connectivity.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/settlements.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/stamps.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/states.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/status.d.ts +3 -3
- package/dist/types/{src/modules → modules}/debug/tag.d.ts +0 -0
- package/dist/types/{src/modules → modules}/debug/transactions.d.ts +0 -0
- package/dist/types/{src/modules → modules}/feed.d.ts +0 -0
- package/dist/types/{src/modules → modules}/pinning.d.ts +1 -1
- package/dist/types/{src/modules → modules}/pss.d.ts +0 -0
- package/dist/types/{src/modules → modules}/soc.d.ts +0 -0
- package/dist/types/{src/modules → modules}/status.d.ts +0 -0
- package/dist/types/{src/modules → modules}/stewardship.d.ts +0 -0
- package/dist/types/{src/modules → modules}/tag.d.ts +0 -0
- package/dist/types/{src/types → types}/debug.d.ts +2 -7
- package/dist/types/{src/types → types}/index.d.ts +25 -8
- package/dist/types/{src/types → types}/ky-options.d.ts +0 -0
- package/dist/types/{src/types → types}/ky-universal/common.d.ts +0 -0
- package/dist/types/{src/types → types}/ky-universal/hooks.d.ts +0 -0
- package/dist/types/{src/types → types}/ky-universal/retry.d.ts +0 -0
- package/dist/types/{src/utils → utils}/bytes.d.ts +0 -0
- package/dist/types/{src/utils → utils}/collection.browser.d.ts +0 -0
- package/dist/types/{src/utils → utils}/collection.d.ts +0 -0
- package/dist/types/{src/utils → utils}/collection.node.d.ts +0 -0
- package/dist/types/{src/utils → utils}/data.browser.d.ts +0 -0
- package/dist/types/{src/utils → utils}/data.d.ts +0 -0
- package/dist/types/{src/utils → utils}/error.d.ts +0 -0
- package/dist/types/{src/utils → utils}/eth.d.ts +0 -0
- package/dist/types/{src/utils → utils}/expose.d.ts +0 -0
- package/dist/types/{src/utils → utils}/file.d.ts +0 -0
- package/dist/types/{src/utils → utils}/hash.d.ts +0 -0
- package/dist/types/{src/utils → utils}/headers.d.ts +0 -0
- package/dist/types/{src/utils → utils}/hex.d.ts +0 -0
- package/dist/types/{src/utils → utils}/http.d.ts +0 -0
- package/dist/types/{src/utils → utils}/merge.d.ts +0 -0
- package/dist/types/{src/utils → utils}/pss.d.ts +0 -0
- package/dist/types/{src/utils → utils}/reference.d.ts +0 -0
- package/dist/types/utils/sleep.d.ts +6 -0
- package/dist/types/{src/utils → utils}/stamps.d.ts +0 -0
- package/dist/types/{src/utils → utils}/stream.d.ts +0 -0
- package/dist/types/{src/utils → utils}/tar.d.ts +0 -0
- package/dist/types/{src/utils → utils}/type.d.ts +6 -2
- package/dist/types/{src/utils → utils}/uint64.d.ts +0 -0
- package/dist/types/{src/utils → utils}/url.d.ts +0 -0
- package/package.json +10 -10
- package/dist/cjs/test/utils.js +0 -419
- package/dist/mjs/test/utils.js +0 -458
- package/dist/types/test/utils.d.ts +0 -119
package/README.md
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
[](https://github.com/RichardLitt/standard-readme)
|
|
7
7
|
[](https://github.com/feross/standard)
|
|
8
8
|

|
|
9
|
-

|
|
10
10
|

|
|
11
11
|
|
|
12
12
|
> Client library for connecting to Bee decentralised storage
|
|
13
13
|
|
|
14
14
|
**Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**
|
|
15
15
|
|
|
16
|
-
This project is intended to be used with **Bee version 1.
|
|
16
|
+
This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.7.0<!-- SUPPORTED_BEE_END -->**. Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the [releases tab](https://github.com/ethersphere/bee-js/releases).
|
|
17
17
|
|
|
18
18
|
## Table of Contents
|
|
19
19
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -43,7 +47,7 @@ const types_1 = require("./types");
|
|
|
43
47
|
const tag = __importStar(require("./modules/debug/tag"));
|
|
44
48
|
const stamps = __importStar(require("./modules/debug/stamps"));
|
|
45
49
|
const http_1 = require("./utils/http");
|
|
46
|
-
const
|
|
50
|
+
const sleep_1 = require("./utils/sleep");
|
|
47
51
|
class BeeDebug {
|
|
48
52
|
constructor(url, options) {
|
|
49
53
|
var _a;
|
|
@@ -472,7 +476,7 @@ class BeeDebug {
|
|
|
472
476
|
throw new error_1.BeeArgumentError(`Depth has to be at most ${types_1.STAMPS_DEPTH_MAX}`, depth);
|
|
473
477
|
}
|
|
474
478
|
const stamp = yield stamps.createPostageBatch(this.getKy(options), amount, depth, options);
|
|
475
|
-
if (options === null || options === void 0 ? void 0 : options.waitForUsable) {
|
|
479
|
+
if ((options === null || options === void 0 ? void 0 : options.waitForUsable) !== false) {
|
|
476
480
|
yield this.waitForUsablePostageStamp(stamp, options === null || options === void 0 ? void 0 : options.waitForUsableTimeout);
|
|
477
481
|
}
|
|
478
482
|
return stamp;
|
|
@@ -623,7 +627,7 @@ class BeeDebug {
|
|
|
623
627
|
if (stamp.usable) {
|
|
624
628
|
return;
|
|
625
629
|
}
|
|
626
|
-
yield (0,
|
|
630
|
+
yield (0, sleep_1.sleep)(TIME_STEP);
|
|
627
631
|
}
|
|
628
632
|
throw new error_1.BeeError('Timeout on waiting for postage stamp to become usable');
|
|
629
633
|
});
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -761,7 +765,6 @@ class Bee {
|
|
|
761
765
|
*
|
|
762
766
|
* @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
|
|
763
767
|
* @see [Bee API reference - `POST /feeds`](https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1{owner}~1{topic}/post)
|
|
764
|
-
* TODO: Once breaking add support for Feed CID
|
|
765
768
|
*/
|
|
766
769
|
createFeedManifest(postageBatchId, type, topic, owner, options) {
|
|
767
770
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -770,7 +773,10 @@ class Bee {
|
|
|
770
773
|
(0, type_2.assertBatchId)(postageBatchId);
|
|
771
774
|
const canonicalTopic = (0, topic_1.makeTopic)(topic);
|
|
772
775
|
const canonicalOwner = (0, eth_1.makeHexEthAddress)(owner);
|
|
773
|
-
|
|
776
|
+
const reference = yield (0, feed_2.createFeedManifest)(this.getKy(options), canonicalOwner, canonicalTopic, postageBatchId, {
|
|
777
|
+
type,
|
|
778
|
+
});
|
|
779
|
+
return (0, type_2.addCidConversionFunction)({ reference }, swarm_cid_1.ReferenceType.FEED);
|
|
774
780
|
});
|
|
775
781
|
}
|
|
776
782
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -27,7 +27,7 @@ function getPeers(ky) {
|
|
|
27
27
|
path: 'peers',
|
|
28
28
|
responseType: 'json',
|
|
29
29
|
});
|
|
30
|
-
return response.data.peers
|
|
30
|
+
return response.data.peers;
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
exports.getPeers = getPeers;
|
|
@@ -37,7 +37,7 @@ function getBlocklist(ky) {
|
|
|
37
37
|
path: 'blocklist',
|
|
38
38
|
responseType: 'json',
|
|
39
39
|
});
|
|
40
|
-
return response.data.peers
|
|
40
|
+
return response.data.peers;
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
exports.getBlocklist = getBlocklist;
|
|
File without changes
|
|
File without changes
|
|
@@ -17,9 +17,9 @@ const http_1 = require("../../utils/http");
|
|
|
17
17
|
const major_js_1 = __importDefault(require("semver/functions/major.js"));
|
|
18
18
|
// Following lines bellow are automatically updated with GitHub Action when Bee version is updated
|
|
19
19
|
// so if you are changing anything about them change the `update_bee` action accordingly!
|
|
20
|
-
exports.SUPPORTED_BEE_VERSION_EXACT = '1.
|
|
21
|
-
exports.SUPPORTED_API_VERSION = '3.0.
|
|
22
|
-
exports.SUPPORTED_DEBUG_API_VERSION = '
|
|
20
|
+
exports.SUPPORTED_BEE_VERSION_EXACT = '1.7.0-bbf13011';
|
|
21
|
+
exports.SUPPORTED_API_VERSION = '3.0.2';
|
|
22
|
+
exports.SUPPORTED_DEBUG_API_VERSION = '3.0.2';
|
|
23
23
|
exports.SUPPORTED_BEE_VERSION = exports.SUPPORTED_BEE_VERSION_EXACT.substring(0, exports.SUPPORTED_BEE_VERSION_EXACT.indexOf('-'));
|
|
24
24
|
const NODE_INFO_URL = 'node';
|
|
25
25
|
const HEALTH_URL = 'health';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -74,11 +74,7 @@ function getAllPins(ky) {
|
|
|
74
74
|
responseType: 'json',
|
|
75
75
|
path: `${PINNING_ENDPOINT}`,
|
|
76
76
|
});
|
|
77
|
-
|
|
78
|
-
if (result === null) {
|
|
79
|
-
return [];
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
77
|
+
return response.data.references;
|
|
82
78
|
});
|
|
83
79
|
}
|
|
84
80
|
exports.getAllPins = getAllPins;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.sleep = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Sleep for N miliseconds
|
|
15
|
+
*
|
|
16
|
+
* @param ms Number of miliseconds to sleep
|
|
17
|
+
*/
|
|
18
|
+
function sleep(ms) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return new Promise(resolve => setTimeout(() => resolve(), ms));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.sleep = sleep;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -165,7 +165,7 @@ exports.makeReferenceOrEns = makeReferenceOrEns;
|
|
|
165
165
|
* @param cidType Type as described in the @ethersphere/swarm-cids-js -> ReferenceType
|
|
166
166
|
*/
|
|
167
167
|
function addCidConversionFunction(result, cidType) {
|
|
168
|
-
return Object.assign(Object.assign({}, result), {
|
|
168
|
+
return Object.assign(Object.assign({}, result), { cid() {
|
|
169
169
|
return (0, swarm_cid_1.encodeReference)(result.reference, cidType).toString();
|
|
170
170
|
} });
|
|
171
171
|
}
|
|
File without changes
|
|
File without changes
|