@ethersphere/bee-js 6.4.1 → 6.5.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/dist/cjs/bee-debug.js +7 -0
- package/dist/cjs/modules/debug/stamps.js +11 -1
- package/dist/cjs/utils/http.js +2 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee-debug.js +7 -0
- package/dist/mjs/modules/debug/stamps.js +9 -0
- package/dist/mjs/utils/http.js +3 -1
- package/dist/types/bee-debug.d.ts +4 -0
- package/dist/types/modules/debug/stamps.d.ts +1 -0
- package/dist/types/utils/http.d.ts +1 -5
- package/package.json +1 -1
package/dist/cjs/bee-debug.js
CHANGED
|
@@ -486,6 +486,13 @@ class BeeDebug {
|
|
|
486
486
|
(0, type_1.assertRequestOptions)(options);
|
|
487
487
|
return stamps.getAllPostageBatches(this.getRequestOptionsForCall(options));
|
|
488
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Return all globally available postage batches.
|
|
491
|
+
*/
|
|
492
|
+
async getAllGlobalPostageBatch(options) {
|
|
493
|
+
(0, type_1.assertRequestOptions)(options);
|
|
494
|
+
return stamps.getGlobalPostageBatches(this.getRequestOptionsForCall(options));
|
|
495
|
+
}
|
|
489
496
|
/**
|
|
490
497
|
* Return lists of all current pending transactions that the Bee made
|
|
491
498
|
*/
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.diluteBatch = exports.topUpBatch = exports.createPostageBatch = exports.getPostageBatchBuckets = exports.getPostageBatch = exports.getAllPostageBatches = void 0;
|
|
3
|
+
exports.diluteBatch = exports.topUpBatch = exports.createPostageBatch = exports.getPostageBatchBuckets = exports.getPostageBatch = exports.getAllPostageBatches = exports.getGlobalPostageBatches = void 0;
|
|
4
4
|
const http_1 = require("../../utils/http");
|
|
5
5
|
const STAMPS_ENDPOINT = 'stamps';
|
|
6
|
+
const BATCHES_ENDPOINT = 'batches';
|
|
7
|
+
async function getGlobalPostageBatches(requestOptions) {
|
|
8
|
+
const response = await (0, http_1.http)(requestOptions, {
|
|
9
|
+
method: 'get',
|
|
10
|
+
url: `${BATCHES_ENDPOINT}`,
|
|
11
|
+
responseType: 'json',
|
|
12
|
+
});
|
|
13
|
+
return response.data.stamps;
|
|
14
|
+
}
|
|
15
|
+
exports.getGlobalPostageBatches = getGlobalPostageBatches;
|
|
6
16
|
async function getAllPostageBatches(requestOptions) {
|
|
7
17
|
const response = await (0, http_1.http)(requestOptions, {
|
|
8
18
|
method: 'get',
|