import _m0 from "protobufjs/minimal"; import { Observable } from "rxjs"; import { TopicID } from "./basic_types"; import { ConsensusMessageChunkInfo } from "./consensus_submit_message"; import { Timestamp } from "./timestamp"; export declare const protobufPackage = "com.hedera.mirror.api.proto"; export interface ConsensusTopicQuery { /** A required topic ID to retrieve messages for. */ topicID: TopicID | undefined; /** * Include messages which reached consensus on or after this time. Defaults to current time if * not set. */ consensusStartTime: Timestamp | undefined; /** * Include messages which reached consensus before this time. If not set it will receive * indefinitely. */ consensusEndTime: Timestamp | undefined; /** * The maximum number of messages to receive before stopping. If not set or set to zero it will * return messages indefinitely. */ limit: number; } export interface ConsensusTopicResponse { /** The time at which the transaction reached consensus */ consensusTimestamp: Timestamp | undefined; /** * The message body originally in the ConsensusSubmitMessageTransactionBody. Message size will * be less than 6KiB. */ message: Uint8Array; /** The running hash (SHA384) of every message. */ runningHash: Uint8Array; /** Starts at 1 for first submitted message. Incremented on each submitted message. */ sequenceNumber: number; /** Version of the SHA-384 digest used to update the running hash. */ runningHashVersion: number; /** Optional information of the current chunk in a fragmented message. */ chunkInfo: ConsensusMessageChunkInfo | undefined; } export declare const ConsensusTopicQuery: { encode(message: ConsensusTopicQuery, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusTopicQuery; fromJSON(object: any): ConsensusTopicQuery; toJSON(message: ConsensusTopicQuery): unknown; create(base?: DeepPartial): ConsensusTopicQuery; fromPartial(object: DeepPartial): ConsensusTopicQuery; }; export declare const ConsensusTopicResponse: { encode(message: ConsensusTopicResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusTopicResponse; fromJSON(object: any): ConsensusTopicResponse; toJSON(message: ConsensusTopicResponse): unknown; create(base?: DeepPartial): ConsensusTopicResponse; fromPartial(object: DeepPartial): ConsensusTopicResponse; }; /** * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS) * messages for an HCS Topic via a specific (possibly open-ended) time range. */ export interface ConsensusService { subscribeTopic(request: ConsensusTopicQuery): Observable; } export declare const ConsensusServiceServiceName = "com.hedera.mirror.api.proto.ConsensusService"; export declare class ConsensusServiceClientImpl implements ConsensusService { private readonly rpc; private readonly service; constructor(rpc: Rpc, opts?: { service?: string; }); subscribeTopic(request: ConsensusTopicQuery): Observable; } interface Rpc { request(service: string, method: string, data: Uint8Array): Promise; clientStreamingRequest(service: string, method: string, data: Observable): Promise; serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string; } ? { [K in keyof Omit]?: DeepPartial; } & { $case: T["$case"]; } : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export {}; //# sourceMappingURL=mirror_consensus_service.d.ts.map