@ethersphere/bee-js 4.1.1 → 6.0.0-pre.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.
Files changed (197) hide show
  1. package/README.md +11 -3
  2. package/dist/index.browser.js +33 -0
  3. package/dist/index.browser.js.map +7 -0
  4. package/dist/src/bee-debug.js +624 -0
  5. package/dist/{mjs → src}/bee.js +243 -338
  6. package/dist/{mjs → src}/chunk/bmt.js +0 -0
  7. package/dist/{mjs → src}/chunk/cac.js +0 -0
  8. package/dist/{mjs → src}/chunk/serialize.js +0 -0
  9. package/dist/{mjs → src}/chunk/signer.js +13 -47
  10. package/dist/{mjs → src}/chunk/soc.js +31 -71
  11. package/dist/{mjs → src}/chunk/span.js +1 -1
  12. package/dist/{mjs → src}/feed/identifier.js +0 -0
  13. package/dist/src/feed/index.js +92 -0
  14. package/dist/src/feed/json.js +27 -0
  15. package/dist/src/feed/retrievable.js +67 -0
  16. package/dist/{mjs → src}/feed/topic.js +0 -0
  17. package/dist/{mjs → src}/feed/type.js +0 -0
  18. package/dist/{mjs → src}/index.js +1 -2
  19. package/dist/src/modules/bytes.js +59 -0
  20. package/dist/src/modules/bzz.js +122 -0
  21. package/dist/src/modules/chunk.js +45 -0
  22. package/dist/src/modules/debug/balance.js +57 -0
  23. package/dist/src/modules/debug/chequebook.js +150 -0
  24. package/dist/src/modules/debug/chunk.js +35 -0
  25. package/dist/src/modules/debug/connectivity.js +45 -0
  26. package/dist/src/modules/debug/settlements.js +29 -0
  27. package/dist/src/modules/debug/stamps.js +64 -0
  28. package/dist/src/modules/debug/states.js +46 -0
  29. package/dist/src/modules/debug/status.js +134 -0
  30. package/dist/src/modules/debug/tag.js +16 -0
  31. package/dist/src/modules/debug/transactions.js +69 -0
  32. package/dist/src/modules/feed.js +67 -0
  33. package/dist/src/modules/pinning.js +60 -0
  34. package/dist/src/modules/pss.js +40 -0
  35. package/dist/src/modules/soc.js +31 -0
  36. package/dist/src/modules/status.js +12 -0
  37. package/dist/src/modules/stewardship.js +24 -0
  38. package/dist/src/modules/tag.js +77 -0
  39. package/dist/{mjs → src}/types/debug.js +0 -0
  40. package/dist/{mjs → src}/types/index.js +0 -0
  41. package/dist/{mjs → src}/utils/bytes.js +3 -2
  42. package/dist/src/utils/collection-browser.js +19 -0
  43. package/dist/src/utils/collection-node.js +74 -0
  44. package/dist/src/utils/collection.js +64 -0
  45. package/dist/src/utils/data.browser.js +72 -0
  46. package/dist/src/utils/data.js +42 -0
  47. package/dist/{mjs → src}/utils/error.js +0 -0
  48. package/dist/{mjs → src}/utils/eth.js +32 -68
  49. package/dist/{mjs → src}/utils/expose.js +1 -1
  50. package/dist/src/utils/file.js +36 -0
  51. package/dist/{mjs → src}/utils/hash.js +0 -0
  52. package/dist/{mjs → src}/utils/headers.js +4 -4
  53. package/dist/{mjs → src}/utils/hex.js +0 -0
  54. package/dist/src/utils/http.js +162 -0
  55. package/dist/{mjs → src}/utils/merge.js +2 -2
  56. package/dist/{mjs → src}/utils/pss.js +0 -0
  57. package/dist/{mjs → src}/utils/reference.js +0 -0
  58. package/dist/src/utils/sleep.js +8 -0
  59. package/dist/{mjs → src}/utils/stamps.js +0 -0
  60. package/dist/{mjs → src}/utils/stream.js +3 -3
  61. package/dist/{mjs → src}/utils/tar.js +0 -0
  62. package/dist/{mjs → src}/utils/type.js +13 -14
  63. package/dist/{mjs → src}/utils/uint64.js +0 -0
  64. package/dist/{mjs → src}/utils/url.js +0 -0
  65. package/dist/types/bee.d.ts +2 -3
  66. package/dist/types/chunk/bmt.d.ts +1 -1
  67. package/dist/types/chunk/soc.d.ts +1 -1
  68. package/dist/types/chunk/span.d.ts +1 -1
  69. package/dist/types/feed/index.d.ts +1 -1
  70. package/dist/types/index.d.ts +0 -13
  71. package/dist/types/modules/bzz.d.ts +1 -1
  72. package/dist/types/modules/debug/status.d.ts +3 -3
  73. package/dist/types/modules/pinning.d.ts +1 -1
  74. package/dist/types/types/debug.d.ts +2 -7
  75. package/dist/types/types/index.d.ts +33 -16
  76. package/dist/types/utils/{collection.browser.d.ts → collection-browser.d.ts} +0 -0
  77. package/dist/types/utils/{collection.node.d.ts → collection-node.d.ts} +0 -0
  78. package/dist/types/utils/error.d.ts +1 -1
  79. package/dist/types/utils/eth.d.ts +3 -3
  80. package/dist/types/utils/expose.d.ts +7 -4
  81. package/dist/types/utils/hash.d.ts +1 -1
  82. package/dist/types/utils/hex.d.ts +2 -2
  83. package/dist/types/utils/http.d.ts +3 -3
  84. package/dist/types/utils/stream.d.ts +1 -1
  85. package/dist/types/utils/type.d.ts +6 -2
  86. package/dist/types/utils/uint64.d.ts +1 -1
  87. package/package.json +50 -65
  88. package/dist/cjs/bee-debug.js +0 -638
  89. package/dist/cjs/bee.js +0 -977
  90. package/dist/cjs/chunk/bmt.js +0 -55
  91. package/dist/cjs/chunk/cac.js +0 -56
  92. package/dist/cjs/chunk/serialize.js +0 -19
  93. package/dist/cjs/chunk/signer.js +0 -137
  94. package/dist/cjs/chunk/soc.js +0 -172
  95. package/dist/cjs/chunk/span.js +0 -29
  96. package/dist/cjs/feed/identifier.js +0 -35
  97. package/dist/cjs/feed/index.js +0 -128
  98. package/dist/cjs/feed/json.js +0 -41
  99. package/dist/cjs/feed/retrievable.js +0 -72
  100. package/dist/cjs/feed/topic.js +0 -25
  101. package/dist/cjs/feed/type.js +0 -15
  102. package/dist/cjs/index.js +0 -35
  103. package/dist/cjs/modules/bytes.js +0 -74
  104. package/dist/cjs/modules/bzz.js +0 -131
  105. package/dist/cjs/modules/chunk.js +0 -58
  106. package/dist/cjs/modules/debug/balance.js +0 -77
  107. package/dist/cjs/modules/debug/chequebook.js +0 -167
  108. package/dist/cjs/modules/debug/chunk.js +0 -51
  109. package/dist/cjs/modules/debug/connectivity.js +0 -75
  110. package/dist/cjs/modules/debug/settlements.js +0 -45
  111. package/dist/cjs/modules/debug/stamps.js +0 -89
  112. package/dist/cjs/modules/debug/states.js +0 -64
  113. package/dist/cjs/modules/debug/status.js +0 -153
  114. package/dist/cjs/modules/debug/tag.js +0 -30
  115. package/dist/cjs/modules/debug/transactions.js +0 -81
  116. package/dist/cjs/modules/feed.js +0 -76
  117. package/dist/cjs/modules/pinning.js +0 -84
  118. package/dist/cjs/modules/pss.js +0 -55
  119. package/dist/cjs/modules/soc.js +0 -40
  120. package/dist/cjs/modules/status.js +0 -26
  121. package/dist/cjs/modules/stewardship.js +0 -41
  122. package/dist/cjs/modules/tag.js +0 -96
  123. package/dist/cjs/package.json +0 -8
  124. package/dist/cjs/types/debug.js +0 -10
  125. package/dist/cjs/types/index.js +0 -47
  126. package/dist/cjs/types/ky-options.js +0 -8
  127. package/dist/cjs/types/ky-universal/common.js +0 -8
  128. package/dist/cjs/types/ky-universal/hooks.js +0 -8
  129. package/dist/cjs/types/ky-universal/retry.js +0 -8
  130. package/dist/cjs/utils/bytes.js +0 -121
  131. package/dist/cjs/utils/collection.browser.js +0 -36
  132. package/dist/cjs/utils/collection.js +0 -70
  133. package/dist/cjs/utils/collection.node.js +0 -115
  134. package/dist/cjs/utils/data.browser.js +0 -74
  135. package/dist/cjs/utils/data.js +0 -58
  136. package/dist/cjs/utils/error.js +0 -50
  137. package/dist/cjs/utils/eth.js +0 -211
  138. package/dist/cjs/utils/expose.js +0 -44
  139. package/dist/cjs/utils/file.js +0 -49
  140. package/dist/cjs/utils/hash.js +0 -21
  141. package/dist/cjs/utils/headers.js +0 -59
  142. package/dist/cjs/utils/hex.js +0 -150
  143. package/dist/cjs/utils/http.js +0 -172
  144. package/dist/cjs/utils/merge.js +0 -34
  145. package/dist/cjs/utils/pss.js +0 -18
  146. package/dist/cjs/utils/reference.js +0 -36
  147. package/dist/cjs/utils/sleep.js +0 -23
  148. package/dist/cjs/utils/stamps.js +0 -17
  149. package/dist/cjs/utils/stream.js +0 -146
  150. package/dist/cjs/utils/tar.js +0 -25
  151. package/dist/cjs/utils/type.js +0 -426
  152. package/dist/cjs/utils/uint64.js +0 -29
  153. package/dist/cjs/utils/url.js +0 -56
  154. package/dist/index.browser.min.js +0 -3
  155. package/dist/index.browser.min.js.LICENSE.txt +0 -60
  156. package/dist/index.browser.min.js.map +0 -1
  157. package/dist/mjs/bee-debug.js +0 -744
  158. package/dist/mjs/feed/index.js +0 -134
  159. package/dist/mjs/feed/json.js +0 -63
  160. package/dist/mjs/feed/retrievable.js +0 -105
  161. package/dist/mjs/modules/bytes.js +0 -96
  162. package/dist/mjs/modules/bzz.js +0 -160
  163. package/dist/mjs/modules/chunk.js +0 -80
  164. package/dist/mjs/modules/debug/balance.js +0 -97
  165. package/dist/mjs/modules/debug/chequebook.js +0 -198
  166. package/dist/mjs/modules/debug/chunk.js +0 -71
  167. package/dist/mjs/modules/debug/connectivity.js +0 -89
  168. package/dist/mjs/modules/debug/settlements.js +0 -65
  169. package/dist/mjs/modules/debug/stamps.js +0 -108
  170. package/dist/mjs/modules/debug/states.js +0 -84
  171. package/dist/mjs/modules/debug/status.js +0 -182
  172. package/dist/mjs/modules/debug/tag.js +0 -50
  173. package/dist/mjs/modules/debug/transactions.js +0 -103
  174. package/dist/mjs/modules/feed.js +0 -101
  175. package/dist/mjs/modules/pinning.js +0 -106
  176. package/dist/mjs/modules/pss.js +0 -74
  177. package/dist/mjs/modules/soc.js +0 -64
  178. package/dist/mjs/modules/status.js +0 -46
  179. package/dist/mjs/modules/stewardship.js +0 -60
  180. package/dist/mjs/modules/tag.js +0 -119
  181. package/dist/mjs/package.json +0 -8
  182. package/dist/mjs/types/ky-options.js +0 -7
  183. package/dist/mjs/types/ky-universal/common.js +0 -7
  184. package/dist/mjs/types/ky-universal/hooks.js +0 -7
  185. package/dist/mjs/types/ky-universal/retry.js +0 -7
  186. package/dist/mjs/utils/collection.browser.js +0 -56
  187. package/dist/mjs/utils/collection.js +0 -98
  188. package/dist/mjs/utils/collection.node.js +0 -169
  189. package/dist/mjs/utils/data.browser.js +0 -108
  190. package/dist/mjs/utils/data.js +0 -78
  191. package/dist/mjs/utils/file.js +0 -70
  192. package/dist/mjs/utils/http.js +0 -208
  193. package/dist/mjs/utils/sleep.js +0 -43
  194. package/dist/types/types/ky-options.d.ts +0 -221
  195. package/dist/types/types/ky-universal/common.d.ts +0 -13
  196. package/dist/types/types/ky-universal/hooks.d.ts +0 -92
  197. package/dist/types/types/ky-universal/retry.d.ts +0 -38
@@ -1,35 +1,3 @@
1
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) {
3
- return value instanceof P ? value : new P(function (resolve) {
4
- resolve(value);
5
- });
6
- }
7
-
8
- return new (P || (P = Promise))(function (resolve, reject) {
9
- function fulfilled(value) {
10
- try {
11
- step(generator.next(value));
12
- } catch (e) {
13
- reject(e);
14
- }
15
- }
16
-
17
- function rejected(value) {
18
- try {
19
- step(generator["throw"](value));
20
- } catch (e) {
21
- reject(e);
22
- }
23
- }
24
-
25
- function step(result) {
26
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
27
- }
28
-
29
- step((generator = generator.apply(thisArg, _arguments || [])).next());
30
- });
31
- };
32
-
33
1
  import * as bzz from "./modules/bzz.js";
34
2
  import * as stewardship from "./modules/stewardship.js";
35
3
  import * as tag from "./modules/tag.js";
@@ -53,7 +21,7 @@ import { wrapBytesWithHelpers } from "./utils/bytes.js";
53
21
  import { addCidConversionFunction, assertAddressPrefix, assertAllTagsOptions, assertBatchId, assertCollectionUploadOptions, assertData, assertFileData, assertFileUploadOptions, assertPssMessageHandler, assertPublicKey, assertReference, assertReferenceOrEns, assertRequestOptions, assertUploadOptions, makeReferenceOrEns, makeTagUid } from "./utils/type.js";
54
22
  import { getJsonData, setJsonData } from "./feed/json.js";
55
23
  import { assertCollection, makeCollectionFromFileList } from "./utils/collection.js";
56
- import { makeCollectionFromFS } from "./utils/collection.node.js";
24
+ import { makeCollectionFromFS } from "./utils/collection-node.js";
57
25
  import { CHUNK_SIZE, SPAN_SIZE } from "./types/index.js";
58
26
  import { makeDefaultKy, wrapRequestClosure, wrapResponseClosure } from "./utils/http.js";
59
27
  import { isReadable } from "./utils/stream.js";
@@ -72,38 +40,36 @@ export class Bee {
72
40
  * @param options
73
41
  */
74
42
  constructor(url, options) {
75
- var _a;
76
-
77
43
  assertBeeUrl(url); // Remove last slash if present, as our endpoint strings starts with `/...`
78
44
  // which could lead to double slash in URL to which Bee responds with
79
45
  // unnecessary redirects.
80
46
 
81
47
  this.url = stripLastSlash(url);
82
48
 
83
- if (options === null || options === void 0 ? void 0 : options.signer) {
49
+ if (options?.signer) {
84
50
  this.signer = makeSigner(options.signer);
85
51
  }
86
52
 
87
53
  const kyOptions = {
88
54
  prefixUrl: this.url,
89
- timeout: (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : false,
90
- retry: options === null || options === void 0 ? void 0 : options.retry,
91
- fetch: options === null || options === void 0 ? void 0 : options.fetch,
55
+ timeout: options?.timeout ?? false,
56
+ retry: options?.retry,
57
+ fetch: options?.fetch,
92
58
  hooks: {
93
59
  beforeRequest: [],
94
60
  afterResponse: []
95
61
  }
96
62
  };
97
63
 
98
- if (options === null || options === void 0 ? void 0 : options.defaultHeaders) {
64
+ if (options?.defaultHeaders) {
99
65
  kyOptions.headers = options.defaultHeaders;
100
66
  }
101
67
 
102
- if (options === null || options === void 0 ? void 0 : options.onRequest) {
68
+ if (options?.onRequest) {
103
69
  kyOptions.hooks.beforeRequest.push(wrapRequestClosure(options.onRequest));
104
70
  }
105
71
 
106
- if (options === null || options === void 0 ? void 0 : options.onResponse) {
72
+ if (options?.onResponse) {
107
73
  kyOptions.hooks.afterResponse.push(wrapResponseClosure(options.onResponse));
108
74
  }
109
75
 
@@ -122,13 +88,11 @@ export class Bee {
122
88
  */
123
89
 
124
90
 
125
- uploadData(postageBatchId, data, options) {
126
- return __awaiter(this, void 0, void 0, function* () {
127
- assertBatchId(postageBatchId);
128
- assertData(data);
129
- if (options) assertUploadOptions(options);
130
- return bytes.upload(this.getKy(options), data, postageBatchId, options);
131
- });
91
+ async uploadData(postageBatchId, data, options) {
92
+ assertBatchId(postageBatchId);
93
+ assertData(data);
94
+ if (options) assertUploadOptions(options);
95
+ return bytes.upload(this.getKy(options), data, postageBatchId, options);
132
96
  }
133
97
  /**
134
98
  * Download data as a byte array
@@ -142,12 +106,10 @@ export class Bee {
142
106
  */
143
107
 
144
108
 
145
- downloadData(reference, options) {
146
- return __awaiter(this, void 0, void 0, function* () {
147
- assertRequestOptions(options);
148
- assertReferenceOrEns(reference);
149
- return bytes.download(this.getKy(options), reference);
150
- });
109
+ async downloadData(reference, options) {
110
+ assertRequestOptions(options);
111
+ assertReferenceOrEns(reference);
112
+ return bytes.download(this.getKy(options), reference);
151
113
  }
152
114
  /**
153
115
  * Download data as a Readable stream
@@ -161,12 +123,10 @@ export class Bee {
161
123
  */
162
124
 
163
125
 
164
- downloadReadableData(reference, options) {
165
- return __awaiter(this, void 0, void 0, function* () {
166
- assertRequestOptions(options);
167
- assertReferenceOrEns(reference);
168
- return bytes.downloadReadable(this.getKy(options), reference);
169
- });
126
+ async downloadReadableData(reference, options) {
127
+ assertRequestOptions(options);
128
+ assertReferenceOrEns(reference);
129
+ return bytes.downloadReadable(this.getKy(options), reference);
170
130
  }
171
131
  /**
172
132
  * Upload chunk to a Bee node
@@ -181,25 +141,23 @@ export class Bee {
181
141
  */
182
142
 
183
143
 
184
- uploadChunk(postageBatchId, data, options) {
185
- return __awaiter(this, void 0, void 0, function* () {
186
- assertBatchId(postageBatchId);
144
+ async uploadChunk(postageBatchId, data, options) {
145
+ assertBatchId(postageBatchId);
187
146
 
188
- if (!(data instanceof Uint8Array)) {
189
- throw new TypeError('Data has to be Uint8Array instance!');
190
- }
147
+ if (!(data instanceof Uint8Array)) {
148
+ throw new TypeError('Data has to be Uint8Array instance!');
149
+ }
191
150
 
192
- if (data.length < SPAN_SIZE) {
193
- throw new BeeArgumentError(`Chunk has to have size of at least ${SPAN_SIZE}.`, data);
194
- }
151
+ if (data.length < SPAN_SIZE) {
152
+ throw new BeeArgumentError(`Chunk has to have size of at least ${SPAN_SIZE}.`, data);
153
+ }
195
154
 
196
- if (data.length > CHUNK_SIZE + SPAN_SIZE) {
197
- throw new BeeArgumentError(`Chunk has to have size of at most ${CHUNK_SIZE}.`, data);
198
- }
155
+ if (data.length > CHUNK_SIZE + SPAN_SIZE) {
156
+ throw new BeeArgumentError(`Chunk has to have size of at most ${CHUNK_SIZE}.`, data);
157
+ }
199
158
 
200
- if (options) assertUploadOptions(options);
201
- return chunk.upload(this.getKy(options), data, postageBatchId, options);
202
- });
159
+ if (options) assertUploadOptions(options);
160
+ return chunk.upload(this.getKy(options), data, postageBatchId, options);
203
161
  }
204
162
  /**
205
163
  * Download chunk as a byte array
@@ -213,12 +171,10 @@ export class Bee {
213
171
  */
214
172
 
215
173
 
216
- downloadChunk(reference, options) {
217
- return __awaiter(this, void 0, void 0, function* () {
218
- assertRequestOptions(options);
219
- assertReferenceOrEns(reference);
220
- return chunk.download(this.getKy(options), reference);
221
- });
174
+ async downloadChunk(reference, options) {
175
+ assertRequestOptions(options);
176
+ assertReferenceOrEns(reference);
177
+ return chunk.download(this.getKy(options), reference);
222
178
  }
223
179
  /**
224
180
  * Upload single file to a Bee node.
@@ -238,33 +194,32 @@ export class Bee {
238
194
  */
239
195
 
240
196
 
241
- uploadFile(postageBatchId, data, name, options) {
242
- return __awaiter(this, void 0, void 0, function* () {
243
- assertBatchId(postageBatchId);
244
- assertFileData(data);
245
- if (options) assertFileUploadOptions(options);
197
+ async uploadFile(postageBatchId, data, name, options) {
198
+ assertBatchId(postageBatchId);
199
+ assertFileData(data);
200
+ if (options) assertFileUploadOptions(options);
246
201
 
247
- if (name && typeof name !== 'string') {
248
- throw new TypeError('name has to be string or undefined!');
249
- }
202
+ if (name && typeof name !== 'string') {
203
+ throw new TypeError('name has to be string or undefined!');
204
+ }
250
205
 
251
- if (isFile(data)) {
252
- const fileData = yield fileArrayBuffer(data);
253
- const fileName = name !== null && name !== void 0 ? name : data.name;
254
- const contentType = data.type;
255
- const fileOptions = Object.assign({
256
- contentType
257
- }, options);
258
- return addCidConversionFunction(yield bzz.uploadFile(this.getKy(options), fileData, postageBatchId, fileName, fileOptions), ReferenceType.MANIFEST);
259
- } else if (isReadable(data) && (options === null || options === void 0 ? void 0 : options.tag) && !options.size) {
260
- // TODO: Needed until https://github.com/ethersphere/bee/issues/2317 is resolved
261
- const result = yield bzz.uploadFile(this.getKy(options), data, postageBatchId, name, options);
262
- yield this.updateTag(options.tag, result.reference);
263
- return addCidConversionFunction(result, ReferenceType.MANIFEST);
264
- } else {
265
- return addCidConversionFunction(yield bzz.uploadFile(this.getKy(options), data, postageBatchId, name, options), ReferenceType.MANIFEST);
266
- }
267
- });
206
+ if (isFile(data)) {
207
+ const fileData = await fileArrayBuffer(data);
208
+ const fileName = name ?? data.name;
209
+ const contentType = data.type;
210
+ const fileOptions = {
211
+ contentType,
212
+ ...options
213
+ };
214
+ return addCidConversionFunction(await bzz.uploadFile(this.getKy(options), fileData, postageBatchId, fileName, fileOptions), ReferenceType.MANIFEST);
215
+ } else if (isReadable(data) && options?.tag && !options.size) {
216
+ // TODO: Needed until https://github.com/ethersphere/bee/issues/2317 is resolved
217
+ const result = await bzz.uploadFile(this.getKy(options), data, postageBatchId, name, options);
218
+ await this.updateTag(options.tag, result.reference);
219
+ return addCidConversionFunction(result, ReferenceType.MANIFEST);
220
+ } else {
221
+ return addCidConversionFunction(await bzz.uploadFile(this.getKy(options), data, postageBatchId, name, options), ReferenceType.MANIFEST);
222
+ }
268
223
  }
269
224
  /**
270
225
  * Download single file.
@@ -280,12 +235,10 @@ export class Bee {
280
235
  */
281
236
 
282
237
 
283
- downloadFile(reference, path = '', options) {
284
- return __awaiter(this, void 0, void 0, function* () {
285
- assertRequestOptions(options);
286
- reference = makeReferenceOrEns(reference, ReferenceType.MANIFEST);
287
- return bzz.downloadFile(this.getKy(options), reference, path);
288
- });
238
+ async downloadFile(reference, path = '', options) {
239
+ assertRequestOptions(options);
240
+ reference = makeReferenceOrEns(reference, ReferenceType.MANIFEST);
241
+ return bzz.downloadFile(this.getKy(options), reference, path);
289
242
  }
290
243
  /**
291
244
  * Download single file as a readable stream
@@ -301,12 +254,10 @@ export class Bee {
301
254
  */
302
255
 
303
256
 
304
- downloadReadableFile(reference, path = '', options) {
305
- return __awaiter(this, void 0, void 0, function* () {
306
- assertRequestOptions(options);
307
- reference = makeReferenceOrEns(reference, ReferenceType.MANIFEST);
308
- return bzz.downloadFileReadable(this.getKy(options), reference, path);
309
- });
257
+ async downloadReadableFile(reference, path = '', options) {
258
+ assertRequestOptions(options);
259
+ reference = makeReferenceOrEns(reference, ReferenceType.MANIFEST);
260
+ return bzz.downloadFileReadable(this.getKy(options), reference, path);
310
261
  }
311
262
  /**
312
263
  * Upload collection of files to a Bee node
@@ -326,13 +277,11 @@ export class Bee {
326
277
  */
327
278
 
328
279
 
329
- uploadFiles(postageBatchId, fileList, options) {
330
- return __awaiter(this, void 0, void 0, function* () {
331
- assertBatchId(postageBatchId);
332
- if (options) assertCollectionUploadOptions(options);
333
- const data = yield makeCollectionFromFileList(fileList);
334
- return addCidConversionFunction(yield bzz.uploadCollection(this.getKy(options), data, postageBatchId, options), ReferenceType.MANIFEST);
335
- });
280
+ async uploadFiles(postageBatchId, fileList, options) {
281
+ assertBatchId(postageBatchId);
282
+ if (options) assertCollectionUploadOptions(options);
283
+ const data = await makeCollectionFromFileList(fileList);
284
+ return addCidConversionFunction(await bzz.uploadCollection(this.getKy(options), data, postageBatchId, options), ReferenceType.MANIFEST);
336
285
  }
337
286
  /**
338
287
  * Upload Collection that you can assembly yourself.
@@ -346,13 +295,11 @@ export class Bee {
346
295
  */
347
296
 
348
297
 
349
- uploadCollection(postageBatchId, collection, options) {
350
- return __awaiter(this, void 0, void 0, function* () {
351
- assertBatchId(postageBatchId);
352
- assertCollection(collection);
353
- if (options) assertCollectionUploadOptions(options);
354
- return addCidConversionFunction(yield bzz.uploadCollection(this.ky, collection, postageBatchId, options), ReferenceType.MANIFEST);
355
- });
298
+ async uploadCollection(postageBatchId, collection, options) {
299
+ assertBatchId(postageBatchId);
300
+ assertCollection(collection);
301
+ if (options) assertCollectionUploadOptions(options);
302
+ return addCidConversionFunction(await bzz.uploadCollection(this.ky, collection, postageBatchId, options), ReferenceType.MANIFEST);
356
303
  }
357
304
  /**
358
305
  * Upload collection of files.
@@ -372,13 +319,11 @@ export class Bee {
372
319
  */
373
320
 
374
321
 
375
- uploadFilesFromDirectory(postageBatchId, dir, options) {
376
- return __awaiter(this, void 0, void 0, function* () {
377
- assertBatchId(postageBatchId);
378
- if (options) assertCollectionUploadOptions(options);
379
- const data = yield makeCollectionFromFS(dir);
380
- return addCidConversionFunction(yield bzz.uploadCollection(this.getKy(options), data, postageBatchId, options), ReferenceType.MANIFEST);
381
- });
322
+ async uploadFilesFromDirectory(postageBatchId, dir, options) {
323
+ assertBatchId(postageBatchId);
324
+ if (options) assertCollectionUploadOptions(options);
325
+ const data = await makeCollectionFromFS(dir);
326
+ return addCidConversionFunction(await bzz.uploadCollection(this.getKy(options), data, postageBatchId, options), ReferenceType.MANIFEST);
382
327
  }
383
328
  /**
384
329
  * Create a new Tag which is meant for tracking progres of syncing data across network.
@@ -391,11 +336,9 @@ export class Bee {
391
336
  */
392
337
 
393
338
 
394
- createTag(options) {
395
- return __awaiter(this, void 0, void 0, function* () {
396
- assertRequestOptions(options);
397
- return tag.createTag(this.getKy(options));
398
- });
339
+ async createTag(options) {
340
+ assertRequestOptions(options);
341
+ return tag.createTag(this.getKy(options));
399
342
  }
400
343
  /**
401
344
  * Fetches all tags.
@@ -413,12 +356,10 @@ export class Bee {
413
356
  */
414
357
 
415
358
 
416
- getAllTags(options) {
417
- return __awaiter(this, void 0, void 0, function* () {
418
- assertRequestOptions(options);
419
- assertAllTagsOptions(options);
420
- return tag.getAllTags(this.getKy(options), options === null || options === void 0 ? void 0 : options.offset, options === null || options === void 0 ? void 0 : options.limit);
421
- });
359
+ async getAllTags(options) {
360
+ assertRequestOptions(options);
361
+ assertAllTagsOptions(options);
362
+ return tag.getAllTags(this.getKy(options), options?.offset, options?.limit);
422
363
  }
423
364
  /**
424
365
  * Retrieve tag information from Bee node
@@ -435,12 +376,10 @@ export class Bee {
435
376
  */
436
377
 
437
378
 
438
- retrieveTag(tagUid, options) {
439
- return __awaiter(this, void 0, void 0, function* () {
440
- assertRequestOptions(options);
441
- tagUid = makeTagUid(tagUid);
442
- return tag.retrieveTag(this.getKy(options), tagUid);
443
- });
379
+ async retrieveTag(tagUid, options) {
380
+ assertRequestOptions(options);
381
+ tagUid = makeTagUid(tagUid);
382
+ return tag.retrieveTag(this.getKy(options), tagUid);
444
383
  }
445
384
  /**
446
385
  * Delete Tag
@@ -457,12 +396,10 @@ export class Bee {
457
396
  */
458
397
 
459
398
 
460
- deleteTag(tagUid, options) {
461
- return __awaiter(this, void 0, void 0, function* () {
462
- assertRequestOptions(options);
463
- tagUid = makeTagUid(tagUid);
464
- return tag.deleteTag(this.getKy(options), tagUid);
465
- });
399
+ async deleteTag(tagUid, options) {
400
+ assertRequestOptions(options);
401
+ tagUid = makeTagUid(tagUid);
402
+ return tag.deleteTag(this.getKy(options), tagUid);
466
403
  }
467
404
  /**
468
405
  * Update tag's total chunks count.
@@ -483,13 +420,11 @@ export class Bee {
483
420
  */
484
421
 
485
422
 
486
- updateTag(tagUid, reference, options) {
487
- return __awaiter(this, void 0, void 0, function* () {
488
- assertReference(reference);
489
- assertRequestOptions(options);
490
- tagUid = makeTagUid(tagUid);
491
- return tag.updateTag(this.getKy(options), tagUid, reference);
492
- });
423
+ async updateTag(tagUid, reference, options) {
424
+ assertReference(reference);
425
+ assertRequestOptions(options);
426
+ tagUid = makeTagUid(tagUid);
427
+ return tag.updateTag(this.getKy(options), tagUid, reference);
493
428
  }
494
429
  /**
495
430
  * Pin local data with given reference
@@ -504,12 +439,10 @@ export class Bee {
504
439
  */
505
440
 
506
441
 
507
- pin(reference, options) {
508
- return __awaiter(this, void 0, void 0, function* () {
509
- assertRequestOptions(options);
510
- assertReference(reference);
511
- return pinning.pin(this.getKy(options), reference);
512
- });
442
+ async pin(reference, options) {
443
+ assertRequestOptions(options);
444
+ assertReference(reference);
445
+ return pinning.pin(this.getKy(options), reference);
513
446
  }
514
447
  /**
515
448
  * Unpin local data with given reference
@@ -524,12 +457,10 @@ export class Bee {
524
457
  */
525
458
 
526
459
 
527
- unpin(reference, options) {
528
- return __awaiter(this, void 0, void 0, function* () {
529
- assertRequestOptions(options);
530
- assertReference(reference);
531
- return pinning.unpin(this.getKy(options), reference);
532
- });
460
+ async unpin(reference, options) {
461
+ assertRequestOptions(options);
462
+ assertReference(reference);
463
+ return pinning.unpin(this.getKy(options), reference);
533
464
  }
534
465
  /**
535
466
  * Get list of all locally pinned references
@@ -541,11 +472,9 @@ export class Bee {
541
472
  */
542
473
 
543
474
 
544
- getAllPins(options) {
545
- return __awaiter(this, void 0, void 0, function* () {
546
- assertRequestOptions(options);
547
- return pinning.getAllPins(this.getKy(options));
548
- });
475
+ async getAllPins(options) {
476
+ assertRequestOptions(options);
477
+ return pinning.getAllPins(this.getKy(options));
549
478
  }
550
479
  /**
551
480
  * Get pinning status of chunk with given reference
@@ -561,12 +490,10 @@ export class Bee {
561
490
  */
562
491
 
563
492
 
564
- getPin(reference, options) {
565
- return __awaiter(this, void 0, void 0, function* () {
566
- assertRequestOptions(options);
567
- assertReference(reference);
568
- return pinning.getPin(this.getKy(options), reference);
569
- });
493
+ async getPin(reference, options) {
494
+ assertRequestOptions(options);
495
+ assertReference(reference);
496
+ return pinning.getPin(this.getKy(options), reference);
570
497
  }
571
498
  /**
572
499
  * Instructs the Bee node to reupload a locally pinned data into the network.
@@ -581,12 +508,10 @@ export class Bee {
581
508
  */
582
509
 
583
510
 
584
- reuploadPinnedData(reference, options) {
585
- return __awaiter(this, void 0, void 0, function* () {
586
- assertRequestOptions(options);
587
- assertReferenceOrEns(reference);
588
- yield stewardship.reupload(this.getKy(options), reference);
589
- });
511
+ async reuploadPinnedData(reference, options) {
512
+ assertRequestOptions(options);
513
+ assertReferenceOrEns(reference);
514
+ await stewardship.reupload(this.getKy(options), reference);
590
515
  }
591
516
  /**
592
517
  * Checks if content specified by reference is retrievable from the network.
@@ -600,12 +525,10 @@ export class Bee {
600
525
  */
601
526
 
602
527
 
603
- isReferenceRetrievable(reference, options) {
604
- return __awaiter(this, void 0, void 0, function* () {
605
- assertRequestOptions(options);
606
- assertReferenceOrEns(reference);
607
- return stewardship.isRetrievable(this.getKy(options), reference);
608
- });
528
+ async isReferenceRetrievable(reference, options) {
529
+ assertRequestOptions(options);
530
+ assertReferenceOrEns(reference);
531
+ return stewardship.isRetrievable(this.getKy(options), reference);
609
532
  }
610
533
  /**
611
534
  * Functions that validates if feed is retrievable in the network.
@@ -624,32 +547,30 @@ export class Bee {
624
547
  */
625
548
 
626
549
 
627
- isFeedRetrievable(type, owner, topic, index, options) {
628
- return __awaiter(this, void 0, void 0, function* () {
629
- const canonicalOwner = makeEthAddress(owner);
630
- const canonicalTopic = makeTopic(topic);
631
-
632
- if (!index) {
633
- try {
634
- yield this.makeFeedReader(type, canonicalTopic, canonicalOwner).download();
635
- return true;
636
- } catch (e) {
637
- const err = e; // Only if the error is "not-found" then we return false otherwise we re-throw the error
550
+ async isFeedRetrievable(type, owner, topic, index, options) {
551
+ const canonicalOwner = makeEthAddress(owner);
552
+ const canonicalTopic = makeTopic(topic);
638
553
 
639
- if ((err === null || err === void 0 ? void 0 : err.status) === 404) {
640
- return false;
641
- }
554
+ if (!index) {
555
+ try {
556
+ await this.makeFeedReader(type, canonicalTopic, canonicalOwner).download();
557
+ return true;
558
+ } catch (e) {
559
+ const err = e; // Only if the error is "not-found" then we return false otherwise we re-throw the error
642
560
 
643
- throw e;
561
+ if (err?.status === 404) {
562
+ return false;
644
563
  }
645
- }
646
564
 
647
- if (type !== 'sequence') {
648
- throw new BeeError('Only Sequence type of Feeds is supported at the moment');
565
+ throw e;
649
566
  }
567
+ }
650
568
 
651
- return areAllSequentialFeedsUpdateRetrievable(this, canonicalOwner, canonicalTopic, index, options);
652
- });
569
+ if (type !== 'sequence') {
570
+ throw new BeeError('Only Sequence type of Feeds is supported at the moment');
571
+ }
572
+
573
+ return areAllSequentialFeedsUpdateRetrievable(this, canonicalOwner, canonicalTopic, index, options);
653
574
  }
654
575
  /**
655
576
  * Send data to recipient or target with Postal Service for Swarm.
@@ -677,24 +598,22 @@ export class Bee {
677
598
  */
678
599
 
679
600
 
680
- pssSend(postageBatchId, topic, target, data, recipient, options) {
681
- return __awaiter(this, void 0, void 0, function* () {
682
- assertRequestOptions(options);
683
- assertData(data);
684
- assertBatchId(postageBatchId);
685
- assertAddressPrefix(target);
601
+ async pssSend(postageBatchId, topic, target, data, recipient, options) {
602
+ assertRequestOptions(options);
603
+ assertData(data);
604
+ assertBatchId(postageBatchId);
605
+ assertAddressPrefix(target);
686
606
 
687
- if (typeof topic !== 'string') {
688
- throw new TypeError('topic has to be an string!');
689
- }
607
+ if (typeof topic !== 'string') {
608
+ throw new TypeError('topic has to be an string!');
609
+ }
690
610
 
691
- if (recipient) {
692
- assertPublicKey(recipient);
693
- return pss.send(this.getKy(options), topic, target, data, postageBatchId, recipient);
694
- } else {
695
- return pss.send(this.getKy(options), topic, target, data, postageBatchId);
696
- }
697
- });
611
+ if (recipient) {
612
+ assertPublicKey(recipient);
613
+ return pss.send(this.getKy(options), topic, target, data, postageBatchId, recipient);
614
+ } else {
615
+ return pss.send(this.getKy(options), topic, target, data, postageBatchId);
616
+ }
698
617
  }
699
618
  /**
700
619
  * Subscribe to messages for given topic with Postal Service for Swarm
@@ -739,13 +658,13 @@ export class Bee {
739
658
  cancel
740
659
  };
741
660
 
742
- ws.onmessage = ev => __awaiter(this, void 0, void 0, function* () {
743
- const data = yield prepareWebsocketData(ev.data); // ignore empty messages
661
+ ws.onmessage = async ev => {
662
+ const data = await prepareWebsocketData(ev.data); // ignore empty messages
744
663
 
745
664
  if (data.length > 0) {
746
665
  handler.onMessage(wrapBytesWithHelpers(data), subscription);
747
666
  }
748
- });
667
+ };
749
668
 
750
669
  ws.onerror = ev => {
751
670
  // ignore errors after subscription was cancelled
@@ -784,40 +703,38 @@ export class Bee {
784
703
  */
785
704
 
786
705
 
787
- pssReceive(topic, timeoutMsec = 0) {
788
- return __awaiter(this, void 0, void 0, function* () {
789
- if (typeof topic !== 'string') {
790
- throw new TypeError('topic has to be an string!');
791
- }
706
+ async pssReceive(topic, timeoutMsec = 0) {
707
+ if (typeof topic !== 'string') {
708
+ throw new TypeError('topic has to be an string!');
709
+ }
792
710
 
793
- if (typeof timeoutMsec !== 'number') {
794
- throw new TypeError('timeoutMsc parameter has to be a number!');
795
- }
711
+ if (typeof timeoutMsec !== 'number') {
712
+ throw new TypeError('timeoutMsc parameter has to be a number!');
713
+ }
796
714
 
797
- return new Promise((resolve, reject) => {
798
- let timeout;
799
- const subscription = this.pssSubscribe(topic, {
800
- onError: error => {
801
- clearTimeout(timeout);
802
- subscription.cancel();
803
- reject(error.message);
804
- },
805
- onMessage: message => {
806
- clearTimeout(timeout);
807
- subscription.cancel();
808
- resolve(message);
809
- }
810
- });
811
-
812
- if (timeoutMsec > 0) {
813
- // we need to cast the type because Typescript is getting confused with Node.js'
814
- // alternative type definitions
815
- timeout = setTimeout(() => {
816
- subscription.cancel();
817
- reject(new BeeError('pssReceive timeout'));
818
- }, timeoutMsec);
715
+ return new Promise((resolve, reject) => {
716
+ let timeout;
717
+ const subscription = this.pssSubscribe(topic, {
718
+ onError: error => {
719
+ clearTimeout(timeout);
720
+ subscription.cancel();
721
+ reject(error.message);
722
+ },
723
+ onMessage: message => {
724
+ clearTimeout(timeout);
725
+ subscription.cancel();
726
+ resolve(message);
819
727
  }
820
728
  });
729
+
730
+ if (timeoutMsec > 0) {
731
+ // we need to cast the type because Typescript is getting confused with Node.js'
732
+ // alternative type definitions
733
+ timeout = setTimeout(() => {
734
+ subscription.cancel();
735
+ reject(new BeeError('pssReceive timeout'));
736
+ }, timeoutMsec);
737
+ }
821
738
  });
822
739
  }
823
740
  /**
@@ -833,21 +750,21 @@ export class Bee {
833
750
  *
834
751
  * @see [Bee docs - Feeds](https://docs.ethswarm.org/docs/dapps-on-swarm/feeds)
835
752
  * @see [Bee API reference - `POST /feeds`](https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1{owner}~1{topic}/post)
836
- * TODO: Once breaking add support for Feed CID
837
753
  */
838
754
 
839
755
 
840
- createFeedManifest(postageBatchId, type, topic, owner, options) {
841
- return __awaiter(this, void 0, void 0, function* () {
842
- assertRequestOptions(options);
843
- assertFeedType(type);
844
- assertBatchId(postageBatchId);
845
- const canonicalTopic = makeTopic(topic);
846
- const canonicalOwner = makeHexEthAddress(owner);
847
- return createFeedManifest(this.getKy(options), canonicalOwner, canonicalTopic, postageBatchId, {
848
- type
849
- });
756
+ async createFeedManifest(postageBatchId, type, topic, owner, options) {
757
+ assertRequestOptions(options);
758
+ assertFeedType(type);
759
+ assertBatchId(postageBatchId);
760
+ const canonicalTopic = makeTopic(topic);
761
+ const canonicalOwner = makeHexEthAddress(owner);
762
+ const reference = await createFeedManifest(this.getKy(options), canonicalOwner, canonicalTopic, postageBatchId, {
763
+ type
850
764
  });
765
+ return addCidConversionFunction({
766
+ reference
767
+ }, ReferenceType.FEED);
851
768
  }
852
769
  /**
853
770
  * Make a new feed reader for downloading feed updates.
@@ -907,17 +824,13 @@ export class Bee {
907
824
  */
908
825
 
909
826
 
910
- setJsonFeed(postageBatchId, topic, data, options) {
911
- var _a;
912
-
913
- return __awaiter(this, void 0, void 0, function* () {
914
- assertRequestOptions(options, 'JsonFeedOptions');
915
- assertBatchId(postageBatchId);
916
- const hashedTopic = this.makeFeedTopic(topic);
917
- const feedType = (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : DEFAULT_FEED_TYPE;
918
- const writer = this.makeFeedWriter(feedType, hashedTopic, options === null || options === void 0 ? void 0 : options.signer, options);
919
- return setJsonData(this, writer, postageBatchId, data, options);
920
- });
827
+ async setJsonFeed(postageBatchId, topic, data, options) {
828
+ assertRequestOptions(options, 'JsonFeedOptions');
829
+ assertBatchId(postageBatchId);
830
+ const hashedTopic = this.makeFeedTopic(topic);
831
+ const feedType = options?.type ?? DEFAULT_FEED_TYPE;
832
+ const writer = this.makeFeedWriter(feedType, hashedTopic, options?.signer, options);
833
+ return setJsonData(this, writer, postageBatchId, data, options);
921
834
  }
922
835
  /**
923
836
  * High-level function that allows you to easily get data from feed.
@@ -940,37 +853,33 @@ export class Bee {
940
853
  */
941
854
 
942
855
 
943
- getJsonFeed(topic, options) {
944
- var _a;
856
+ async getJsonFeed(topic, options) {
857
+ assertRequestOptions(options, 'JsonFeedOptions');
858
+ const hashedTopic = this.makeFeedTopic(topic);
859
+ const feedType = options?.type ?? DEFAULT_FEED_TYPE;
945
860
 
946
- return __awaiter(this, void 0, void 0, function* () {
947
- assertRequestOptions(options, 'JsonFeedOptions');
948
- const hashedTopic = this.makeFeedTopic(topic);
949
- const feedType = (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : DEFAULT_FEED_TYPE;
861
+ if (options?.signer && options?.address) {
862
+ throw new BeeError('Both options "signer" and "address" can not be specified at one time!');
863
+ }
950
864
 
951
- if ((options === null || options === void 0 ? void 0 : options.signer) && (options === null || options === void 0 ? void 0 : options.address)) {
952
- throw new BeeError('Both options "signer" and "address" can not be specified at one time!');
953
- }
865
+ let address;
954
866
 
955
- let address;
956
-
957
- if (options === null || options === void 0 ? void 0 : options.address) {
958
- address = makeEthAddress(options === null || options === void 0 ? void 0 : options.address);
959
- } else {
960
- try {
961
- address = this.resolveSigner(options === null || options === void 0 ? void 0 : options.signer).address;
962
- } catch (e) {
963
- if (e instanceof BeeError) {
964
- throw new BeeError('Either address, signer or default signer has to be specified!');
965
- } else {
966
- throw e;
967
- }
867
+ if (options?.address) {
868
+ address = makeEthAddress(options?.address);
869
+ } else {
870
+ try {
871
+ address = this.resolveSigner(options?.signer).address;
872
+ } catch (e) {
873
+ if (e instanceof BeeError) {
874
+ throw new BeeError('Either address, signer or default signer has to be specified!');
875
+ } else {
876
+ throw e;
968
877
  }
969
878
  }
879
+ }
970
880
 
971
- const reader = this.makeFeedReader(feedType, hashedTopic, address, options);
972
- return getJsonData(this, reader);
973
- });
881
+ const reader = this.makeFeedReader(feedType, hashedTopic, address, options);
882
+ return getJsonData(this, reader);
974
883
  }
975
884
  /**
976
885
  * Make a new feed topic from a string
@@ -1014,9 +923,9 @@ export class Bee {
1014
923
  makeSOCWriter(signer, options) {
1015
924
  assertRequestOptions(options);
1016
925
  const canonicalSigner = this.resolveSigner(signer);
1017
- return Object.assign(Object.assign({}, this.makeSOCReader(canonicalSigner.address, options)), {
926
+ return { ...this.makeSOCReader(canonicalSigner.address, options),
1018
927
  upload: uploadSingleOwnerChunkData.bind(null, this.getKy(options), canonicalSigner)
1019
- });
928
+ };
1020
929
  }
1021
930
  /**
1022
931
  * Ping the Bee node to see if there is a live Bee node on the given URL.
@@ -1026,11 +935,9 @@ export class Bee {
1026
935
  */
1027
936
 
1028
937
 
1029
- checkConnection(options) {
1030
- return __awaiter(this, void 0, void 0, function* () {
1031
- assertRequestOptions(options, 'PostageBatchOptions');
1032
- return status.checkConnection(this.getKy(options));
1033
- });
938
+ async checkConnection(options) {
939
+ assertRequestOptions(options, 'PostageBatchOptions');
940
+ return status.checkConnection(this.getKy(options));
1034
941
  }
1035
942
  /**
1036
943
  * Ping the Bee node to see if there is a live Bee node on the given URL.
@@ -1040,18 +947,16 @@ export class Bee {
1040
947
  */
1041
948
 
1042
949
 
1043
- isConnected(options) {
1044
- return __awaiter(this, void 0, void 0, function* () {
1045
- assertRequestOptions(options, 'PostageBatchOptions');
950
+ async isConnected(options) {
951
+ assertRequestOptions(options, 'PostageBatchOptions');
1046
952
 
1047
- try {
1048
- yield status.checkConnection(this.getKy(options));
1049
- } catch (e) {
1050
- return false;
1051
- }
953
+ try {
954
+ await status.checkConnection(this.getKy(options));
955
+ } catch (e) {
956
+ return false;
957
+ }
1052
958
 
1053
- return true;
1054
- });
959
+ return true;
1055
960
  }
1056
961
  /**
1057
962
  * @param signer