@ethersphere/bee-js 5.2.0 → 6.0.0-pre.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.
Files changed (111) hide show
  1. package/dist/cjs/bee-debug.js +58 -72
  2. package/dist/cjs/bee.js +71 -86
  3. package/dist/cjs/chunk/soc.js +14 -14
  4. package/dist/cjs/feed/index.js +20 -21
  5. package/dist/cjs/feed/json.js +2 -2
  6. package/dist/cjs/feed/retrievable.js +7 -8
  7. package/dist/cjs/index.js +7 -7
  8. package/dist/cjs/modules/bytes.js +15 -15
  9. package/dist/cjs/modules/bzz.js +24 -25
  10. package/dist/cjs/modules/chunk.js +10 -10
  11. package/dist/cjs/modules/debug/balance.js +16 -16
  12. package/dist/cjs/modules/debug/chequebook.js +34 -34
  13. package/dist/cjs/modules/debug/chunk.js +8 -8
  14. package/dist/cjs/modules/debug/connectivity.js +24 -24
  15. package/dist/cjs/modules/debug/settlements.js +8 -8
  16. package/dist/cjs/modules/debug/stake.js +11 -11
  17. package/dist/cjs/modules/debug/stamps.js +25 -25
  18. package/dist/cjs/modules/debug/states.js +12 -12
  19. package/dist/cjs/modules/debug/status.js +24 -24
  20. package/dist/cjs/modules/debug/tag.js +4 -4
  21. package/dist/cjs/modules/debug/transactions.js +16 -16
  22. package/dist/cjs/modules/feed.js +14 -14
  23. package/dist/cjs/modules/pinning.js +14 -14
  24. package/dist/cjs/modules/pss.js +6 -6
  25. package/dist/cjs/modules/soc.js +6 -6
  26. package/dist/cjs/modules/status.js +3 -3
  27. package/dist/cjs/modules/stewardship.js +7 -7
  28. package/dist/cjs/modules/tag.js +20 -20
  29. package/dist/cjs/utils/error.js +1 -35
  30. package/dist/cjs/utils/headers.js +3 -3
  31. package/dist/cjs/utils/http.js +14 -141
  32. package/dist/cjs/utils/type.js +1 -4
  33. package/dist/index.browser.min.js +1 -1
  34. package/dist/index.browser.min.js.LICENSE.txt +0 -8
  35. package/dist/index.browser.min.js.map +1 -1
  36. package/dist/mjs/bee-debug.js +59 -73
  37. package/dist/mjs/bee.js +72 -87
  38. package/dist/mjs/chunk/soc.js +14 -14
  39. package/dist/mjs/feed/index.js +20 -21
  40. package/dist/mjs/feed/json.js +2 -2
  41. package/dist/mjs/feed/retrievable.js +7 -8
  42. package/dist/mjs/index.js +2 -2
  43. package/dist/mjs/modules/bytes.js +15 -15
  44. package/dist/mjs/modules/bzz.js +24 -25
  45. package/dist/mjs/modules/chunk.js +10 -10
  46. package/dist/mjs/modules/debug/balance.js +16 -16
  47. package/dist/mjs/modules/debug/chequebook.js +34 -34
  48. package/dist/mjs/modules/debug/chunk.js +8 -8
  49. package/dist/mjs/modules/debug/connectivity.js +24 -24
  50. package/dist/mjs/modules/debug/settlements.js +8 -8
  51. package/dist/mjs/modules/debug/stake.js +11 -11
  52. package/dist/mjs/modules/debug/stamps.js +25 -25
  53. package/dist/mjs/modules/debug/states.js +12 -12
  54. package/dist/mjs/modules/debug/status.js +24 -25
  55. package/dist/mjs/modules/debug/tag.js +4 -4
  56. package/dist/mjs/modules/debug/transactions.js +16 -16
  57. package/dist/mjs/modules/feed.js +14 -14
  58. package/dist/mjs/modules/pinning.js +14 -14
  59. package/dist/mjs/modules/pss.js +6 -6
  60. package/dist/mjs/modules/soc.js +6 -6
  61. package/dist/mjs/modules/status.js +3 -3
  62. package/dist/mjs/modules/stewardship.js +7 -7
  63. package/dist/mjs/modules/tag.js +20 -20
  64. package/dist/mjs/utils/error.js +0 -31
  65. package/dist/mjs/utils/headers.js +3 -3
  66. package/dist/mjs/utils/http.js +10 -138
  67. package/dist/mjs/utils/type.js +2 -5
  68. package/dist/types/bee-debug.d.ts +50 -50
  69. package/dist/types/bee.d.ts +34 -34
  70. package/dist/types/chunk/soc.d.ts +5 -6
  71. package/dist/types/feed/index.d.ts +7 -8
  72. package/dist/types/feed/json.d.ts +2 -2
  73. package/dist/types/feed/retrievable.d.ts +2 -2
  74. package/dist/types/index.d.ts +2 -4
  75. package/dist/types/modules/bytes.d.ts +4 -5
  76. package/dist/types/modules/bzz.d.ts +5 -6
  77. package/dist/types/modules/chunk.d.ts +3 -4
  78. package/dist/types/modules/debug/balance.d.ts +5 -6
  79. package/dist/types/modules/debug/chequebook.d.ts +9 -10
  80. package/dist/types/modules/debug/chunk.d.ts +3 -4
  81. package/dist/types/modules/debug/connectivity.d.ts +7 -8
  82. package/dist/types/modules/debug/settlements.d.ts +3 -4
  83. package/dist/types/modules/debug/stake.d.ts +4 -5
  84. package/dist/types/modules/debug/stamps.d.ts +7 -8
  85. package/dist/types/modules/debug/states.d.ts +4 -5
  86. package/dist/types/modules/debug/status.d.ts +10 -10
  87. package/dist/types/modules/debug/tag.d.ts +2 -3
  88. package/dist/types/modules/debug/transactions.d.ts +5 -6
  89. package/dist/types/modules/feed.d.ts +3 -4
  90. package/dist/types/modules/pinning.d.ts +5 -6
  91. package/dist/types/modules/pss.d.ts +2 -3
  92. package/dist/types/modules/soc.d.ts +2 -3
  93. package/dist/types/modules/status.d.ts +2 -2
  94. package/dist/types/modules/stewardship.d.ts +3 -4
  95. package/dist/types/modules/tag.d.ts +6 -7
  96. package/dist/types/types/debug.d.ts +2 -2
  97. package/dist/types/types/index.d.ts +12 -51
  98. package/dist/types/utils/error.d.ts +0 -26
  99. package/dist/types/utils/headers.d.ts +1 -1
  100. package/dist/types/utils/http.d.ts +12 -21
  101. package/dist/types/utils/type.d.ts +2 -2
  102. package/package.json +4 -4
  103. package/dist/223.index.browser.min.js +0 -3
  104. package/dist/223.index.browser.min.js.LICENSE.txt +0 -1
  105. package/dist/223.index.browser.min.js.map +0 -1
  106. package/dist/cjs/utils/merge.js +0 -34
  107. package/dist/cjs/utils/sleep.js +0 -12
  108. package/dist/mjs/utils/merge.js +0 -32
  109. package/dist/mjs/utils/sleep.js +0 -8
  110. package/dist/types/utils/merge.d.ts +0 -8
  111. package/dist/types/utils/sleep.d.ts +0 -6
@@ -1,8 +1,8 @@
1
1
  import { Index, IndexBytes } from './feed';
2
2
  import { FeedType } from './feed/type';
3
+ import type { AddressPrefix, AnyJson, BatchId, BeeOptions, BeeRequestOptions, CollectionUploadOptions, Data, FeedReader, FeedWriter, FileData, FileUploadOptions, JsonFeedOptions, Pin, PssMessageHandler, PssSubscription, PublicKey, Reference, Signer, SOCReader, SOCWriter, Tag, Topic, UploadOptions, UploadResultWithCid } from './types';
4
+ import { AllTagsOptions, Collection, FeedManifestResult, Readable, ReferenceCidOrEns, ReferenceOrEns, UploadResult } from './types';
3
5
  import { EthAddress } from './utils/eth';
4
- import type { AddressPrefix, AnyJson, BatchId, BeeOptions, CollectionUploadOptions, Data, FeedReader, FeedWriter, FileData, FileUploadOptions, JsonFeedOptions, Pin, PssMessageHandler, PssSubscription, PublicKey, Reference, Signer, SOCReader, SOCWriter, Tag, Topic, UploadOptions, UploadResultWithCid } from './types';
5
- import { AllTagsOptions, Collection, FeedManifestResult, Readable, ReferenceCidOrEns, ReferenceOrEns, RequestOptions, UploadResult } from './types';
6
6
  /**
7
7
  * The main component that abstracts operations available on the main Bee API.
8
8
  *
@@ -22,7 +22,7 @@ export declare class Bee {
22
22
  * Ky instance that defines connection to Bee node
23
23
  * @private
24
24
  */
25
- private readonly kyOptions;
25
+ private readonly requestOptions;
26
26
  /**
27
27
  * @param url URL on which is the main API of Bee node exposed
28
28
  * @param options
@@ -39,7 +39,7 @@ export declare class Bee {
39
39
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
40
40
  * @see [Bee API reference - `POST /bytes`](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes/post)
41
41
  */
42
- uploadData(postageBatchId: string | BatchId, data: string | Uint8Array, options?: UploadOptions): Promise<UploadResult>;
42
+ uploadData(postageBatchId: string | BatchId, data: string | Uint8Array, options?: UploadOptions, requestOptions?: BeeRequestOptions): Promise<UploadResult>;
43
43
  /**
44
44
  * Download data as a byte array
45
45
  *
@@ -50,7 +50,7 @@ export declare class Bee {
50
50
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
51
51
  * @see [Bee API reference - `GET /bytes`](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes~1{reference}/get)
52
52
  */
53
- downloadData(reference: ReferenceOrEns | string, options?: RequestOptions): Promise<Data>;
53
+ downloadData(reference: ReferenceOrEns | string, options?: BeeRequestOptions): Promise<Data>;
54
54
  /**
55
55
  * Download data as a Readable stream
56
56
  *
@@ -61,7 +61,7 @@ export declare class Bee {
61
61
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
62
62
  * @see [Bee API reference - `GET /bytes`](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes~1{reference}/get)
63
63
  */
64
- downloadReadableData(reference: ReferenceOrEns | string, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
64
+ downloadReadableData(reference: ReferenceOrEns | string, options?: BeeRequestOptions): Promise<ReadableStream<Uint8Array>>;
65
65
  /**
66
66
  * Upload chunk to a Bee node
67
67
  *
@@ -73,7 +73,7 @@ export declare class Bee {
73
73
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
74
74
  * @see [Bee API reference - `POST /chunks`](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks/post)
75
75
  */
76
- uploadChunk(postageBatchId: string | BatchId, data: Uint8Array, options?: UploadOptions): Promise<Reference>;
76
+ uploadChunk(postageBatchId: string | BatchId, data: Uint8Array, options?: UploadOptions, requestOptions?: BeeRequestOptions): Promise<Reference>;
77
77
  /**
78
78
  * Download chunk as a byte array
79
79
  *
@@ -84,7 +84,7 @@ export declare class Bee {
84
84
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
85
85
  * @see [Bee API reference - `GET /chunks`](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks~1{reference}/get)
86
86
  */
87
- downloadChunk(reference: ReferenceOrEns | string, options?: RequestOptions): Promise<Data>;
87
+ downloadChunk(reference: ReferenceOrEns | string, options?: BeeRequestOptions): Promise<Data>;
88
88
  /**
89
89
  * Upload single file to a Bee node.
90
90
  *
@@ -101,7 +101,7 @@ export declare class Bee {
101
101
  * @see [Bee API reference - `POST /bzz`](https://docs.ethswarm.org/api/#tag/File/paths/~1bzz/post)
102
102
  * @returns reference is a content hash of the file
103
103
  */
104
- uploadFile(postageBatchId: string | BatchId, data: string | Uint8Array | Readable | File, name?: string, options?: FileUploadOptions): Promise<UploadResultWithCid>;
104
+ uploadFile(postageBatchId: string | BatchId, data: string | Uint8Array | Readable | File, name?: string, options?: FileUploadOptions, requestOptions?: BeeRequestOptions): Promise<UploadResultWithCid>;
105
105
  /**
106
106
  * Download single file.
107
107
  *
@@ -114,7 +114,7 @@ export declare class Bee {
114
114
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
115
115
  * @see [Bee API reference - `GET /bzz`](https://docs.ethswarm.org/api/#tag/Collection/paths/~1bzz~1{reference}~1{path}/get)
116
116
  */
117
- downloadFile(reference: ReferenceCidOrEns | string, path?: string, options?: RequestOptions): Promise<FileData<Data>>;
117
+ downloadFile(reference: ReferenceCidOrEns | string, path?: string, options?: BeeRequestOptions): Promise<FileData<Data>>;
118
118
  /**
119
119
  * Download single file as a readable stream
120
120
  *
@@ -127,7 +127,7 @@ export declare class Bee {
127
127
  * @see [Bee docs - Upload and download](https://docs.ethswarm.org/docs/access-the-swarm/upload-and-download)
128
128
  * @see [Bee API reference - `GET /bzz`](https://docs.ethswarm.org/api/#tag/Collection/paths/~1bzz~1{reference}~1{path}/get)
129
129
  */
130
- downloadReadableFile(reference: ReferenceCidOrEns | string, path?: string, options?: RequestOptions): Promise<FileData<ReadableStream<Uint8Array>>>;
130
+ downloadReadableFile(reference: ReferenceCidOrEns | string, path?: string, options?: BeeRequestOptions): Promise<FileData<ReadableStream<Uint8Array>>>;
131
131
  /**
132
132
  * Upload collection of files to a Bee node
133
133
  *
@@ -144,7 +144,7 @@ export declare class Bee {
144
144
  * @see [Bee docs - Upload directory](https://docs.ethswarm.org/docs/access-the-swarm/upload-a-directory/)
145
145
  * @see [Bee API reference - `POST /bzz`](https://docs.ethswarm.org/api/#tag/Collection/paths/~1bzz/post)
146
146
  */
147
- uploadFiles(postageBatchId: string | BatchId, fileList: FileList | File[], options?: CollectionUploadOptions): Promise<UploadResultWithCid>;
147
+ uploadFiles(postageBatchId: string | BatchId, fileList: FileList | File[], options?: CollectionUploadOptions, requestOptions?: BeeRequestOptions): Promise<UploadResultWithCid>;
148
148
  /**
149
149
  * Upload Collection that you can assembly yourself.
150
150
  *
@@ -172,7 +172,7 @@ export declare class Bee {
172
172
  * @see [Bee docs - Upload directory](https://docs.ethswarm.org/docs/access-the-swarm/upload-a-directory/)
173
173
  * @see [Bee API reference - `POST /bzz`](https://docs.ethswarm.org/api/#tag/Collection/paths/~1bzz/post)
174
174
  */
175
- uploadFilesFromDirectory(postageBatchId: string | BatchId, dir: string, options?: CollectionUploadOptions): Promise<UploadResultWithCid>;
175
+ uploadFilesFromDirectory(postageBatchId: string | BatchId, dir: string, options?: CollectionUploadOptions, requestOptions?: BeeRequestOptions): Promise<UploadResultWithCid>;
176
176
  /**
177
177
  * Create a new Tag which is meant for tracking progres of syncing data across network.
178
178
  *
@@ -180,7 +180,7 @@ export declare class Bee {
180
180
  * @see [Bee docs - Syncing / Tags](https://docs.ethswarm.org/docs/access-the-swarm/syncing)
181
181
  * @see [Bee API reference - `POST /tags`](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags/post)
182
182
  */
183
- createTag(options?: RequestOptions): Promise<Tag>;
183
+ createTag(options?: BeeRequestOptions): Promise<Tag>;
184
184
  /**
185
185
  * Fetches all tags.
186
186
  *
@@ -205,7 +205,7 @@ export declare class Bee {
205
205
  * @see [Bee API reference - `GET /tags/{uid}`](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1{uid}/get)
206
206
  *
207
207
  */
208
- retrieveTag(tagUid: number | Tag, options?: RequestOptions): Promise<Tag>;
208
+ retrieveTag(tagUid: number | Tag, options?: BeeRequestOptions): Promise<Tag>;
209
209
  /**
210
210
  * Delete Tag
211
211
  *
@@ -217,7 +217,7 @@ export declare class Bee {
217
217
  * @see [Bee docs - Syncing / Tags](https://docs.ethswarm.org/docs/access-the-swarm/syncing)
218
218
  * @see [Bee API reference - `DELETE /tags/{uid}`](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1{uid}/delete)
219
219
  */
220
- deleteTag(tagUid: number | Tag, options?: RequestOptions): Promise<void>;
220
+ deleteTag(tagUid: number | Tag, options?: BeeRequestOptions): Promise<void>;
221
221
  /**
222
222
  * Update tag's total chunks count.
223
223
  *
@@ -233,7 +233,7 @@ export declare class Bee {
233
233
  * @see [Bee docs - Syncing / Tags](https://docs.ethswarm.org/docs/access-the-swarm/syncing)
234
234
  * @see [Bee API reference - `PATCH /tags/{uid}`](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1{uid}/patch)
235
235
  */
236
- updateTag(tagUid: number | Tag, reference: Reference | string, options?: RequestOptions): Promise<void>;
236
+ updateTag(tagUid: number | Tag, reference: Reference | string, options?: BeeRequestOptions): Promise<void>;
237
237
  /**
238
238
  * Pin local data with given reference
239
239
  *
@@ -243,7 +243,7 @@ export declare class Bee {
243
243
  *
244
244
  * @see [Bee docs - Pinning](https://docs.ethswarm.org/docs/access-the-swarm/pinning)
245
245
  */
246
- pin(reference: Reference | string, options?: RequestOptions): Promise<void>;
246
+ pin(reference: Reference | string, options?: BeeRequestOptions): Promise<void>;
247
247
  /**
248
248
  * Unpin local data with given reference
249
249
  *
@@ -253,14 +253,14 @@ export declare class Bee {
253
253
  *
254
254
  * @see [Bee docs - Pinning](https://docs.ethswarm.org/docs/access-the-swarm/pinning)
255
255
  */
256
- unpin(reference: Reference | string, options?: RequestOptions): Promise<void>;
256
+ unpin(reference: Reference | string, options?: BeeRequestOptions): Promise<void>;
257
257
  /**
258
258
  * Get list of all locally pinned references
259
259
  *
260
260
  * @param options Options that affects the request behavior
261
261
  * @see [Bee docs - Pinning](https://docs.ethswarm.org/docs/access-the-swarm/pinning)
262
262
  */
263
- getAllPins(options?: RequestOptions): Promise<Reference[]>;
263
+ getAllPins(options?: BeeRequestOptions): Promise<Reference[]>;
264
264
  /**
265
265
  * Get pinning status of chunk with given reference
266
266
  *
@@ -271,7 +271,7 @@ export declare class Bee {
271
271
  *
272
272
  * @see [Bee docs - Pinning](https://docs.ethswarm.org/docs/access-the-swarm/pinning)
273
273
  */
274
- getPin(reference: Reference | string, options?: RequestOptions): Promise<Pin>;
274
+ getPin(reference: Reference | string, options?: BeeRequestOptions): Promise<Pin>;
275
275
  /**
276
276
  * Instructs the Bee node to reupload a locally pinned data into the network.
277
277
  *
@@ -283,7 +283,7 @@ export declare class Bee {
283
283
  *
284
284
  * @see [Bee API reference - `PUT /stewardship`](https://docs.ethswarm.org/api/#tag/Stewardship/paths/~1stewardship~1{reference}/put)
285
285
  */
286
- reuploadPinnedData(reference: ReferenceOrEns | string, options?: RequestOptions): Promise<void>;
286
+ reuploadPinnedData(reference: ReferenceOrEns | string, options?: BeeRequestOptions): Promise<void>;
287
287
  /**
288
288
  * Checks if content specified by reference is retrievable from the network.
289
289
  *
@@ -294,7 +294,7 @@ export declare class Bee {
294
294
  *
295
295
  * @see [Bee API reference - `GET /stewardship`](https://docs.ethswarm.org/api/#tag/Stewardship/paths/~1stewardship~1{reference}/get)
296
296
  */
297
- isReferenceRetrievable(reference: ReferenceOrEns | string, options?: RequestOptions): Promise<boolean>;
297
+ isReferenceRetrievable(reference: ReferenceOrEns | string, options?: BeeRequestOptions): Promise<boolean>;
298
298
  /**
299
299
  * Functions that validates if feed is retrievable in the network.
300
300
  *
@@ -310,7 +310,7 @@ export declare class Bee {
310
310
  * @param index
311
311
  * @param options
312
312
  */
313
- isFeedRetrievable(type: FeedType, owner: EthAddress | Uint8Array | string, topic: Topic | Uint8Array | string, index?: Index | number | IndexBytes | string, options?: RequestOptions): Promise<boolean>;
313
+ isFeedRetrievable(type: FeedType, owner: EthAddress | Uint8Array | string, topic: Topic | Uint8Array | string, index?: Index | number | IndexBytes | string, options?: BeeRequestOptions): Promise<boolean>;
314
314
  /**
315
315
  * Send data to recipient or target with Postal Service for Swarm.
316
316
  *
@@ -333,7 +333,7 @@ export declare class Bee {
333
333
  * @see [Bee docs - PSS](https://docs.ethswarm.org/docs/dapps-on-swarm/pss)
334
334
  * @see [Bee API reference - `POST /pss`](https://docs.ethswarm.org/api/#tag/Postal-Service-for-Swarm/paths/~1pss~1send~1{topic}~1{targets}/post)
335
335
  */
336
- pssSend(postageBatchId: string | BatchId, topic: string, target: AddressPrefix, data: string | Uint8Array, recipient?: string | PublicKey, options?: RequestOptions): Promise<void>;
336
+ pssSend(postageBatchId: string | BatchId, topic: string, target: AddressPrefix, data: string | Uint8Array, recipient?: string | PublicKey, options?: BeeRequestOptions): Promise<void>;
337
337
  /**
338
338
  * Subscribe to messages for given topic with Postal Service for Swarm
339
339
  *
@@ -388,7 +388,7 @@ export declare class Bee {
388
388
  * @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
389
389
  * @see [Bee API reference - `POST /feeds`](https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1{owner}~1{topic}/post)
390
390
  */
391
- createFeedManifest(postageBatchId: string | BatchId, type: FeedType, topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, options?: RequestOptions): Promise<FeedManifestResult>;
391
+ createFeedManifest(postageBatchId: string | BatchId, type: FeedType, topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, options?: BeeRequestOptions): Promise<FeedManifestResult>;
392
392
  /**
393
393
  * Make a new feed reader for downloading feed updates.
394
394
  *
@@ -399,7 +399,7 @@ export declare class Bee {
399
399
  *
400
400
  * @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
401
401
  */
402
- makeFeedReader(type: FeedType, topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, options?: RequestOptions): FeedReader;
402
+ makeFeedReader(type: FeedType, topic: Topic | Uint8Array | string, owner: EthAddress | Uint8Array | string, options?: BeeRequestOptions): FeedReader;
403
403
  /**
404
404
  * Make a new feed writer for updating feeds
405
405
  *
@@ -410,7 +410,7 @@ export declare class Bee {
410
410
  *
411
411
  * @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
412
412
  */
413
- makeFeedWriter(type: FeedType, topic: Topic | Uint8Array | string, signer?: Signer | Uint8Array | string, options?: RequestOptions): FeedWriter;
413
+ makeFeedWriter(type: FeedType, topic: Topic | Uint8Array | string, signer?: Signer | Uint8Array | string, options?: BeeRequestOptions): FeedWriter;
414
414
  /**
415
415
  * High-level function that allows you to easily set JSON data to feed.
416
416
  * JSON-like data types are supported.
@@ -429,7 +429,7 @@ export declare class Bee {
429
429
  *
430
430
  * @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
431
431
  */
432
- setJsonFeed<T extends AnyJson>(postageBatchId: string | BatchId, topic: string, data: T, options?: JsonFeedOptions): Promise<Reference>;
432
+ setJsonFeed<T extends AnyJson>(postageBatchId: string | BatchId, topic: string, data: T, options?: JsonFeedOptions, requestOptions?: BeeRequestOptions): Promise<Reference>;
433
433
  /**
434
434
  * High-level function that allows you to easily get data from feed.
435
435
  * Returned data are parsed using JSON.parse().
@@ -466,7 +466,7 @@ export declare class Bee {
466
466
  * @param options Options that affects the request behavior
467
467
  * @see [Bee docs - Chunk Types](https://docs.ethswarm.org/docs/dapps-on-swarm/chunk-types#single-owner-chunks)
468
468
  */
469
- makeSOCReader(ownerAddress: EthAddress | Uint8Array | string, options?: RequestOptions): SOCReader;
469
+ makeSOCReader(ownerAddress: EthAddress | Uint8Array | string, options?: BeeRequestOptions): SOCReader;
470
470
  /**
471
471
  * Returns an object for reading and writing single owner chunks
472
472
  *
@@ -474,26 +474,26 @@ export declare class Bee {
474
474
  * @param options Options that affects the request behavior
475
475
  * @see [Bee docs - Chunk Types](https://docs.ethswarm.org/docs/dapps-on-swarm/chunk-types#single-owner-chunks)
476
476
  */
477
- makeSOCWriter(signer?: Signer | Uint8Array | string, options?: RequestOptions): SOCWriter;
477
+ makeSOCWriter(signer?: Signer | Uint8Array | string, options?: BeeRequestOptions): SOCWriter;
478
478
  /**
479
479
  * Ping the Bee node to see if there is a live Bee node on the given URL.
480
480
  *
481
481
  * @param options Options that affects the request behavior
482
482
  * @throws If connection was not successful throw error
483
483
  */
484
- checkConnection(options?: RequestOptions): Promise<void> | never;
484
+ checkConnection(options?: BeeRequestOptions): Promise<void> | never;
485
485
  /**
486
486
  * Ping the Bee node to see if there is a live Bee node on the given URL.
487
487
  *
488
488
  * @param options Options that affects the request behavior
489
489
  * @returns true if successful, false on error
490
490
  */
491
- isConnected(options?: RequestOptions): Promise<boolean>;
491
+ isConnected(options?: BeeRequestOptions): Promise<boolean>;
492
492
  /**
493
493
  * @param signer
494
494
  * @private
495
495
  * @throws BeeError if either no Signer was passed or no default Signer was specified for the instance
496
496
  */
497
497
  private resolveSigner;
498
- private getKyOptionsForCall;
498
+ private getRequestOptionsForCall;
499
499
  }
@@ -1,8 +1,7 @@
1
+ import { BatchId, BeeRequestOptions, PlainBytesReference, Reference, Signature, Signer, UploadOptions } from '../types';
1
2
  import { Bytes } from '../utils/bytes';
2
- import { Chunk } from './cac';
3
- import { UploadOptions, Signature, Signer, BatchId, Reference, PlainBytesReference } from '../types';
4
3
  import { EthAddress } from '../utils/eth';
5
- import type { Options as KyOptions } from 'ky';
4
+ import { Chunk } from './cac';
6
5
  export type Identifier = Bytes<32>;
7
6
  /**
8
7
  * With single owner chunks, a user can assign arbitrary data to an
@@ -45,7 +44,7 @@ export declare function makeSingleOwnerChunk(chunk: Chunk, identifier: Identifie
45
44
  * @param postageBatchId Postage BatchId that will be assigned to uploaded data
46
45
  * @param options Upload options
47
46
  */
48
- export declare function uploadSingleOwnerChunk(kyOptions: KyOptions, chunk: SingleOwnerChunk, postageBatchId: BatchId, options?: UploadOptions): Promise<Reference>;
47
+ export declare function uploadSingleOwnerChunk(requestOptions: BeeRequestOptions, chunk: SingleOwnerChunk, postageBatchId: BatchId, options?: UploadOptions): Promise<Reference>;
49
48
  /**
50
49
  * Helper function to create and upload SOC.
51
50
  *
@@ -56,7 +55,7 @@ export declare function uploadSingleOwnerChunk(kyOptions: KyOptions, chunk: Sing
56
55
  * @param data The chunk data
57
56
  * @param options
58
57
  */
59
- export declare function uploadSingleOwnerChunkData(kyOptions: KyOptions, signer: Signer, postageBatchId: BatchId | string, identifier: Identifier, data: Uint8Array, options?: UploadOptions): Promise<Reference>;
58
+ export declare function uploadSingleOwnerChunkData(requestOptions: BeeRequestOptions, signer: Signer, postageBatchId: BatchId | string, identifier: Identifier, data: Uint8Array, options?: UploadOptions): Promise<Reference>;
60
59
  /**
61
60
  * Helper function to download SOC.
62
61
  *
@@ -64,4 +63,4 @@ export declare function uploadSingleOwnerChunkData(kyOptions: KyOptions, signer:
64
63
  * @param ownerAddress The singer interface for signing the chunk
65
64
  * @param identifier The identifier of the chunk
66
65
  */
67
- export declare function downloadSingleOwnerChunk(kyOptions: KyOptions, ownerAddress: EthAddress, identifier: Identifier): Promise<SingleOwnerChunk>;
66
+ export declare function downloadSingleOwnerChunk(requestOptions: BeeRequestOptions, ownerAddress: EthAddress, identifier: Identifier): Promise<SingleOwnerChunk>;
@@ -1,9 +1,8 @@
1
1
  import { FeedUpdateOptions } from '../modules/feed';
2
- import { BatchId, BytesReference, FEED_INDEX_HEX_LENGTH, FeedReader, FeedWriter, PlainBytesReference, Reference, Signer, Topic, UploadOptions } from '../types';
2
+ import { BatchId, BeeRequestOptions, BytesReference, FeedReader, FeedWriter, FEED_INDEX_HEX_LENGTH, PlainBytesReference, Reference, Signer, Topic, UploadOptions } from '../types';
3
3
  import { Bytes } from '../utils/bytes';
4
- import { HexString } from '../utils/hex';
5
4
  import { EthAddress, HexEthAddress } from '../utils/eth';
6
- import type { Options as KyOptions } from 'ky';
5
+ import { HexString } from '../utils/hex';
7
6
  import type { FeedType } from './type';
8
7
  export interface Epoch {
9
8
  time: number;
@@ -21,9 +20,9 @@ export interface FeedUpdate {
21
20
  timestamp: number;
22
21
  reference: BytesReference;
23
22
  }
24
- export declare function findNextIndex(kyOptions: KyOptions, owner: HexEthAddress, topic: Topic, options?: FeedUpdateOptions): Promise<HexString<typeof FEED_INDEX_HEX_LENGTH>>;
25
- export declare function updateFeed(kyOptions: KyOptions, signer: Signer, topic: Topic, reference: BytesReference, postageBatchId: BatchId, options?: FeedUploadOptions, index?: Index): Promise<Reference>;
23
+ export declare function findNextIndex(requestOptions: BeeRequestOptions, owner: HexEthAddress, topic: Topic, options?: FeedUpdateOptions): Promise<HexString<typeof FEED_INDEX_HEX_LENGTH>>;
24
+ export declare function updateFeed(requestOptions: BeeRequestOptions, signer: Signer, topic: Topic, reference: BytesReference, postageBatchId: BatchId, options?: FeedUploadOptions, index?: Index): Promise<Reference>;
26
25
  export declare function getFeedUpdateChunkReference(owner: EthAddress, topic: Topic, index: Index): PlainBytesReference;
27
- export declare function downloadFeedUpdate(kyOptions: KyOptions, owner: EthAddress, topic: Topic, index: Index): Promise<FeedUpdate>;
28
- export declare function makeFeedReader(kyOptions: KyOptions, type: FeedType, topic: Topic, owner: HexEthAddress): FeedReader;
29
- export declare function makeFeedWriter(kyOptions: KyOptions, type: FeedType, topic: Topic, signer: Signer): FeedWriter;
26
+ export declare function downloadFeedUpdate(requestOptions: BeeRequestOptions, owner: EthAddress, topic: Topic, index: Index): Promise<FeedUpdate>;
27
+ export declare function makeFeedReader(requestOptions: BeeRequestOptions, type: FeedType, topic: Topic, owner: HexEthAddress): FeedReader;
28
+ export declare function makeFeedWriter(requestOptions: BeeRequestOptions, type: FeedType, topic: Topic, signer: Signer): FeedWriter;
@@ -1,4 +1,4 @@
1
- import { FeedWriter, FeedReader, AnyJson, BatchId, Reference, RequestOptions } from '../types';
2
1
  import { Bee } from '../bee';
2
+ import { AnyJson, BatchId, BeeRequestOptions, FeedReader, FeedWriter, JsonFeedOptions, Reference, UploadOptions } from '../types';
3
3
  export declare function getJsonData<T extends AnyJson>(bee: Bee, reader: FeedReader): Promise<T>;
4
- export declare function setJsonData(bee: Bee, writer: FeedWriter, postageBatchId: BatchId, data: AnyJson, options?: RequestOptions): Promise<Reference>;
4
+ export declare function setJsonData(bee: Bee, writer: FeedWriter, postageBatchId: BatchId, data: AnyJson, options?: JsonFeedOptions & UploadOptions, requestOptions?: BeeRequestOptions): Promise<Reference>;
@@ -1,5 +1,5 @@
1
1
  import { Bee } from '../bee';
2
+ import { BeeRequestOptions, Topic } from '../types';
2
3
  import { EthAddress } from '../utils/eth';
3
- import { RequestOptions, Topic } from '../types';
4
4
  import { Index } from './index';
5
- export declare function areAllSequentialFeedsUpdateRetrievable(bee: Bee, owner: EthAddress, topic: Topic, index: Index, options?: RequestOptions): Promise<boolean>;
5
+ export declare function areAllSequentialFeedsUpdateRetrievable(bee: Bee, owner: EthAddress, topic: Topic, index: Index, requestOptions: BeeRequestOptions): Promise<boolean>;
@@ -1,9 +1,9 @@
1
1
  import { Bee } from './bee';
2
2
  import { BeeDebug } from './bee-debug';
3
- export * as Utils from './utils/expose';
3
+ export { SUPPORTED_BEE_VERSION, SUPPORTED_BEE_VERSION_EXACT } from './modules/debug/status';
4
4
  export * from './types';
5
5
  export * from './utils/error';
6
- export { SUPPORTED_BEE_VERSION, SUPPORTED_BEE_VERSION_EXACT } from './modules/debug/status';
6
+ export * as Utils from './utils/expose';
7
7
  export { Bee, BeeDebug };
8
8
  declare global {
9
9
  interface Window {
@@ -12,8 +12,6 @@ declare global {
12
12
  BeeDebug: typeof import('./bee-debug').BeeDebug;
13
13
  Utils: typeof import('./utils/expose');
14
14
  BeeError: typeof import('./utils/error').BeeError;
15
- BeeRequestError: typeof import('./utils/error').BeeRequestError;
16
- BeeResponseError: typeof import('./utils/error').BeeResponseError;
17
15
  BeeArgumentError: typeof import('./utils/error').BeeArgumentError;
18
16
  };
19
17
  }
@@ -1,6 +1,5 @@
1
- import type { BatchId, Data, ReferenceOrEns, UploadOptions } from '../types';
1
+ import type { BatchId, BeeRequestOptions, Data, ReferenceOrEns, UploadOptions } from '../types';
2
2
  import { UploadResult } from '../types';
3
- import type { Options as KyOptions } from 'ky';
4
3
  /**
5
4
  * Upload data to a Bee node
6
5
  *
@@ -9,18 +8,18 @@ import type { Options as KyOptions } from 'ky';
9
8
  * @param postageBatchId Postage BatchId that will be assigned to uploaded data
10
9
  * @param options Additional options like tag, encryption, pinning
11
10
  */
12
- export declare function upload(kyOptions: KyOptions, data: string | Uint8Array, postageBatchId: BatchId, options?: UploadOptions): Promise<UploadResult>;
11
+ export declare function upload(requestOptions: BeeRequestOptions, data: string | Uint8Array, postageBatchId: BatchId, options?: UploadOptions): Promise<UploadResult>;
13
12
  /**
14
13
  * Download data as a byte array
15
14
  *
16
15
  * @param ky
17
16
  * @param hash Bee content reference
18
17
  */
19
- export declare function download(kyOptions: KyOptions, hash: ReferenceOrEns): Promise<Data>;
18
+ export declare function download(requestOptions: BeeRequestOptions, hash: ReferenceOrEns): Promise<Data>;
20
19
  /**
21
20
  * Download data as a readable stream
22
21
  *
23
22
  * @param ky
24
23
  * @param hash Bee content reference
25
24
  */
26
- export declare function downloadReadable(kyOptions: KyOptions, hash: ReferenceOrEns): Promise<ReadableStream<Uint8Array>>;
25
+ export declare function downloadReadable(requestOptions: BeeRequestOptions, hash: ReferenceOrEns): Promise<ReadableStream<Uint8Array>>;
@@ -1,5 +1,4 @@
1
- import { BatchId, Collection, CollectionUploadOptions, Data, FileData, FileUploadOptions, Readable, ReferenceOrEns, UploadResult } from '../types';
2
- import type { Options as KyOptions } from 'ky';
1
+ import { BatchId, BeeRequestOptions, Collection, CollectionUploadOptions, Data, FileData, FileUploadOptions, Readable, ReferenceOrEns, UploadResult } from '../types';
3
2
  /**
4
3
  * Upload single file
5
4
  *
@@ -9,7 +8,7 @@ import type { Options as KyOptions } from 'ky';
9
8
  * @param name Name that will be attached to the uploaded file. Wraps the data into manifest with set index document.
10
9
  * @param options
11
10
  */
12
- export declare function uploadFile(kyOptions: KyOptions, data: string | Uint8Array | Readable | ArrayBuffer, postageBatchId: BatchId, name?: string, options?: FileUploadOptions): Promise<UploadResult>;
11
+ export declare function uploadFile(requestOptions: BeeRequestOptions, data: string | Uint8Array | Readable | ArrayBuffer, postageBatchId: BatchId, name?: string, options?: FileUploadOptions): Promise<UploadResult>;
13
12
  /**
14
13
  * Download single file as a buffer
15
14
  *
@@ -17,7 +16,7 @@ export declare function uploadFile(kyOptions: KyOptions, data: string | Uint8Arr
17
16
  * @param hash Bee file or collection hash
18
17
  * @param path If hash is collection then this defines path to a single file in the collection
19
18
  */
20
- export declare function downloadFile(kyOptions: KyOptions, hash: ReferenceOrEns, path?: string): Promise<FileData<Data>>;
19
+ export declare function downloadFile(requestOptions: BeeRequestOptions, hash: ReferenceOrEns, path?: string): Promise<FileData<Data>>;
21
20
  /**
22
21
  * Download single file as a readable stream
23
22
  *
@@ -25,7 +24,7 @@ export declare function downloadFile(kyOptions: KyOptions, hash: ReferenceOrEns,
25
24
  * @param hash Bee file or collection hash
26
25
  * @param path If hash is collection then this defines path to a single file in the collection
27
26
  */
28
- export declare function downloadFileReadable(kyOptions: KyOptions, hash: ReferenceOrEns, path?: string): Promise<FileData<ReadableStream<Uint8Array>>>;
27
+ export declare function downloadFileReadable(requestOptions: BeeRequestOptions, hash: ReferenceOrEns, path?: string): Promise<FileData<ReadableStream<Uint8Array>>>;
29
28
  /**
30
29
  * Upload collection
31
30
  * @param kyOptions Ky Options for making requests
@@ -33,4 +32,4 @@ export declare function downloadFileReadable(kyOptions: KyOptions, hash: Referen
33
32
  * @param postageBatchId Postage BatchId that will be assigned to uploaded data
34
33
  * @param options
35
34
  */
36
- export declare function uploadCollection(kyOptions: KyOptions, collection: Collection<Uint8Array>, postageBatchId: BatchId, options?: CollectionUploadOptions): Promise<UploadResult>;
35
+ export declare function uploadCollection(requestOptions: BeeRequestOptions, collection: Collection<Uint8Array>, postageBatchId: BatchId, options?: CollectionUploadOptions): Promise<UploadResult>;
@@ -1,5 +1,4 @@
1
- import type { BatchId, Data, Reference, ReferenceOrEns, UploadOptions } from '../types';
2
- import type { Options as KyOptions } from 'ky';
1
+ import type { BatchId, BeeRequestOptions, Data, Reference, ReferenceOrEns, UploadOptions } from '../types';
3
2
  /**
4
3
  * Upload chunk to a Bee node
5
4
  *
@@ -12,7 +11,7 @@ import type { Options as KyOptions } from 'ky';
12
11
  * @param postageBatchId Postage BatchId that will be assigned to uploaded data
13
12
  * @param options Additional options like tag, encryption, pinning
14
13
  */
15
- export declare function upload(kyOptions: KyOptions, data: Uint8Array, postageBatchId: BatchId, options?: UploadOptions): Promise<Reference>;
14
+ export declare function upload(requestOptions: BeeRequestOptions, data: Uint8Array, postageBatchId: BatchId, options?: UploadOptions): Promise<Reference>;
16
15
  /**
17
16
  * Download chunk data as a byte array
18
17
  *
@@ -20,4 +19,4 @@ export declare function upload(kyOptions: KyOptions, data: Uint8Array, postageBa
20
19
  * @param hash Bee content reference
21
20
  *
22
21
  */
23
- export declare function download(kyOptions: KyOptions, hash: ReferenceOrEns): Promise<Data>;
22
+ export declare function download(requestOptions: BeeRequestOptions, hash: ReferenceOrEns): Promise<Data>;
@@ -1,28 +1,27 @@
1
- import type { PeerBalance, BalanceResponse } from '../../types';
2
- import type { Options as KyOptions } from 'ky';
1
+ import type { BalanceResponse, BeeRequestOptions, PeerBalance } from '../../types';
3
2
  /**
4
3
  * Get the balances with all known peers including prepaid services
5
4
  *
6
5
  * @param kyOptions Ky Options for making requests
7
6
  */
8
- export declare function getAllBalances(kyOptions: KyOptions): Promise<BalanceResponse>;
7
+ export declare function getAllBalances(requestOptions: BeeRequestOptions): Promise<BalanceResponse>;
9
8
  /**
10
9
  * Get the balances with a specific peer including prepaid services
11
10
  *
12
11
  * @param kyOptions Ky Options for making requests
13
12
  * @param address Swarm address of peer
14
13
  */
15
- export declare function getPeerBalance(kyOptions: KyOptions, address: string): Promise<PeerBalance>;
14
+ export declare function getPeerBalance(requestOptions: BeeRequestOptions, address: string): Promise<PeerBalance>;
16
15
  /**
17
16
  * Get the past due consumption balances with all known peers
18
17
  *
19
18
  * @param kyOptions Ky Options for making requests
20
19
  */
21
- export declare function getPastDueConsumptionBalances(kyOptions: KyOptions): Promise<BalanceResponse>;
20
+ export declare function getPastDueConsumptionBalances(requestOptions: BeeRequestOptions): Promise<BalanceResponse>;
22
21
  /**
23
22
  * Get the past due consumption balance with a specific peer
24
23
  *
25
24
  * @param kyOptions Ky Options for making requests
26
25
  * @param address Swarm address of peer
27
26
  */
28
- export declare function getPastDueConsumptionPeerBalance(kyOptions: KyOptions, address: string): Promise<PeerBalance>;
27
+ export declare function getPastDueConsumptionPeerBalance(requestOptions: BeeRequestOptions, address: string): Promise<PeerBalance>;
@@ -1,24 +1,23 @@
1
- import type { ChequebookAddressResponse, ChequebookBalanceResponse, LastCashoutActionResponse, LastChequesForPeerResponse, LastChequesResponse, NumberString, CashoutOptions, TransactionHash } from '../../types';
2
- import type { Options as KyOptions } from 'ky';
1
+ import type { BeeRequestOptions, CashoutOptions, ChequebookAddressResponse, ChequebookBalanceResponse, LastCashoutActionResponse, LastChequesForPeerResponse, LastChequesResponse, NumberString, TransactionHash } from '../../types';
3
2
  /**
4
3
  * Get the address of the chequebook contract used
5
4
  *
6
5
  * @param kyOptions Ky Options for making requests
7
6
  */
8
- export declare function getChequebookAddress(kyOptions: KyOptions): Promise<ChequebookAddressResponse>;
7
+ export declare function getChequebookAddress(requestOptions: BeeRequestOptions): Promise<ChequebookAddressResponse>;
9
8
  /**
10
9
  * Get the balance of the chequebook
11
10
  *
12
11
  * @param kyOptions Ky Options for making requests
13
12
  */
14
- export declare function getChequebookBalance(kyOptions: KyOptions): Promise<ChequebookBalanceResponse>;
13
+ export declare function getChequebookBalance(requestOptions: BeeRequestOptions): Promise<ChequebookBalanceResponse>;
15
14
  /**
16
15
  * Get last cashout action for the peer
17
16
  *
18
17
  * @param kyOptions Ky Options for making requests
19
18
  * @param peer Swarm address of peer
20
19
  */
21
- export declare function getLastCashoutAction(kyOptions: KyOptions, peer: string): Promise<LastCashoutActionResponse>;
20
+ export declare function getLastCashoutAction(requestOptions: BeeRequestOptions, peer: string): Promise<LastCashoutActionResponse>;
22
21
  /**
23
22
  * Cashout the last cheque for the peer
24
23
  *
@@ -26,20 +25,20 @@ export declare function getLastCashoutAction(kyOptions: KyOptions, peer: string)
26
25
  * @param peer Swarm address of peer
27
26
  * @param options
28
27
  */
29
- export declare function cashoutLastCheque(kyOptions: KyOptions, peer: string, options?: CashoutOptions): Promise<TransactionHash>;
28
+ export declare function cashoutLastCheque(requestOptions: BeeRequestOptions, peer: string, options?: CashoutOptions): Promise<TransactionHash>;
30
29
  /**
31
30
  * Get last cheques for the peer
32
31
  *
33
32
  * @param kyOptions Ky Options for making requests
34
33
  * @param peer Swarm address of peer
35
34
  */
36
- export declare function getLastChequesForPeer(kyOptions: KyOptions, peer: string): Promise<LastChequesForPeerResponse>;
35
+ export declare function getLastChequesForPeer(requestOptions: BeeRequestOptions, peer: string): Promise<LastChequesForPeerResponse>;
37
36
  /**
38
37
  * Get last cheques for all peers
39
38
  *
40
39
  * @param kyOptions Ky Options for making requests
41
40
  */
42
- export declare function getLastCheques(kyOptions: KyOptions): Promise<LastChequesResponse>;
41
+ export declare function getLastCheques(requestOptions: BeeRequestOptions): Promise<LastChequesResponse>;
43
42
  /**
44
43
  * Deposit tokens from overlay address into chequebook
45
44
  *
@@ -48,7 +47,7 @@ export declare function getLastCheques(kyOptions: KyOptions): Promise<LastCheque
48
47
  * @param gasPrice Gas Price in WEI for the transaction call
49
48
  * @return string Hash of the transaction
50
49
  */
51
- export declare function depositTokens(kyOptions: KyOptions, amount: number | NumberString, gasPrice?: NumberString): Promise<TransactionHash>;
50
+ export declare function depositTokens(requestOptions: BeeRequestOptions, amount: number | NumberString, gasPrice?: NumberString): Promise<TransactionHash>;
52
51
  /**
53
52
  * Withdraw tokens from the chequebook to the overlay address
54
53
  *
@@ -57,4 +56,4 @@ export declare function depositTokens(kyOptions: KyOptions, amount: number | Num
57
56
  * @param gasPrice Gas Price in WEI for the transaction call
58
57
  * @return string Hash of the transaction
59
58
  */
60
- export declare function withdrawTokens(kyOptions: KyOptions, amount: number | NumberString, gasPrice?: NumberString): Promise<TransactionHash>;
59
+ export declare function withdrawTokens(requestOptions: BeeRequestOptions, amount: number | NumberString, gasPrice?: NumberString): Promise<TransactionHash>;
@@ -1,5 +1,4 @@
1
- import type { BeeGenericResponse } from '../../types';
2
- import type { Options as KyOptions } from 'ky';
1
+ import type { BeeGenericResponse, BeeRequestOptions } from '../../types';
3
2
  /**
4
3
  * Check if chunk at address exists locally
5
4
  *
@@ -8,7 +7,7 @@ import type { Options as KyOptions } from 'ky';
8
7
  *
9
8
  * @returns BeeGenericResponse if chunk is found or throws an exception
10
9
  */
11
- export declare function checkIfChunkExistsLocally(kyOptions: KyOptions, address: string): Promise<BeeGenericResponse>;
10
+ export declare function checkIfChunkExistsLocally(requestOptions: BeeRequestOptions, address: string): Promise<BeeGenericResponse>;
12
11
  /**
13
12
  * Delete a chunk from local storage
14
13
  *
@@ -17,4 +16,4 @@ export declare function checkIfChunkExistsLocally(kyOptions: KyOptions, address:
17
16
  *
18
17
  * @returns BeeGenericResponse if chunk was deleted or throws an exception
19
18
  */
20
- export declare function deleteChunkFromLocalStorage(kyOptions: KyOptions, address: string): Promise<BeeGenericResponse>;
19
+ export declare function deleteChunkFromLocalStorage(requestOptions: BeeRequestOptions, address: string): Promise<BeeGenericResponse>;
@@ -1,8 +1,7 @@
1
- import type { NodeAddresses, Peer, PingResponse, RemovePeerResponse, Topology } from '../../types';
2
- import type { Options as KyOptions } from 'ky';
3
- export declare function getNodeAddresses(kyOptions: KyOptions): Promise<NodeAddresses>;
4
- export declare function getPeers(kyOptions: KyOptions): Promise<Peer[]>;
5
- export declare function getBlocklist(kyOptions: KyOptions): Promise<Peer[]>;
6
- export declare function removePeer(kyOptions: KyOptions, peer: string): Promise<RemovePeerResponse>;
7
- export declare function getTopology(kyOptions: KyOptions): Promise<Topology>;
8
- export declare function pingPeer(kyOptions: KyOptions, peer: string): Promise<PingResponse>;
1
+ import type { BeeRequestOptions, NodeAddresses, Peer, PingResponse, RemovePeerResponse, Topology } from '../../types';
2
+ export declare function getNodeAddresses(requestOptions: BeeRequestOptions): Promise<NodeAddresses>;
3
+ export declare function getPeers(requestOptions: BeeRequestOptions): Promise<Peer[]>;
4
+ export declare function getBlocklist(requestOptions: BeeRequestOptions): Promise<Peer[]>;
5
+ export declare function removePeer(requestOptions: BeeRequestOptions, peer: string): Promise<RemovePeerResponse>;
6
+ export declare function getTopology(requestOptions: BeeRequestOptions): Promise<Topology>;
7
+ export declare function pingPeer(requestOptions: BeeRequestOptions, peer: string): Promise<PingResponse>;