import { Libp2p } from "libp2p";
import { type PeerId } from "@libp2p/interface-peer-id";
import type { StreamHandler } from "@libp2p/interface/stream-handler";
import { Multiaddr } from "@multiformats/multiaddr";
import type { DIDResolver, Secret } from "didcomm-node";
import { Message } from "didcomm-node";
import { CreateNodeOptions, NodeOptions, PROTOCOLS, RegistryInterface, StorageInterface, NODE_SERVICES, DEFAULT_SERVICES } from "@djack-sdk/interfaces";
import { Domain } from '@atala/prism-wallet-sdk';
import type { DIDFactory } from "@djack-sdk/did-peer";
import { AnoncredsLoader } from "./AnoncredsLoader";
export * from "./Task";
export * from "./AnoncredsLoader";
export * from "./Protocols";
export declare const DIDCommMessagingKey = "DIDCommMessaging";
export declare const DIDCommMessagingEncodedKey = "dm";
export type ProtocolHandler<ProtocolName = string, ProtocolHandle = StreamHandler> = [ProtocolName, ProtocolHandle];
export declare class ProtocolHandlers {
    protocols: ProtocolHandler[];
    constructor(protocols?: ProtocolHandler[]);
}
export declare function getPeerIDDID(peer: PeerId): Promise<Domain.DID>;
export declare class Network<T extends Record<string, unknown> = DEFAULT_SERVICES> {
    static didcomm: typeof import("didcomm-node");
    static _anoncreds: AnoncredsLoader | undefined;
    private handlers;
    did: Domain.DID;
    didWebHostname: string;
    peerdid: Domain.DID;
    cardanoDID: Domain.DID;
    p2p: Libp2p<NODE_SERVICES<T>>;
    storage: StorageInterface;
    factory: DIDFactory;
    registry: RegistryInterface;
    domain: string;
    coreAbort: AbortController;
    aborts: AbortController[];
    get abortController(): {
        signal: any;
    };
    constructor(options: NodeOptions<T>);
    static getDIDComm(): Promise<typeof import("didcomm-node")>;
    static getAnoncreds(): Promise<AnoncredsLoader>;
    get anoncreds(): AnoncredsLoader;
    private static generateKeyPair;
    get addresses(): string[];
    protected static DEFAULT_LISTENERS: never[];
    static addDefaultListeners(listeners: string[]): string[];
    static createNode<T extends Record<string, unknown>>(options: CreateNodeOptions<T>): Promise<Network<{
        x: unknown;
    }>>;
    static getServicesForPeerDID(peerId: PeerId): Domain.Service[];
    get address(): Multiaddr;
    get services(): Domain.Service[];
    get peer(): import("@libp2p/interface/dist/src/peer-id").PeerId | null;
    get didResolver(): DIDResolver;
    get secretResolver(): {
        find_secrets: (secretIds: string[]) => Promise<string[]>;
        get_secret: (secretId: string) => Promise<Secret | null>;
    };
    private mapToSecret;
    onPeerDiscovery?: (event: {
        id: PeerId;
        multiaddrs: Multiaddr[];
        protocols: string[];
    }) => void | Promise<void>;
    onPeerConnect?: (peer: PeerId) => void | Promise<void>;
    validateProtocol(protocol: string): PROTOCOLS;
    addHandler(name: string, handler: StreamHandler): void;
    private _onPeerConnect;
    private _onPeerDiscovery;
    stop(): Promise<void>;
    getServiceProtocol(protocol: PROTOCOLS): string;
    isValidServiceProvider(protocols: string[]): string | undefined;
    start(abortController?: AbortController): Promise<void>;
    packMessage(from: string, to: string, message: Message): Promise<Uint8Array>;
    unpack(message: Uint8Array): Promise<Message>;
    dialProtocol(peer: PeerId | Multiaddr | Multiaddr[], protocols: string | string[]): Promise<import("@libp2p/interface/dist/src/connection").Stream>;
    dial(peer: any): Promise<import("@libp2p/interface/dist/src/connection").Connection>;
    sendMessage(peer: any, protocol: string, message: Uint8Array): Promise<void>;
    sendAndGetResponse(peer: Multiaddr | Multiaddr[] | PeerId, protocol: string, message: Uint8Array): Promise<Message>;
}
