@ethersphere/bee-js 6.4.1 → 6.5.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/dist/cjs/bee-debug.js +7 -0
- package/dist/cjs/modules/debug/stamps.js +11 -1
- 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/types/bee-debug.d.ts +4 -0
- package/dist/types/modules/debug/stamps.d.ts +1 -0
- package/package.json +1 -1
package/dist/mjs/bee-debug.js
CHANGED
|
@@ -458,6 +458,13 @@ export class BeeDebug {
|
|
|
458
458
|
assertRequestOptions(options);
|
|
459
459
|
return stamps.getAllPostageBatches(this.getRequestOptionsForCall(options));
|
|
460
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Return all globally available postage batches.
|
|
463
|
+
*/
|
|
464
|
+
async getAllGlobalPostageBatch(options) {
|
|
465
|
+
assertRequestOptions(options);
|
|
466
|
+
return stamps.getGlobalPostageBatches(this.getRequestOptionsForCall(options));
|
|
467
|
+
}
|
|
461
468
|
/**
|
|
462
469
|
* Return lists of all current pending transactions that the Bee made
|
|
463
470
|
*/
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { http } from "../../utils/http.js";
|
|
2
2
|
const STAMPS_ENDPOINT = 'stamps';
|
|
3
|
+
const BATCHES_ENDPOINT = 'batches';
|
|
4
|
+
export async function getGlobalPostageBatches(requestOptions) {
|
|
5
|
+
const response = await http(requestOptions, {
|
|
6
|
+
method: 'get',
|
|
7
|
+
url: `${BATCHES_ENDPOINT}`,
|
|
8
|
+
responseType: 'json'
|
|
9
|
+
});
|
|
10
|
+
return response.data.stamps;
|
|
11
|
+
}
|
|
3
12
|
export async function getAllPostageBatches(requestOptions) {
|
|
4
13
|
const response = await http(requestOptions, {
|
|
5
14
|
method: 'get',
|
|
@@ -271,6 +271,10 @@ export declare class BeeDebug {
|
|
|
271
271
|
* @see [Bee Debug API reference - `GET /stamps`](https://docs.ethswarm.org/debug-api/#tag/Postage-Stamps/paths/~1stamps/get)
|
|
272
272
|
*/
|
|
273
273
|
getAllPostageBatch(options?: BeeRequestOptions): Promise<PostageBatch[]>;
|
|
274
|
+
/**
|
|
275
|
+
* Return all globally available postage batches.
|
|
276
|
+
*/
|
|
277
|
+
getAllGlobalPostageBatch(options?: BeeRequestOptions): Promise<PostageBatch[]>;
|
|
274
278
|
/**
|
|
275
279
|
* Return lists of all current pending transactions that the Bee made
|
|
276
280
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BatchId, BeeRequestOptions, NumberString, PostageBatch, PostageBatchBuckets, PostageBatchOptions } from '../../types';
|
|
2
|
+
export declare function getGlobalPostageBatches(requestOptions: BeeRequestOptions): Promise<PostageBatch[]>;
|
|
2
3
|
export declare function getAllPostageBatches(requestOptions: BeeRequestOptions): Promise<PostageBatch[]>;
|
|
3
4
|
export declare function getPostageBatch(requestOptions: BeeRequestOptions, postageBatchId: BatchId): Promise<PostageBatch>;
|
|
4
5
|
export declare function getPostageBatchBuckets(requestOptions: BeeRequestOptions, postageBatchId: BatchId): Promise<PostageBatchBuckets>;
|