@ethersphere/bee-js 6.3.0 → 6.4.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/status.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/status.js +9 -0
- package/dist/types/bee-debug.d.ts +5 -1
- package/dist/types/modules/debug/status.d.ts +2 -1
- package/dist/types/types/debug.d.ts +12 -0
- package/dist/types/types/index.d.ts +17 -5
- package/package.json +1 -1
package/dist/mjs/bee-debug.js
CHANGED
|
@@ -225,6 +225,13 @@ export class BeeDebug {
|
|
|
225
225
|
assertRequestOptions(options);
|
|
226
226
|
return settlements.getAllSettlements(this.getRequestOptionsForCall(options));
|
|
227
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Get status of node
|
|
230
|
+
*/
|
|
231
|
+
async getStatus(options) {
|
|
232
|
+
assertRequestOptions(options);
|
|
233
|
+
return status.getDebugStatus(this.getRequestOptionsForCall(options));
|
|
234
|
+
}
|
|
228
235
|
/**
|
|
229
236
|
* Get health of node
|
|
230
237
|
*/
|
|
@@ -6,8 +6,17 @@ export const SUPPORTED_API_VERSION = '4.0.0';
|
|
|
6
6
|
export const SUPPORTED_DEBUG_API_VERSION = '4.0.0';
|
|
7
7
|
export const SUPPORTED_BEE_VERSION = SUPPORTED_BEE_VERSION_EXACT.substring(0, SUPPORTED_BEE_VERSION_EXACT.indexOf('-'));
|
|
8
8
|
const NODE_INFO_URL = 'node';
|
|
9
|
+
const STATUS_URL = 'status';
|
|
9
10
|
const HEALTH_URL = 'health';
|
|
10
11
|
const READINESS_URL = 'readiness';
|
|
12
|
+
export async function getDebugStatus(requestOptions) {
|
|
13
|
+
const response = await http(requestOptions, {
|
|
14
|
+
method: 'get',
|
|
15
|
+
url: STATUS_URL,
|
|
16
|
+
responseType: 'json'
|
|
17
|
+
});
|
|
18
|
+
return response.data;
|
|
19
|
+
}
|
|
11
20
|
/**
|
|
12
21
|
* Get health of node
|
|
13
22
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address, AllSettlements, BalanceResponse, BeeRequestOptions, BeeVersions, ChainState, ChequebookAddressResponse, ChequebookBalanceResponse, ExtendedTag, Health, LastCashoutActionResponse, LastChequesForPeerResponse, LastChequesResponse, NodeAddresses, NodeInfo, NumberString, Peer, PeerBalance, PingResponse, PostageBatch, PostageBatchBuckets, RedistributionState, RemovePeerResponse, ReserveState, Settlements, Topology, TransactionHash, TransactionInfo, WalletBalance } from './types';
|
|
1
|
+
import type { Address, AllSettlements, BalanceResponse, BeeRequestOptions, BeeVersions, ChainState, ChequebookAddressResponse, ChequebookBalanceResponse, DebugStatus, ExtendedTag, Health, LastCashoutActionResponse, LastChequesForPeerResponse, LastChequesResponse, NodeAddresses, NodeInfo, NumberString, Peer, PeerBalance, PingResponse, PostageBatch, PostageBatchBuckets, RedistributionState, RemovePeerResponse, ReserveState, Settlements, Topology, TransactionHash, TransactionInfo, WalletBalance } from './types';
|
|
2
2
|
import { BatchId, BeeOptions, CashoutOptions, PostageBatchOptions, Tag, TransactionOptions } from './types';
|
|
3
3
|
export declare class BeeDebug {
|
|
4
4
|
/**
|
|
@@ -113,6 +113,10 @@ export declare class BeeDebug {
|
|
|
113
113
|
* Get settlements with all known peers and total amount sent or received
|
|
114
114
|
*/
|
|
115
115
|
getAllSettlements(options?: BeeRequestOptions): Promise<AllSettlements>;
|
|
116
|
+
/**
|
|
117
|
+
* Get status of node
|
|
118
|
+
*/
|
|
119
|
+
getStatus(options?: BeeRequestOptions): Promise<DebugStatus>;
|
|
116
120
|
/**
|
|
117
121
|
* Get health of node
|
|
118
122
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BeeRequestOptions } from '../../index';
|
|
2
|
-
import type { Health, NodeInfo } from '../../types/debug';
|
|
2
|
+
import type { DebugStatus, Health, NodeInfo } from '../../types/debug';
|
|
3
3
|
import { BeeVersions } from '../../types/debug';
|
|
4
4
|
export declare const SUPPORTED_BEE_VERSION_EXACT = "1.13.0-f1067884";
|
|
5
5
|
export declare const SUPPORTED_API_VERSION = "4.0.0";
|
|
6
6
|
export declare const SUPPORTED_DEBUG_API_VERSION = "4.0.0";
|
|
7
7
|
export declare const SUPPORTED_BEE_VERSION: string;
|
|
8
|
+
export declare function getDebugStatus(requestOptions: BeeRequestOptions): Promise<DebugStatus>;
|
|
8
9
|
/**
|
|
9
10
|
* Get health of node
|
|
10
11
|
*
|
|
@@ -116,6 +116,18 @@ export interface PeerBalance {
|
|
|
116
116
|
export interface BalanceResponse {
|
|
117
117
|
balances: PeerBalance[];
|
|
118
118
|
}
|
|
119
|
+
export interface DebugStatus {
|
|
120
|
+
peer: string;
|
|
121
|
+
proximity: number;
|
|
122
|
+
beeMode: BeeModes;
|
|
123
|
+
reserveSize: number;
|
|
124
|
+
pullsyncRate: number;
|
|
125
|
+
storageRadius: number;
|
|
126
|
+
connectedPeers: number;
|
|
127
|
+
neighborhoodSize: number;
|
|
128
|
+
batchCommitment: number;
|
|
129
|
+
isReachable: boolean;
|
|
130
|
+
}
|
|
119
131
|
export interface Health {
|
|
120
132
|
status: 'ok';
|
|
121
133
|
version: string;
|
|
@@ -191,21 +191,33 @@ export interface UploadHeaders {
|
|
|
191
191
|
*/
|
|
192
192
|
export interface Tag {
|
|
193
193
|
/**
|
|
194
|
-
* Number of
|
|
194
|
+
* Number of chunks created by the splitter.
|
|
195
195
|
*/
|
|
196
|
-
|
|
196
|
+
split: number;
|
|
197
197
|
/**
|
|
198
|
-
* Number of chunks that
|
|
198
|
+
* Number of chunks that are already uploaded with same reference and same postage batch. These don't need to be synced again.
|
|
199
199
|
*/
|
|
200
|
-
|
|
200
|
+
seen: number;
|
|
201
201
|
/**
|
|
202
|
-
* Number of chunks that
|
|
202
|
+
* Number of chunks that were stored locally as they lie in the uploader node's neighborhood. This is only applicable for full nodes.
|
|
203
|
+
*/
|
|
204
|
+
stored: number;
|
|
205
|
+
/**
|
|
206
|
+
* Number of chunks sent on the network to peers as a part of the upload. Chunks could be sent multiple times because of failures or replication.
|
|
207
|
+
*/
|
|
208
|
+
sent: number;
|
|
209
|
+
/**
|
|
210
|
+
* Number of chunks that were pushed with a valid receipt. The receipt will also show if they were stored at the correct depth.
|
|
203
211
|
*/
|
|
204
212
|
synced: number;
|
|
205
213
|
/**
|
|
206
214
|
* Unique identifier
|
|
207
215
|
*/
|
|
208
216
|
uid: number;
|
|
217
|
+
/**
|
|
218
|
+
* Swarm hash of the uploaded data
|
|
219
|
+
*/
|
|
220
|
+
address: string;
|
|
209
221
|
/**
|
|
210
222
|
* When the upload process started
|
|
211
223
|
*/
|