UNPKG

@waku/proto

Version:
26 lines (25 loc) 924 B
import type { Codec, DecodeOptions } from 'protons-runtime'; import type { Uint8ArrayList } from 'uint8arraylist'; export interface HistoryEntry { messageId: string; retrievalHint?: Uint8Array; } export declare namespace HistoryEntry { const codec: () => Codec<HistoryEntry>; const encode: (obj: Partial<HistoryEntry>) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions<HistoryEntry>) => HistoryEntry; } export interface SdsMessage { senderId: string; messageId: string; channelId: string; lamportTimestamp?: number; causalHistory: HistoryEntry[]; bloomFilter?: Uint8Array; content?: Uint8Array; } export declare namespace SdsMessage { const codec: () => Codec<SdsMessage>; const encode: (obj: Partial<SdsMessage>) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions<SdsMessage>) => SdsMessage; }