@ethersphere/bee-js 12.3.2-upcoming.116 → 13.0.0-upcoming.gc013bdf

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.
Files changed (268) hide show
  1. package/dist/cjs/api/balance.js +24 -0
  2. package/dist/cjs/api/batches.js +26 -0
  3. package/dist/cjs/{modules → api}/bytes.js +4 -29
  4. package/dist/cjs/{modules → api}/bzz.js +6 -34
  5. package/dist/cjs/{modules/debug → api}/chequebook.js +48 -87
  6. package/dist/cjs/api/chunk.js +43 -0
  7. package/dist/cjs/api/connectivity.js +86 -0
  8. package/dist/cjs/api/consumed.js +24 -0
  9. package/dist/cjs/{modules → api}/envelope.js +3 -2
  10. package/dist/cjs/api/feed.js +55 -0
  11. package/dist/cjs/api/grantee.js +62 -0
  12. package/dist/cjs/{modules/pinning.js → api/pin.js} +13 -34
  13. package/dist/cjs/api/pss.js +19 -0
  14. package/dist/cjs/api/redistributionstate.js +17 -0
  15. package/dist/cjs/{modules/debug/settlements.js → api/settlement.js} +3 -11
  16. package/dist/cjs/api/soc.js +34 -0
  17. package/dist/cjs/{modules/debug → api}/stake.js +15 -43
  18. package/dist/cjs/{modules/debug/stamps.js → api/stamp.js} +41 -57
  19. package/dist/cjs/api/status.js +67 -0
  20. package/dist/cjs/{modules → api}/stewardship.js +1 -6
  21. package/dist/cjs/api/tag.js +51 -0
  22. package/dist/cjs/{modules/debug/transactions.js → api/transaction.js} +10 -31
  23. package/dist/cjs/{modules/debug/states.js → api/wallet.js} +4 -36
  24. package/dist/cjs/bee.js +115 -1978
  25. package/dist/cjs/chunk/soc.js +23 -65
  26. package/dist/cjs/feed/identifier.js +3 -4
  27. package/dist/cjs/feed/index.js +20 -22
  28. package/dist/cjs/feed/retrievable.js +3 -3
  29. package/dist/cjs/index.js +18 -8
  30. package/dist/cjs/manifest/manifest.js +99 -335
  31. package/dist/cjs/modules/balance.js +86 -0
  32. package/dist/cjs/modules/cheque.js +92 -0
  33. package/dist/cjs/modules/chequebook.js +90 -0
  34. package/dist/cjs/modules/chunk.js +87 -53
  35. package/dist/cjs/modules/collection.js +145 -0
  36. package/dist/cjs/modules/connectivity.js +141 -0
  37. package/dist/cjs/modules/context.js +2 -0
  38. package/dist/cjs/modules/data.js +119 -0
  39. package/dist/cjs/modules/feed.js +94 -70
  40. package/dist/cjs/modules/file.js +113 -0
  41. package/dist/cjs/modules/grantee.js +86 -55
  42. package/dist/cjs/modules/messaging.js +248 -0
  43. package/dist/cjs/modules/pin.js +100 -0
  44. package/dist/cjs/modules/settlement.js +67 -0
  45. package/dist/cjs/modules/soc.js +39 -36
  46. package/dist/cjs/modules/stake.js +110 -0
  47. package/dist/cjs/modules/stamp.js +199 -0
  48. package/dist/cjs/modules/status.js +128 -20
  49. package/dist/cjs/modules/storage.js +191 -0
  50. package/dist/cjs/modules/tag.js +97 -71
  51. package/dist/cjs/modules/transaction.js +92 -0
  52. package/dist/cjs/modules/wallet.js +82 -0
  53. package/dist/cjs/types/schema/chequebook.js +5 -5
  54. package/dist/cjs/types/schema/connectivity.js +5 -5
  55. package/dist/cjs/types/schema/envelope.js +5 -5
  56. package/dist/cjs/types/schema/grantee.js +4 -4
  57. package/dist/cjs/types/schema/stake.js +2 -2
  58. package/dist/cjs/types/schema/stamps.js +4 -4
  59. package/dist/cjs/types/schema/states.js +2 -2
  60. package/dist/cjs/types/schema/transactions.js +3 -3
  61. package/dist/cjs/types/schema/upload.js +2 -2
  62. package/dist/cjs/utils/chunk-stream.browser.js +24 -16
  63. package/dist/cjs/utils/chunk-stream.js +17 -9
  64. package/dist/cjs/utils/constants.js +3 -3
  65. package/dist/cjs/utils/expose.js +4 -4
  66. package/dist/cjs/utils/headers.js +4 -4
  67. package/dist/cjs/utils/pss.js +2 -2
  68. package/dist/cjs/utils/resource-locator.js +2 -2
  69. package/dist/cjs/utils/schema.js +4 -4
  70. package/dist/cjs/utils/stamps.js +15 -130
  71. package/dist/index.browser.min.js +2 -1
  72. package/dist/index.browser.min.js.LICENSE.txt +3 -0
  73. package/dist/index.browser.min.js.map +1 -1
  74. package/dist/mjs/api/balance.js +20 -0
  75. package/dist/mjs/api/batches.js +22 -0
  76. package/dist/mjs/{modules → api}/bytes.js +2 -27
  77. package/dist/mjs/{modules → api}/bzz.js +2 -30
  78. package/dist/mjs/{modules/debug → api}/chequebook.js +50 -89
  79. package/dist/mjs/api/chunk.js +37 -0
  80. package/dist/mjs/api/connectivity.js +76 -0
  81. package/dist/mjs/api/consumed.js +20 -0
  82. package/dist/mjs/{modules → api}/envelope.js +3 -2
  83. package/dist/mjs/api/feed.js +52 -0
  84. package/dist/mjs/api/grantee.js +59 -0
  85. package/dist/mjs/{modules/pinning.js → api/pin.js} +14 -35
  86. package/dist/mjs/api/pss.js +18 -0
  87. package/dist/mjs/api/redistributionstate.js +14 -0
  88. package/dist/mjs/{modules/debug/settlements.js → api/settlement.js} +3 -11
  89. package/dist/mjs/api/soc.js +31 -0
  90. package/dist/mjs/{modules/debug → api}/stake.js +14 -41
  91. package/dist/mjs/{modules/debug/stamps.js → api/stamp.js} +37 -51
  92. package/dist/mjs/api/status.js +59 -0
  93. package/dist/mjs/{modules → api}/stewardship.js +1 -6
  94. package/dist/mjs/api/tag.js +49 -0
  95. package/dist/mjs/api/transaction.js +41 -0
  96. package/dist/mjs/api/wallet.js +38 -0
  97. package/dist/mjs/bee.js +115 -1965
  98. package/dist/mjs/chunk/soc.js +13 -51
  99. package/dist/mjs/feed/identifier.js +2 -3
  100. package/dist/mjs/feed/index.js +9 -11
  101. package/dist/mjs/feed/retrievable.js +2 -2
  102. package/dist/mjs/index.js +2 -5
  103. package/dist/mjs/manifest/manifest.js +97 -341
  104. package/dist/mjs/modules/balance.js +49 -0
  105. package/dist/mjs/modules/cheque.js +55 -0
  106. package/dist/mjs/modules/chequebook.js +65 -0
  107. package/dist/mjs/modules/chunk.js +52 -49
  108. package/dist/mjs/modules/collection.js +108 -0
  109. package/dist/mjs/modules/connectivity.js +102 -0
  110. package/dist/mjs/modules/context.js +1 -0
  111. package/dist/mjs/modules/data.js +82 -0
  112. package/dist/mjs/modules/feed.js +89 -67
  113. package/dist/mjs/modules/file.js +78 -0
  114. package/dist/mjs/modules/grantee.js +52 -55
  115. package/dist/mjs/modules/messaging.js +213 -0
  116. package/dist/mjs/modules/pin.js +63 -0
  117. package/dist/mjs/modules/settlement.js +30 -0
  118. package/dist/mjs/modules/soc.js +36 -34
  119. package/dist/mjs/modules/stake.js +76 -0
  120. package/dist/mjs/modules/stamp.js +170 -0
  121. package/dist/mjs/modules/status.js +98 -18
  122. package/dist/mjs/modules/storage.js +185 -0
  123. package/dist/mjs/modules/tag.js +61 -68
  124. package/dist/mjs/modules/transaction.js +58 -0
  125. package/dist/mjs/modules/wallet.js +45 -0
  126. package/dist/mjs/types/schema/chequebook.js +1 -1
  127. package/dist/mjs/types/schema/connectivity.js +1 -1
  128. package/dist/mjs/types/schema/envelope.js +5 -5
  129. package/dist/mjs/types/schema/grantee.js +1 -1
  130. package/dist/mjs/types/schema/stake.js +1 -1
  131. package/dist/mjs/types/schema/stamps.js +1 -1
  132. package/dist/mjs/types/schema/states.js +1 -1
  133. package/dist/mjs/types/schema/transactions.js +1 -1
  134. package/dist/mjs/types/schema/upload.js +1 -1
  135. package/dist/mjs/utils/chunk-stream.browser.js +28 -18
  136. package/dist/mjs/utils/chunk-stream.js +21 -11
  137. package/dist/mjs/utils/constants.js +1 -1
  138. package/dist/mjs/utils/expose.js +1 -1
  139. package/dist/mjs/utils/headers.js +1 -1
  140. package/dist/mjs/utils/pss.js +1 -1
  141. package/dist/mjs/utils/resource-locator.js +1 -1
  142. package/dist/mjs/utils/schema.js +1 -1
  143. package/dist/mjs/utils/stamps.js +5 -99
  144. package/dist/types/api/balance.d.ts +7 -0
  145. package/dist/types/api/batches.d.ts +7 -0
  146. package/dist/types/api/bytes.d.ts +11 -0
  147. package/dist/types/api/bzz.d.ts +12 -0
  148. package/dist/types/api/chequebook.d.ts +21 -0
  149. package/dist/types/api/chunk.d.ts +7 -0
  150. package/dist/types/api/connectivity.d.ts +22 -0
  151. package/dist/types/api/consumed.d.ts +7 -0
  152. package/dist/types/{modules → api}/envelope.d.ts +1 -1
  153. package/dist/types/api/feed.d.ts +40 -0
  154. package/dist/types/api/grantee.d.ts +11 -0
  155. package/dist/types/api/pin.d.ts +10 -0
  156. package/dist/types/api/pss.d.ts +6 -0
  157. package/dist/types/api/redistributionstate.d.ts +5 -0
  158. package/dist/types/api/settlement.d.ts +7 -0
  159. package/dist/types/api/soc.d.ts +6 -0
  160. package/dist/types/api/stake.d.ts +11 -0
  161. package/dist/types/api/stamp.d.ts +12 -0
  162. package/dist/types/api/status.d.ts +11 -0
  163. package/dist/types/api/stewardship.d.ts +7 -0
  164. package/dist/types/api/tag.d.ts +12 -0
  165. package/dist/types/api/transaction.d.ts +9 -0
  166. package/dist/types/api/wallet.d.ts +9 -0
  167. package/dist/types/bee.d.ts +71 -1199
  168. package/dist/types/chunk/soc.d.ts +3 -48
  169. package/dist/types/feed/identifier.d.ts +1 -1
  170. package/dist/types/feed/index.d.ts +2 -4
  171. package/dist/types/feed/retrievable.d.ts +1 -1
  172. package/dist/types/index.d.ts +17 -20
  173. package/dist/types/manifest/manifest.d.ts +25 -34
  174. package/dist/types/modules/balance.d.ts +38 -0
  175. package/dist/types/modules/cheque.d.ts +40 -0
  176. package/dist/types/modules/chequebook.d.ts +41 -0
  177. package/dist/types/modules/chunk.d.ts +30 -20
  178. package/dist/types/modules/collection.d.ts +77 -0
  179. package/dist/types/modules/connectivity.d.ts +74 -0
  180. package/dist/types/modules/context.d.ts +24 -0
  181. package/dist/types/modules/data.d.ts +55 -0
  182. package/dist/types/modules/feed.d.ts +47 -49
  183. package/dist/types/modules/file.d.ts +43 -0
  184. package/dist/types/modules/grantee.d.ts +40 -8
  185. package/dist/types/modules/messaging.d.ts +79 -0
  186. package/dist/types/modules/pin.d.ts +47 -0
  187. package/dist/types/modules/settlement.d.ts +25 -0
  188. package/dist/types/modules/soc.d.ts +23 -11
  189. package/dist/types/modules/stake.d.ts +55 -0
  190. package/dist/types/modules/stamp.d.ts +96 -0
  191. package/dist/types/modules/status.d.ts +66 -5
  192. package/dist/types/modules/storage.d.ts +107 -0
  193. package/dist/types/modules/tag.d.ts +44 -33
  194. package/dist/types/modules/transaction.d.ts +42 -0
  195. package/dist/types/modules/wallet.d.ts +35 -0
  196. package/dist/types/types/debug.d.ts +1 -1
  197. package/dist/types/types/index.d.ts +3 -12
  198. package/dist/types/types/schema/chequebook.d.ts +1 -1
  199. package/dist/types/types/schema/connectivity.d.ts +1 -1
  200. package/dist/types/types/schema/grantee.d.ts +1 -1
  201. package/dist/types/types/schema/stake.d.ts +1 -1
  202. package/dist/types/types/schema/stamps.d.ts +1 -1
  203. package/dist/types/types/schema/states.d.ts +1 -1
  204. package/dist/types/types/schema/transactions.d.ts +1 -1
  205. package/dist/types/types/schema/upload.d.ts +1 -1
  206. package/dist/types/utils/chunk-stream.browser.d.ts +1 -1
  207. package/dist/types/utils/chunk-stream.d.ts +2 -2
  208. package/dist/types/utils/constants.d.ts +1 -1
  209. package/dist/types/utils/expose.d.ts +1 -1
  210. package/dist/types/utils/headers.d.ts +1 -1
  211. package/dist/types/utils/pss.d.ts +1 -1
  212. package/dist/types/utils/resource-locator.d.ts +1 -1
  213. package/dist/types/utils/schema.d.ts +1 -1
  214. package/dist/types/utils/stamps.d.ts +2 -27
  215. package/dist/types/utils/tar-uploader.browser.d.ts +1 -1
  216. package/dist/types/utils/tar-uploader.d.ts +1 -1
  217. package/package.json +4 -2
  218. package/dist/cjs/chunk/bmt.js +0 -37
  219. package/dist/cjs/chunk/cac.js +0 -43
  220. package/dist/cjs/modules/debug/balance.js +0 -60
  221. package/dist/cjs/modules/debug/connectivity.js +0 -54
  222. package/dist/cjs/modules/debug/status.js +0 -104
  223. package/dist/cjs/modules/gsoc.js +0 -23
  224. package/dist/cjs/modules/pss.js +0 -48
  225. package/dist/cjs/stamper/stamper.js +0 -44
  226. package/dist/cjs/utils/bytes.js +0 -116
  227. package/dist/cjs/utils/cid.js +0 -37
  228. package/dist/cjs/utils/redundancy.js +0 -133
  229. package/dist/cjs/utils/typed-bytes.js +0 -186
  230. package/dist/mjs/chunk/bmt.js +0 -34
  231. package/dist/mjs/chunk/cac.js +0 -34
  232. package/dist/mjs/modules/debug/balance.js +0 -54
  233. package/dist/mjs/modules/debug/connectivity.js +0 -46
  234. package/dist/mjs/modules/debug/states.js +0 -68
  235. package/dist/mjs/modules/debug/status.js +0 -99
  236. package/dist/mjs/modules/debug/transactions.js +0 -62
  237. package/dist/mjs/modules/gsoc.js +0 -16
  238. package/dist/mjs/modules/pss.js +0 -43
  239. package/dist/mjs/stamper/stamper.js +0 -40
  240. package/dist/mjs/utils/bytes.js +0 -102
  241. package/dist/mjs/utils/cid.js +0 -32
  242. package/dist/mjs/utils/redundancy.js +0 -98
  243. package/dist/mjs/utils/typed-bytes.js +0 -167
  244. package/dist/types/chunk/bmt.d.ts +0 -16
  245. package/dist/types/chunk/cac.d.ts +0 -40
  246. package/dist/types/modules/bytes.d.ts +0 -35
  247. package/dist/types/modules/bzz.d.ts +0 -40
  248. package/dist/types/modules/debug/balance.d.ts +0 -28
  249. package/dist/types/modules/debug/chequebook.d.ts +0 -60
  250. package/dist/types/modules/debug/connectivity.d.ts +0 -9
  251. package/dist/types/modules/debug/settlements.d.ts +0 -15
  252. package/dist/types/modules/debug/stake.d.ts +0 -30
  253. package/dist/types/modules/debug/stamps.d.ts +0 -11
  254. package/dist/types/modules/debug/states.d.ts +0 -23
  255. package/dist/types/modules/debug/status.d.ts +0 -46
  256. package/dist/types/modules/debug/transactions.d.ts +0 -30
  257. package/dist/types/modules/gsoc.d.ts +0 -6
  258. package/dist/types/modules/pinning.d.ts +0 -30
  259. package/dist/types/modules/pss.d.ts +0 -22
  260. package/dist/types/modules/stewardship.d.ts +0 -10
  261. package/dist/types/stamper/stamper.d.ts +0 -15
  262. package/dist/types/utils/bytes.d.ts +0 -19
  263. package/dist/types/utils/cid.d.ts +0 -10
  264. package/dist/types/utils/redundancy.d.ts +0 -21
  265. package/dist/types/utils/typed-bytes.d.ts +0 -69
  266. /package/dist/cjs/{modules → api}/rchash.js +0 -0
  267. /package/dist/mjs/{modules → api}/rchash.js +0 -0
  268. /package/dist/types/{modules → api}/rchash.d.ts +0 -0
@@ -1,60 +1,58 @@
1
- import { BeeRequestOptions, UploadOptions } from '../types';
2
- import { Bytes } from '../utils/bytes';
3
- import { BatchId, EthAddress, FeedIndex, Reference, Topic } from '../utils/typed-bytes';
4
- export interface FeedUpdateOptions {
1
+ import { BatchId, EthAddress, FeedIndex, PrivateKey, Reference, Topic } from 'swarm-core';
2
+ import type { FeedPayloadResult } from '../api/feed';
3
+ import type { BeeRequestOptions, DownloadOptions, FeedReader, FeedWriter } from '../types';
4
+ import { UploadOptions } from '../types';
5
+ import type { BeeContext } from './context';
6
+ /**
7
+ * Feed operations.
8
+ *
9
+ * Accessed as `bee.feed`. Delegates to the feed subsystem (`src/feed`).
10
+ */
11
+ export declare class Feed {
12
+ private readonly context;
13
+ constructor(context: BeeContext);
5
14
  /**
6
- * Specifies the start date as unix time stamp
15
+ * Makes a new feed reader for downloading feed updates.
16
+ *
17
+ * @param topic Topic in hex or bytes
18
+ * @param owner Owner's ethereum address in hex or bytes
19
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
7
20
  */
8
- at?: number;
21
+ makeReader(topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, requestOptions?: BeeRequestOptions): FeedReader;
9
22
  /**
10
- * Fetch specific previous Feed's update (default fetches latest update)
23
+ * Makes a new feed writer for updating feeds.
24
+ *
25
+ * @param topic Topic in hex or bytes
26
+ * @param signer The signer's private key. Falls back to the Bee instance signer.
27
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
11
28
  */
12
- index?: FeedIndex | number;
29
+ makeWriter(topic: Topic | Uint8Array | string, signer?: PrivateKey | Uint8Array | string, requestOptions?: BeeRequestOptions): FeedWriter;
13
30
  /**
14
- * Whether the first 8 bytes of the payload are a timestamp
31
+ * Creates a feed manifest chunk and returns the reference to it.
32
+ *
33
+ * @param postageBatchId Postage BatchId to be used to create the Feed Manifest
34
+ * @param topic Topic in hex or bytes
35
+ * @param owner Owner's ethereum address in hex or bytes
36
+ * @param options Options that affect the request behavior
37
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
15
38
  */
16
- hasTimestamp?: boolean;
17
- }
18
- interface FeedUpdateHeaders {
39
+ createManifest(postageBatchId: BatchId | Uint8Array | string, topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, options?: UploadOptions, requestOptions?: BeeRequestOptions): Promise<Reference>;
19
40
  /**
20
- * The current feed's index
41
+ * Fetches the latest feed update.
42
+ *
43
+ * @param topic Topic in hex or bytes
44
+ * @param owner Owner's ethereum address in hex or bytes
45
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
21
46
  */
22
- feedIndex: FeedIndex;
47
+ fetchLatestUpdate(topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<FeedPayloadResult>;
23
48
  /**
24
- * The feed's index for next update.
25
- * Only set for the latest update. If update is fetched using previous index, then this is an empty string.
49
+ * Validates whether a feed is retrievable in the network.
50
+ *
51
+ * @param owner Owner's ethereum address in hex or bytes
52
+ * @param topic Topic in hex or bytes
53
+ * @param index Optional feed index
54
+ * @param options Download options
55
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
26
56
  */
27
- feedIndexNext?: FeedIndex;
57
+ isRetrievable(owner: EthAddress | Uint8Array | string, topic: Topic | Uint8Array | string, index?: FeedIndex, options?: DownloadOptions, requestOptions?: BeeRequestOptions): Promise<boolean>;
28
58
  }
29
- export interface FeedPayloadResult extends FeedUpdateHeaders {
30
- payload: Bytes;
31
- }
32
- export interface FeedReferenceResult extends FeedUpdateHeaders {
33
- reference: Reference;
34
- }
35
- /**
36
- * Create an initial feed root manifest
37
- *
38
- * @param requestOptions Options for making requests
39
- * @param owner Owner's ethereum address in hex
40
- * @param topic Topic in hex
41
- * @param postageBatchId Postage BatchId to be used to create the Feed Manifest
42
- * @param options Additional options, like type (default: 'sequence')
43
- */
44
- export declare function createFeedManifest(requestOptions: BeeRequestOptions, owner: EthAddress, topic: Topic, stamp: BatchId | Uint8Array | string, options?: UploadOptions): Promise<Reference>;
45
- /**
46
- * Find and retrieve feed update
47
- *
48
- * The feed consists of updates. This endpoint looks up an
49
- * update that matches the provided parameters and returns
50
- * the reference it contains along with its index and the
51
- * index of the subsequent update.
52
- *
53
- * @param requestOptions Options for making requests
54
- * @param owner Owner's ethereum address
55
- * @param topic Topic
56
- * @param options Additional options, like index, at, type
57
- */
58
- export declare function fetchLatestFeedUpdate(requestOptions: BeeRequestOptions, owner: EthAddress, topic: Topic, options?: FeedUpdateOptions): Promise<FeedPayloadResult>;
59
- export declare function probeFeed(requestOptions: BeeRequestOptions, owner: EthAddress, topic: Topic): Promise<FeedUpdateHeaders>;
60
- export {};
@@ -0,0 +1,43 @@
1
+ import { BatchId, Bytes, Reference } from 'swarm-core';
2
+ import { Readable } from 'stream';
3
+ import type { BeeRequestOptions, DownloadOptions, FileData, FileUploadOptions, UploadResult } from '../types';
4
+ import type { BeeContext } from './context';
5
+ /**
6
+ * Single-file operations backed by the `/bzz` endpoint.
7
+ *
8
+ * Accessed as `bee.file`.
9
+ */
10
+ export declare class File {
11
+ private readonly context;
12
+ constructor(context: BeeContext);
13
+ /**
14
+ * Uploads a single file to a Bee node.
15
+ *
16
+ * To download the file, use {@link download}.
17
+ *
18
+ * @param postageBatchId Postage BatchId to be used to upload the data with
19
+ * @param data Data or file to be uploaded
20
+ * @param name Optional name of the uploaded file
21
+ * @param options Additional options like tag, encryption, pinning, content-type and request options
22
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
23
+ */
24
+ upload(postageBatchId: BatchId | Uint8Array | string, data: string | Uint8Array | Readable | globalThis.File, name?: string, options?: FileUploadOptions, requestOptions?: BeeRequestOptions): Promise<UploadResult>;
25
+ /**
26
+ * Downloads a single file.
27
+ *
28
+ * @param resource Swarm reference, Swarm CID, or ENS domain.
29
+ * @param path If reference points to manifest, then this parameter defines path to the file
30
+ * @param options Options that affects the request behavior
31
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
32
+ */
33
+ download(resource: Reference | Uint8Array | string, path?: string, options?: DownloadOptions, requestOptions?: BeeRequestOptions): Promise<FileData<Bytes>>;
34
+ /**
35
+ * Downloads a single file as a readable stream.
36
+ *
37
+ * @param reference Bee file reference in hex string (either 64 or 128 chars long), ENS domain or Swarm CID.
38
+ * @param path If reference points to manifest / collections, then this parameter defines path to the file
39
+ * @param options Options that affects the request behavior
40
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
41
+ */
42
+ downloadReadable(reference: Reference | Uint8Array | string, path?: string, options?: DownloadOptions, requestOptions?: BeeRequestOptions): Promise<FileData<ReadableStream<Uint8Array>>>;
43
+ }
@@ -1,8 +1,40 @@
1
- import { BeeRequestOptions, GetGranteesResult, GranteesResult } from '../types';
2
- import { BatchId, PublicKey, Reference } from '../utils/typed-bytes';
3
- export declare function getGrantees(reference: Reference, requestOptions: BeeRequestOptions): Promise<GetGranteesResult>;
4
- export declare function createGrantees(requestOptions: BeeRequestOptions, postageBatchId: BatchId, grantees: PublicKey[]): Promise<GranteesResult>;
5
- export declare function patchGrantees(postageBatchId: BatchId, reference: Reference, historyRef: Reference, grantees: {
6
- add?: PublicKey[];
7
- revoke?: PublicKey[];
8
- }, requestOptions: BeeRequestOptions): Promise<GranteesResult>;
1
+ import { BatchId, PublicKey, Reference } from 'swarm-core';
2
+ import type { BeeRequestOptions, GetGranteesResult, GranteesResult } from '../types';
3
+ import type { BeeContext } from './context';
4
+ /**
5
+ * Grantee (access control) operations.
6
+ *
7
+ * Accessed as `bee.grantee`.
8
+ */
9
+ export declare class Grantee {
10
+ private readonly context;
11
+ constructor(context: BeeContext);
12
+ /**
13
+ * Creates grantees for a postage batch.
14
+ *
15
+ * @param postageBatchId
16
+ * @param grantees Public keys of the grantees.
17
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
18
+ */
19
+ create(postageBatchId: BatchId | Uint8Array | string, grantees: PublicKey[] | Uint8Array[] | string[], requestOptions?: BeeRequestOptions): Promise<GranteesResult>;
20
+ /**
21
+ * Retrieves the grantees for a given reference.
22
+ *
23
+ * @param reference The reference.
24
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
25
+ */
26
+ get(reference: Reference | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<GetGranteesResult>;
27
+ /**
28
+ * Updates the grantees of a specific reference and history.
29
+ *
30
+ * @param postageBatchId The ID of the postage batch.
31
+ * @param reference The reference.
32
+ * @param history The history.
33
+ * @param grantees The grantees to add and/or revoke.
34
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
35
+ */
36
+ patch(postageBatchId: BatchId | Uint8Array | string, reference: Reference | Uint8Array | string, history: Reference | Uint8Array | string, grantees: {
37
+ add?: PublicKey[] | Uint8Array[] | string[];
38
+ revoke?: PublicKey[] | Uint8Array[] | string[];
39
+ }, requestOptions?: BeeRequestOptions): Promise<GranteesResult>;
40
+ }
@@ -0,0 +1,79 @@
1
+ import { BatchId, Bytes, EthAddress, Identifier, PeerAddress, PrivateKey, PublicKey, Topic } from 'swarm-core';
2
+ import type { BeeRequestOptions, GsocMessageHandler, GsocSubscription, PssMessageHandler, PssSubscription, UploadOptions } from '../types';
3
+ import type { BeeContext } from './context';
4
+ /**
5
+ * Messaging protocols — PSS (Postal Service for Swarm) and GSOC. Method names keep
6
+ * their `pss`/`gsoc` prefixes to distinguish the two protocols within the namespace.
7
+ *
8
+ * Accessed as `bee.messaging`.
9
+ */
10
+ export declare class Messaging {
11
+ private readonly context;
12
+ constructor(context: BeeContext);
13
+ /**
14
+ * Sends data to a recipient or target with the Postal Service for Swarm.
15
+ *
16
+ * **Warning! Only full nodes can accept PSS messages.**
17
+ *
18
+ * @param postageBatchId Postage BatchId that will be assigned to the sent message.
19
+ * @param topic Topic name
20
+ * @param target Target message address prefix
21
+ * @param data Message to send
22
+ * @param recipient Optional recipient public key
23
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
24
+ */
25
+ pssSend(postageBatchId: BatchId | Uint8Array | string, topic: Topic, target: string, data: string | Uint8Array, recipient?: string | PublicKey, requestOptions?: BeeRequestOptions): Promise<void>;
26
+ /**
27
+ * Subscribes to messages for the given topic with the Postal Service for Swarm.
28
+ *
29
+ * **Warning! Only full nodes can accept PSS messages.**
30
+ *
31
+ * @param topic Topic name
32
+ * @param handler Message handler interface
33
+ */
34
+ pssSubscribe(topic: Topic, handler: PssMessageHandler): PssSubscription;
35
+ /**
36
+ * Receives a single message using the Postal Service for Swarm.
37
+ *
38
+ * **Warning! Only full nodes can accept PSS messages.**
39
+ *
40
+ * @param topic Topic name
41
+ * @param timeoutMsec Timeout in milliseconds
42
+ */
43
+ pssReceive(topic: Topic, timeoutMsec?: number): Promise<Bytes>;
44
+ /**
45
+ * Mines the signer (a private key) to be used to send GSOC messages to the specific target overlay address.
46
+ *
47
+ * @param targetOverlay
48
+ * @param identifier
49
+ * @param proximity
50
+ */
51
+ gsocMine(targetOverlay: PeerAddress | Uint8Array | string, identifier: Identifier | Uint8Array | string, proximity?: number): PrivateKey;
52
+ /**
53
+ * Sends a GSOC message with the specified signer and identifier.
54
+ *
55
+ * **Warning! Only full nodes can accept GSOC messages.**
56
+ *
57
+ * @param postageBatchId
58
+ * @param signer
59
+ * @param identifier
60
+ * @param data
61
+ * @param options
62
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
63
+ */
64
+ gsocSend(postageBatchId: BatchId | Uint8Array | string, signer: PrivateKey | Uint8Array | string, identifier: Identifier | Uint8Array | string, data: string | Uint8Array, options?: UploadOptions, requestOptions?: BeeRequestOptions): Promise<import("../types").UploadResult>;
65
+ /**
66
+ * Subscribes to GSOC messages for the specified owner (of the signer) and identifier.
67
+ *
68
+ * **Warning! Only full nodes can accept GSOC messages.**
69
+ *
70
+ * @param address
71
+ * @param identifier
72
+ * @param handler
73
+ */
74
+ gsocSubscribe(address: EthAddress | Uint8Array | string, identifier: Identifier | Uint8Array | string, handler: GsocMessageHandler): GsocSubscription;
75
+ private openWebSocket;
76
+ private readonly cancelled;
77
+ private makeCancel;
78
+ private isCancelled;
79
+ }
@@ -0,0 +1,47 @@
1
+ import { BatchId, Reference } from 'swarm-core';
2
+ import type { BeeRequestOptions, Pin as PinData } from '../types';
3
+ import type { BeeContext } from './context';
4
+ /**
5
+ * Local pinning operations.
6
+ *
7
+ * Accessed as `bee.pin`.
8
+ */
9
+ export declare class Pin {
10
+ private readonly context;
11
+ constructor(context: BeeContext);
12
+ /**
13
+ * Pins local data with the given reference.
14
+ *
15
+ * @param reference Data reference
16
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
17
+ */
18
+ add(reference: Reference | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<void>;
19
+ /**
20
+ * Unpins local data with the given reference.
21
+ *
22
+ * @param reference Data reference
23
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
24
+ */
25
+ remove(reference: Reference | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<void>;
26
+ /**
27
+ * Gets the list of all locally pinned references.
28
+ *
29
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
30
+ */
31
+ getAll(requestOptions?: BeeRequestOptions): Promise<Reference[]>;
32
+ /**
33
+ * Gets the pinning status of the chunk with the given reference.
34
+ *
35
+ * @param reference Data reference
36
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
37
+ */
38
+ get(reference: Reference | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<PinData>;
39
+ /**
40
+ * Instructs the Bee node to reupload locally pinned data into the network.
41
+ *
42
+ * @param postageBatchId Postage Batch ID that will be used to re-upload the data.
43
+ * @param reference Data reference to be re-uploaded.
44
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
45
+ */
46
+ reuploadData(postageBatchId: BatchId | Uint8Array | string, reference: Reference | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<void>;
47
+ }
@@ -0,0 +1,25 @@
1
+ import { PeerAddress } from 'swarm-core';
2
+ import type { AllSettlements, BeeRequestOptions, Settlements } from '../types';
3
+ import type { BeeContext } from './context';
4
+ /**
5
+ * Settlement operations. Related to the bandwidth incentives and the chequebook.
6
+ *
7
+ * Accessed as `bee.settlement`.
8
+ */
9
+ export declare class Settlement {
10
+ private readonly context;
11
+ constructor(context: BeeContext);
12
+ /**
13
+ * Gets the amount of sent and received micropayments from settlements with a peer.
14
+ *
15
+ * @param address Swarm address of peer
16
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
17
+ */
18
+ get(address: PeerAddress | string, requestOptions?: BeeRequestOptions): Promise<Settlements>;
19
+ /**
20
+ * Gets settlements with all known peers and total amount sent or received.
21
+ *
22
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
23
+ */
24
+ getAll(requestOptions?: BeeRequestOptions): Promise<AllSettlements>;
25
+ }
@@ -1,14 +1,26 @@
1
- import { BeeRequestOptions, UploadOptions, UploadResult } from '../types';
2
- import { BatchId, EthAddress, Identifier, Signature } from '../utils/typed-bytes';
1
+ import { EthAddress, PrivateKey } from 'swarm-core';
2
+ import type { BeeRequestOptions, SOCReader, SOCWriter } from '../types';
3
+ import type { BeeContext } from './context';
3
4
  /**
4
- * Upload single owner chunk (SOC) to a Bee node
5
+ * Single owner chunk (SOC) reader/writer operations.
5
6
  *
6
- * @param requestOptions Options for making requests
7
- * @param owner Owner's ethereum address in hex
8
- * @param identifier Arbitrary identifier in hex
9
- * @param signature Signature in hex
10
- * @param data Content addressed chunk data to be uploaded
11
- * @param postageBatchId Postage BatchId that will be assigned to uploaded data
12
- * @param options Additional options like tag, encryption, pinning
7
+ * Accessed as `bee.soc`.
13
8
  */
14
- export declare function upload(requestOptions: BeeRequestOptions, owner: EthAddress, identifier: Identifier, signature: Signature, data: Uint8Array, stamp: BatchId | Uint8Array | string, options?: UploadOptions): Promise<UploadResult>;
9
+ export declare class Soc {
10
+ private readonly context;
11
+ constructor(context: BeeContext);
12
+ /**
13
+ * Returns an object for reading single owner chunks.
14
+ *
15
+ * @param ownerAddress The ethereum address of the owner
16
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
17
+ */
18
+ makeReader(ownerAddress: EthAddress | Uint8Array | string, requestOptions?: BeeRequestOptions): SOCReader;
19
+ /**
20
+ * Returns an object for reading and writing single owner chunks.
21
+ *
22
+ * @param signer The signer's private key. Falls back to the Bee instance signer.
23
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
24
+ */
25
+ makeWriter(signer?: PrivateKey | Uint8Array | string, requestOptions?: BeeRequestOptions): SOCWriter;
26
+ }
@@ -0,0 +1,55 @@
1
+ import { TransactionId } from 'swarm-core';
2
+ import type { BeeRequestOptions, NumberString, RedistributionState, TransactionOptions } from '../types';
3
+ import { BZZ } from '../utils/tokens';
4
+ import type { BeeContext } from './context';
5
+ /**
6
+ * Staking operations.
7
+ *
8
+ * Accessed as `bee.stake`.
9
+ */
10
+ export declare class Stake {
11
+ private readonly context;
12
+ constructor(context: BeeContext);
13
+ /**
14
+ * Gets the amount of staked BZZ.
15
+ *
16
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
17
+ */
18
+ get(requestOptions?: BeeRequestOptions): Promise<BZZ>;
19
+ /**
20
+ * Gets the amount of withdrawable staked BZZ.
21
+ *
22
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
23
+ */
24
+ getWithdrawable(requestOptions?: BeeRequestOptions): Promise<BZZ>;
25
+ /**
26
+ * Stakes the given amount of BZZ. Initial deposit must be at least 10 BZZ.
27
+ *
28
+ * Be aware that staked BZZ tokens can **not** be withdrawn.
29
+ *
30
+ * @param amount Amount of BZZ tokens to be staked. If not providing a `BZZ` instance, the amount is denoted in PLUR.
31
+ * @param options
32
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
33
+ */
34
+ deposit(amount: BZZ | NumberString | string | bigint, options?: TransactionOptions, requestOptions?: BeeRequestOptions): Promise<TransactionId>;
35
+ /**
36
+ * Withdraws all surplus staked BZZ to the node wallet.
37
+ *
38
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
39
+ */
40
+ withdrawSurplus(requestOptions?: BeeRequestOptions): Promise<TransactionId>;
41
+ /**
42
+ * Withdraws all staked BZZ to the node wallet.
43
+ *
44
+ * **Only available when the staking contract is paused and is in the process of being migrated to a new contract!**
45
+ *
46
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
47
+ */
48
+ migrate(requestOptions?: BeeRequestOptions): Promise<TransactionId>;
49
+ /**
50
+ * Gets current status of node in redistribution game.
51
+ *
52
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
53
+ */
54
+ getRedistributionState(requestOptions?: BeeRequestOptions): Promise<RedistributionState>;
55
+ }
@@ -0,0 +1,96 @@
1
+ import { BatchId } from 'swarm-core';
2
+ import type { BeeRequestOptions, GlobalPostageBatch, NumberString, PostageBatch, PostageBatchBuckets, PostageBatchOptions, RedundancyLevel } from '../types';
3
+ import type { Duration } from '../utils/duration';
4
+ import { BZZ } from '../utils/tokens';
5
+ import type { BeeContext } from './context';
6
+ /**
7
+ * Low-level postage batch (stamp) operations.
8
+ *
9
+ * Accessed as `bee.stamp`. For the ergonomic wrapper see `bee.storage`.
10
+ */
11
+ export declare class Stamp {
12
+ private readonly context;
13
+ constructor(context: BeeContext);
14
+ /**
15
+ * Creates a new postage batch, spending BZZ tokens from the node wallet.
16
+ *
17
+ * Use `bee.storage.buy` for a more convenient way to create a postage batch.
18
+ *
19
+ * @param amount TTL parameter - 1 day at the minimum of 24,000 storage price requires an amount of 414,720,000.
20
+ * @param depth Capacity parameter - 17..255.
21
+ * @param options Options for creation of postage batch
22
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
23
+ */
24
+ create(amount: NumberString | string | bigint, depth: number, options?: PostageBatchOptions, requestOptions?: BeeRequestOptions): Promise<BatchId>;
25
+ /**
26
+ * Updates the label of a certain postage batch.
27
+ *
28
+ * @param postageBatchId Batch ID of the postage batch to update.
29
+ * @param label New label for the postage batch.
30
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
31
+ */
32
+ updateLabel(postageBatchId: BatchId | Uint8Array | string, label: string, requestOptions?: BeeRequestOptions): Promise<void>;
33
+ /**
34
+ * Calculates the `amount` and expected duration extension for topping up a postage batch with a given BZZ value.
35
+ *
36
+ * @param depth Depth of the postage batch to top up.
37
+ * @param bzz The amount of BZZ to spend on the top-up.
38
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
39
+ */
40
+ calculateTopUpForBZZ(depth: number, bzz: BZZ, requestOptions?: BeeRequestOptions): Promise<{
41
+ amount: bigint;
42
+ duration: Duration;
43
+ }>;
44
+ /**
45
+ * Increases the duration of a postage batch by increasing its amount.
46
+ *
47
+ * @param postageBatchId Batch ID
48
+ * @param amount Amount to be added to the batch
49
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
50
+ */
51
+ topUp(postageBatchId: BatchId | Uint8Array | string, amount: NumberString | string | bigint, requestOptions?: BeeRequestOptions): Promise<BatchId>;
52
+ /**
53
+ * Dilutes a postage batch to extend its capacity by increasing its depth.
54
+ *
55
+ * @param postageBatchId Batch ID
56
+ * @param depth New depth for the batch
57
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
58
+ */
59
+ dilute(postageBatchId: BatchId | Uint8Array | string, depth: number, requestOptions?: BeeRequestOptions): Promise<BatchId>;
60
+ /**
61
+ * Returns details for a specific postage batch.
62
+ *
63
+ * @param postageBatchId Batch ID
64
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
65
+ * @param encryption Assume that uploads with this postage batch are encrypted, which skews the capacity.
66
+ * @param erasureCodeLevel Assume that uploads with this postage batch are erasure coded, which skews the capacity.
67
+ */
68
+ get(postageBatchId: BatchId | Uint8Array | string, requestOptions?: BeeRequestOptions, encryption?: boolean, erasureCodeLevel?: RedundancyLevel): Promise<PostageBatch>;
69
+ /**
70
+ * Returns details for a specific globally available postage batch.
71
+ *
72
+ * @param postageBatchId Batch ID
73
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
74
+ */
75
+ getGlobal(postageBatchId: BatchId | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<GlobalPostageBatch>;
76
+ /**
77
+ * Returns detailed information related to buckets for a specific postage batch.
78
+ *
79
+ * @param postageBatchId Batch ID
80
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
81
+ */
82
+ getBuckets(postageBatchId: BatchId | Uint8Array | string, requestOptions?: BeeRequestOptions): Promise<PostageBatchBuckets>;
83
+ /**
84
+ * Returns all postage batches that belong to the node.
85
+ *
86
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
87
+ */
88
+ getAll(requestOptions?: BeeRequestOptions): Promise<PostageBatch[]>;
89
+ /**
90
+ * Returns all globally available postage batches.
91
+ *
92
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
93
+ */
94
+ getAllGlobal(requestOptions?: BeeRequestOptions): Promise<GlobalPostageBatch[]>;
95
+ private waitForUsable;
96
+ }
@@ -1,8 +1,69 @@
1
- import { BeeRequestOptions } from '../index';
1
+ import type { BeeRequestOptions, ChainState, ReserveState } from '../types';
2
+ import type { BeeVersions, DebugStatus, Health, NodeInfo, Readiness } from '../types/debug';
3
+ import type { BeeContext } from './context';
2
4
  /**
3
- * Ping the base bee URL. If connection was not successful throw error
5
+ * Node status, health, version and chain/reserve state operations.
4
6
  *
5
- * @param requestOptions Options for making requests
7
+ * Accessed as `bee.status`.
6
8
  */
7
- export declare function checkConnection(requestOptions: BeeRequestOptions): Promise<void> | never;
8
- export declare function isGateway(requestOptions: BeeRequestOptions): Promise<boolean>;
9
+ export declare class Status {
10
+ private readonly context;
11
+ constructor(context: BeeContext);
12
+ /**
13
+ * Gets the general status of the node.
14
+ *
15
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
16
+ */
17
+ get(requestOptions?: BeeRequestOptions): Promise<DebugStatus>;
18
+ /**
19
+ * Gets the health of the node.
20
+ *
21
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
22
+ */
23
+ getHealth(requestOptions?: BeeRequestOptions): Promise<Health>;
24
+ /**
25
+ * Gets the readiness status of the node.
26
+ *
27
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
28
+ */
29
+ getReadiness(requestOptions?: BeeRequestOptions): Promise<Readiness>;
30
+ /**
31
+ * Gets mode information of the node.
32
+ *
33
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
34
+ */
35
+ getNodeInfo(requestOptions?: BeeRequestOptions): Promise<NodeInfo>;
36
+ /**
37
+ * Connects to a node and checks if its version matches with the one that bee-js supports.
38
+ *
39
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
40
+ */
41
+ isSupportedExactVersion(requestOptions?: BeeRequestOptions): Promise<boolean>;
42
+ /**
43
+ * Connects to a node and checks if its Main API version matches with the one that bee-js supports.
44
+ *
45
+ * This should be the main way how to check compatibility for your app and Bee node.
46
+ *
47
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
48
+ */
49
+ isSupportedApiVersion(requestOptions?: BeeRequestOptions): Promise<boolean>;
50
+ /**
51
+ * Returns object with all versions specified by the connected Bee node (properties prefixed with `bee*`)
52
+ * and versions that bee-js supports (properties prefixed with `supported*`).
53
+ *
54
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
55
+ */
56
+ getVersions(requestOptions?: BeeRequestOptions): Promise<BeeVersions>;
57
+ /**
58
+ * Gets reserve state.
59
+ *
60
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
61
+ */
62
+ getReserveState(requestOptions?: BeeRequestOptions): Promise<ReserveState>;
63
+ /**
64
+ * Gets chain state.
65
+ *
66
+ * @param requestOptions Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
67
+ */
68
+ getChainState(requestOptions?: BeeRequestOptions): Promise<ChainState>;
69
+ }