UNPKG

@fairdatasociety/fdp-lokijs-adapter

Version:
29 lines (28 loc) 1.19 kB
import { Bee, Signer, Topic, Utils } from '@ethersphere/bee-js'; import { IStreamingFeed, SwarmStreamingFeedR, SwarmStreamingFeedRW, FaultTolerantStreamType } from './streaming'; export declare class StreamingFeed implements IStreamingFeed<number> { readonly bee: Bee; type: FaultTolerantStreamType; constructor(bee: Bee, type?: FaultTolerantStreamType); /** * Creates a streaming feed reader * @param topic a swarm topic * @param owner owner * @returns a streaming feed reader */ makeFeedR(topic: Topic | Uint8Array | string, owner: Utils.Eth.EthAddress | Uint8Array | string): SwarmStreamingFeedR; /** * Creates a streaming feed reader / writer * @param topic a swarm topic * @param signer signer * @returns a streaming feed reader / writer */ makeFeedRW(topic: string | Topic | Uint8Array, signer: string | Uint8Array | Signer): SwarmStreamingFeedRW; /** * Get Single Owner Chunk identifier * @param topic a swarm topic, bytes 32 length * @param index the chunk index * @returns a bytes 32 */ getIdentifier(topic: Utils.Bytes.Bytes<32>, index: number): Utils.Bytes.Bytes<32>; }