import { type Codec, type DecodeOptions } from 'protons-runtime'; import type { Uint8ArrayList } from 'uint8arraylist'; export interface RPC { subscriptions: RPC.SubOpts[]; messages: RPC.Message[]; control?: RPC.ControlMessage; } export declare namespace RPC { interface SubOpts { subscribe?: boolean; topic?: string; } namespace SubOpts { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => SubOpts; } interface Message { from?: Uint8Array; data?: Uint8Array; seqno?: Uint8Array; topic: string; signature?: Uint8Array; key?: Uint8Array; } namespace Message { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => Message; } interface ControlMessage { ihave: RPC.ControlIHave[]; iwant: RPC.ControlIWant[]; graft: RPC.ControlGraft[]; prune: RPC.ControlPrune[]; idontwant: RPC.ControlIDontWant[]; } namespace ControlMessage { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlMessage; } interface ControlIHave { topicID?: string; messageIDs: Uint8Array[]; } namespace ControlIHave { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlIHave; } interface ControlIWant { messageIDs: Uint8Array[]; } namespace ControlIWant { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlIWant; } interface ControlGraft { topicID?: string; } namespace ControlGraft { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlGraft; } interface ControlPrune { topicID?: string; peers: RPC.PeerInfo[]; backoff?: number; } namespace ControlPrune { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlPrune; } interface PeerInfo { peerID?: Uint8Array; signedPeerRecord?: Uint8Array; } namespace PeerInfo { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => PeerInfo; } interface ControlIDontWant { messageIDs: Uint8Array[]; } namespace ControlIDontWant { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => ControlIDontWant; } const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => RPC; } //# sourceMappingURL=rpc.d.ts.map