import type { Codec, DecodeOptions } from 'protons-runtime'; import type { Uint8ArrayList } from 'uint8arraylist'; export interface Record { key?: Uint8Array; value?: Uint8Array; author?: Uint8Array; signature?: Uint8Array; timeReceived?: string; } export declare namespace Record { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => Record; } export declare enum MessageType { PUT_VALUE = "PUT_VALUE", GET_VALUE = "GET_VALUE", ADD_PROVIDER = "ADD_PROVIDER", GET_PROVIDERS = "GET_PROVIDERS", FIND_NODE = "FIND_NODE", PING = "PING" } export declare namespace MessageType { const codec: () => Codec; } export declare enum ConnectionType { NOT_CONNECTED = "NOT_CONNECTED", CONNECTED = "CONNECTED", CAN_CONNECT = "CAN_CONNECT", CANNOT_CONNECT = "CANNOT_CONNECT" } export declare namespace ConnectionType { const codec: () => Codec; } export interface PeerInfo { id: Uint8Array; multiaddrs: Uint8Array[]; connection?: ConnectionType; } export declare namespace PeerInfo { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => PeerInfo; } export interface Message { type: MessageType; clusterLevel?: number; key?: Uint8Array; record?: Uint8Array; closer: PeerInfo[]; providers: PeerInfo[]; } export declare namespace Message { const codec: () => Codec; const encode: (obj: Partial) => Uint8Array; const decode: (buf: Uint8Array | Uint8ArrayList, opts?: DecodeOptions) => Message; } //# sourceMappingURL=dht.d.ts.map