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