@ethersphere/bee-js 6.9.0 → 6.9.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.
@@ -25,9 +25,9 @@ export async function findNextIndex(requestOptions, owner, topic, options) {
25
25
  throw e;
26
26
  }
27
27
  }
28
- export async function updateFeed(requestOptions, signer, topic, reference, postageBatchId, options, index = 'latest') {
28
+ export async function updateFeed(requestOptions, signer, topic, reference, postageBatchId, options) {
29
29
  const ownerHex = makeHexEthAddress(signer.address);
30
- const nextIndex = index === 'latest' ? await findNextIndex(requestOptions, ownerHex, topic, options) : index;
30
+ const nextIndex = options?.index || (await findNextIndex(requestOptions, ownerHex, topic, options));
31
31
  const identifier = makeFeedIdentifier(topic, nextIndex);
32
32
  const at = options?.at ?? Date.now() / 1000.0;
33
33
  const timestamp = writeUint64BigEndian(at);
@@ -21,7 +21,7 @@ export interface FeedUpdate {
21
21
  reference: BytesReference;
22
22
  }
23
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>;
24
+ export declare function updateFeed(requestOptions: BeeRequestOptions, signer: Signer, topic: Topic, reference: BytesReference, postageBatchId: BatchId, options?: FeedUploadOptions): Promise<Reference>;
25
25
  export declare function getFeedUpdateChunkReference(owner: EthAddress, topic: Topic, index: Index): PlainBytesReference;
26
26
  export declare function downloadFeedUpdate(requestOptions: BeeRequestOptions, owner: EthAddress, topic: Topic, index: Index): Promise<FeedUpdate>;
27
27
  export declare function makeFeedReader(requestOptions: BeeRequestOptions, type: FeedType, topic: Topic, owner: HexEthAddress): FeedReader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-js",
3
- "version": "6.9.0",
3
+ "version": "6.9.1",
4
4
  "description": "Javascript client for Bee",
5
5
  "keywords": [
6
6
  "bee",