@ethersphere/bee-js 3.3.1 → 3.3.2
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/modules/debug/status.js +3 -3
- package/dist/cjs/types/debug.js +1 -0
- package/dist/cjs/utils/stream.js +2 -2
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.LICENSE.txt +8 -0
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/modules/debug/status.js +3 -3
- package/dist/mjs/types/debug.js +1 -0
- package/dist/mjs/utils/stream.js +1 -1
- package/dist/types/bee-debug.d.ts +3 -3
- package/dist/types/modules/debug/stamps.d.ts +3 -3
- package/dist/types/modules/debug/status.d.ts +3 -3
- package/dist/types/types/debug.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/utils/stamps.d.ts +2 -2
- package/dist/types/utils/stream.d.ts +1 -1
- package/package.json +13 -13
|
@@ -2,9 +2,9 @@ import { http } from "../../utils/http.js";
|
|
|
2
2
|
import getMajorSemver from 'semver/functions/major.js'; // Following lines bellow are automatically updated with GitHub Action when Bee version is updated
|
|
3
3
|
// so if you are changing anything about them change the `update_bee` action accordingly!
|
|
4
4
|
|
|
5
|
-
export const SUPPORTED_BEE_VERSION_EXACT = '1.
|
|
6
|
-
export const SUPPORTED_API_VERSION = '
|
|
7
|
-
export const SUPPORTED_DEBUG_API_VERSION = '
|
|
5
|
+
export const SUPPORTED_BEE_VERSION_EXACT = '1.5.0-dda5606e';
|
|
6
|
+
export const SUPPORTED_API_VERSION = '3.0.0';
|
|
7
|
+
export const SUPPORTED_DEBUG_API_VERSION = '2.0.0';
|
|
8
8
|
export const SUPPORTED_BEE_VERSION = SUPPORTED_BEE_VERSION_EXACT.substring(0, SUPPORTED_BEE_VERSION_EXACT.indexOf('-'));
|
|
9
9
|
const NODE_INFO_URL = 'node';
|
|
10
10
|
const HEALTH_URL = 'health';
|
package/dist/mjs/types/debug.js
CHANGED
package/dist/mjs/utils/stream.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Readable as NodeReadableNative } from 'stream';
|
|
2
2
|
import { isStrictlyObject } from "./type.js";
|
|
3
|
-
import { ReadableStream } from 'web-streams-polyfill
|
|
3
|
+
import { ReadableStream } from 'web-streams-polyfill';
|
|
4
4
|
const NodeReadable = NodeReadableNative || class {};
|
|
5
5
|
/**
|
|
6
6
|
* Validates if passed object is either browser's ReadableStream
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, Peer, BalanceResponse, PeerBalance, ChequebookAddressResponse, ChequebookBalanceResponse, LastChequesResponse, LastChequesForPeerResponse, LastCashoutActionResponse, Settlements, AllSettlements, RemovePeerResponse, Topology, PingResponse, Health, NodeAddresses, ReserveState, ChainState, NumberString, ExtendedTag, PostageBatchBuckets,
|
|
1
|
+
import type { Address, Peer, BalanceResponse, PeerBalance, ChequebookAddressResponse, ChequebookBalanceResponse, LastChequesResponse, LastChequesForPeerResponse, LastCashoutActionResponse, Settlements, AllSettlements, RemovePeerResponse, Topology, PingResponse, Health, NodeAddresses, ReserveState, ChainState, NumberString, ExtendedTag, PostageBatchBuckets, PostageBatch, TransactionInfo, TransactionHash, NodeInfo, BeeVersions } from './types';
|
|
2
2
|
import { BatchId, BeeOptions, CashoutOptions, PostageBatchOptions, RequestOptions, Tag } from './types';
|
|
3
3
|
export declare class BeeDebug {
|
|
4
4
|
/**
|
|
@@ -240,7 +240,7 @@ export declare class BeeDebug {
|
|
|
240
240
|
* @see [Bee docs - Keep your data alive / Postage stamps](https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive)
|
|
241
241
|
* @see [Bee Debug API reference - `GET /stamps/${id}`](https://docs.ethswarm.org/debug-api/#tag/Postage-Stamps/paths/~1stamps~1{id}/get)
|
|
242
242
|
*/
|
|
243
|
-
getPostageBatch(postageBatchId: BatchId | string, options?: RequestOptions): Promise<
|
|
243
|
+
getPostageBatch(postageBatchId: BatchId | string, options?: RequestOptions): Promise<PostageBatch>;
|
|
244
244
|
/**
|
|
245
245
|
* Return detailed information related to buckets for specific postage batch.
|
|
246
246
|
*
|
|
@@ -256,7 +256,7 @@ export declare class BeeDebug {
|
|
|
256
256
|
* @see [Bee docs - Keep your data alive / Postage stamps](https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive)
|
|
257
257
|
* @see [Bee Debug API reference - `GET /stamps`](https://docs.ethswarm.org/debug-api/#tag/Postage-Stamps/paths/~1stamps/get)
|
|
258
258
|
*/
|
|
259
|
-
getAllPostageBatch(options?: RequestOptions): Promise<
|
|
259
|
+
getAllPostageBatch(options?: RequestOptions): Promise<PostageBatch[]>;
|
|
260
260
|
/**
|
|
261
261
|
* Return lists of all current pending transactions that the Bee made
|
|
262
262
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BatchId,
|
|
2
|
-
export declare function getAllPostageBatches(ky: Ky): Promise<
|
|
3
|
-
export declare function getPostageBatch(ky: Ky, postageBatchId: BatchId): Promise<
|
|
1
|
+
import type { BatchId, PostageBatch, Ky, NumberString, PostageBatchBuckets, PostageBatchOptions } from '../../types';
|
|
2
|
+
export declare function getAllPostageBatches(ky: Ky): Promise<PostageBatch[]>;
|
|
3
|
+
export declare function getPostageBatch(ky: Ky, postageBatchId: BatchId): Promise<PostageBatch>;
|
|
4
4
|
export declare function getPostageBatchBuckets(ky: Ky, postageBatchId: BatchId): Promise<PostageBatchBuckets>;
|
|
5
5
|
export declare function createPostageBatch(ky: Ky, amount: NumberString, depth: number, options?: PostageBatchOptions): Promise<BatchId>;
|
|
6
6
|
export declare function topUpBatch(ky: Ky, id: string, amount: NumberString): Promise<BatchId>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Health, NodeInfo } from '../../types/debug';
|
|
2
2
|
import { Ky } from '../../types';
|
|
3
3
|
import { BeeVersions } from '../../types/debug';
|
|
4
|
-
export declare const SUPPORTED_BEE_VERSION_EXACT = "1.
|
|
5
|
-
export declare const SUPPORTED_API_VERSION = "
|
|
6
|
-
export declare const SUPPORTED_DEBUG_API_VERSION = "
|
|
4
|
+
export declare const SUPPORTED_BEE_VERSION_EXACT = "1.5.0-dda5606e";
|
|
5
|
+
export declare const SUPPORTED_API_VERSION = "3.0.0";
|
|
6
|
+
export declare const SUPPORTED_DEBUG_API_VERSION = "2.0.0";
|
|
7
7
|
export declare const SUPPORTED_BEE_VERSION: string;
|
|
8
8
|
/**
|
|
9
9
|
* Get health of node
|
|
@@ -10,7 +10,7 @@ import type { HexString } from '../utils/hex';
|
|
|
10
10
|
import type ky from 'ky-universal';
|
|
11
11
|
import type { Readable as NativeReadable } from 'stream';
|
|
12
12
|
import type { Readable as CompatibilityReadable } from 'readable-stream';
|
|
13
|
-
import type { ReadableStream as ReadableStreamPonyfill } from 'web-streams-polyfill
|
|
13
|
+
import type { ReadableStream as ReadableStreamPonyfill } from 'web-streams-polyfill';
|
|
14
14
|
import { Options as KyOptions } from './ky-options';
|
|
15
15
|
export * from './debug';
|
|
16
16
|
export declare type Ky = typeof ky;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PostageBatch } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Utility function that calculates usage of postage batch based on its utilization, depth and bucket depth.
|
|
4
4
|
*
|
|
@@ -9,4 +9,4 @@ import { DebugPostageBatch } from '../types';
|
|
|
9
9
|
* @param depth
|
|
10
10
|
* @param bucketDepth
|
|
11
11
|
*/
|
|
12
|
-
export declare function getStampUsage({ utilization, depth, bucketDepth }:
|
|
12
|
+
export declare function getStampUsage({ utilization, depth, bucketDepth }: PostageBatch): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Readable as NodeReadableNative, ReadableOptions as NodeReadableOptions } from 'stream';
|
|
3
|
-
import { ReadableStream } from 'web-streams-polyfill
|
|
3
|
+
import { ReadableStream } from 'web-streams-polyfill';
|
|
4
4
|
import { Readable } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Validates if passed object is either browser's ReadableStream
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethersphere/bee-js",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "Javascript client for Bee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bee",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@types/readable-stream": "^2.3.13",
|
|
68
|
-
"bufferutil": "^4.0.
|
|
68
|
+
"bufferutil": "^4.0.6",
|
|
69
69
|
"cross-blob": "^2.0.1",
|
|
70
70
|
"elliptic": "^6.5.4",
|
|
71
71
|
"isomorphic-ws": "^4.0.1",
|
|
@@ -75,24 +75,24 @@
|
|
|
75
75
|
"semver": "^7.3.5",
|
|
76
76
|
"tar-js": "^0.3.0",
|
|
77
77
|
"utf-8-validate": "^5.0.8",
|
|
78
|
-
"web-streams-polyfill": "^
|
|
78
|
+
"web-streams-polyfill": "^4.0.0-beta.1",
|
|
79
79
|
"ws": "^8.5.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@babel/cli": "^7.17.0",
|
|
83
83
|
"@babel/core": "^7.14.6",
|
|
84
84
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
85
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
85
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
86
86
|
"@babel/preset-env": "^7.16.11",
|
|
87
87
|
"@babel/preset-typescript": "^7.14.5",
|
|
88
88
|
"@commitlint/cli": "^16.2.1",
|
|
89
89
|
"@commitlint/config-conventional": "^16.2.1",
|
|
90
90
|
"@fluffy-spoon/substitute": "^1.208.0",
|
|
91
91
|
"@jest/test-sequencer": "^27.5.0",
|
|
92
|
-
"@jest/types": "^27.
|
|
92
|
+
"@jest/types": "^27.5.1",
|
|
93
93
|
"@types/content-disposition": "^0.5.4",
|
|
94
94
|
"@types/debug": "^4.1.7",
|
|
95
|
-
"@types/elliptic": "^6.4.
|
|
95
|
+
"@types/elliptic": "^6.4.14",
|
|
96
96
|
"@types/expect-puppeteer": "^4.4.7",
|
|
97
97
|
"@types/glob": "^7.1.3",
|
|
98
98
|
"@types/jest": "^26.0.23",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"@types/semver": "^7.3.9",
|
|
103
103
|
"@types/ws": "^7.4.5",
|
|
104
104
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
105
|
-
"@typescript-eslint/parser": "^5.
|
|
105
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
106
106
|
"babel-jest": "^27.0.5",
|
|
107
|
-
"babel-loader": "^8.2.
|
|
107
|
+
"babel-loader": "^8.2.3",
|
|
108
108
|
"babel-plugin-add-import-extension": "^1.6.0",
|
|
109
109
|
"cross-env": "^7.0.3",
|
|
110
110
|
"debug": "^4.3.1",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"eslint-plugin-prettier": "^4.0.0",
|
|
116
116
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
117
117
|
"glob": "^7.1.7",
|
|
118
|
-
"husky": "^
|
|
118
|
+
"husky": "^7.0.4",
|
|
119
119
|
"jest": "^27.4.7",
|
|
120
120
|
"jest-puppeteer": "^5.0.4",
|
|
121
121
|
"nock": "^13.2.2",
|
|
122
|
-
"prettier": "^2.
|
|
122
|
+
"prettier": "^2.5.1",
|
|
123
123
|
"puppeteer": "^13.2.0",
|
|
124
124
|
"rimraf": "^3.0.2",
|
|
125
125
|
"terser-webpack-plugin": "^5.3.0",
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
"engines": {
|
|
135
135
|
"node": ">=12.0.0",
|
|
136
136
|
"npm": ">=6.0.0",
|
|
137
|
-
"beeApiVersion": "
|
|
138
|
-
"beeDebugApiVersion": "
|
|
139
|
-
"bee": "1.
|
|
137
|
+
"beeApiVersion": "3.0.0",
|
|
138
|
+
"beeDebugApiVersion": "2.0.0",
|
|
139
|
+
"bee": "1.5.0-dda5606e"
|
|
140
140
|
}
|
|
141
141
|
}
|