UNPKG

@waku/relay

Version:
22 lines (21 loc) 895 B
import type { IDecoder, IProtoMessage, ITopicOnlyMessage, PubsubTopic } from "@waku/interfaces"; import { TopicOnlyMessage as ProtoTopicOnlyMessage } from "@waku/proto"; export declare class TopicOnlyMessage implements ITopicOnlyMessage { pubsubTopic: string; private proto; version: number; payload: Uint8Array; rateLimitProof: undefined; timestamp: undefined; meta: undefined; ephemeral: undefined; constructor(pubsubTopic: string, proto: ProtoTopicOnlyMessage); get contentTopic(): string; } export declare class TopicOnlyDecoder implements IDecoder<ITopicOnlyMessage> { pubsubTopic: PubsubTopic; contentTopic: string; constructor(pubsubTopic: PubsubTopic); fromWireToProtoObj(bytes: Uint8Array): Promise<IProtoMessage | undefined>; fromProtoObj(pubsubTopic: string, proto: IProtoMessage): Promise<ITopicOnlyMessage | undefined>; }