import type { KeyPair } from "../crypto/keypair.js"; export declare const NET_PACKET_PING_REQUEST = 0; export declare const NET_PACKET_PING_RESPONSE = 1; export declare const NET_PACKET_GET_NODES = 2; export declare const NET_PACKET_SEND_NODES = 4; export type DhtRpcPacket = { type: number; senderPublicKey: Uint8Array; plain: Uint8Array; }; export declare function encodeDhtRpc(type: number, sender: KeyPair, recipientPublicKey: Uint8Array, plain: Uint8Array): Uint8Array; export declare function decodeDhtRpc(packet: Uint8Array, ourSecretKey: Uint8Array): DhtRpcPacket | undefined; export declare function buildPingPlain(type: number, pingId: Uint8Array): Uint8Array; export declare function parsePingPlain(plain: Uint8Array): { innerType: number; pingId: Uint8Array; } | undefined; export declare function buildGetNodesPlain(targetPublicKey: Uint8Array, pingId: Uint8Array): Uint8Array; export declare function parseGetNodesPlain(plain: Uint8Array): { target: Uint8Array; pingId: Uint8Array; } | undefined; export declare function buildSendNodesPlain(packedNodes: Uint8Array, count: number, pingId: Uint8Array): Uint8Array; export declare function parseSendNodesNodeBytes(plain: Uint8Array): Uint8Array | undefined; export declare function packUdpNodeV4(host: string, port: number, pk: Uint8Array): Uint8Array | undefined;