import type { Cache } from '../types/cache.js';
import type { PublicJwk } from '../types/jose-types.js';
/**
 * A DID resolver that by default supports `did:key` and `did:ion` DIDs.
 */
export declare class DidResolver {
    private didResolvers;
    private cache;
    constructor(resolvers?: DidMethodResolver[], cache?: Cache);
    /**
     * attempt to resolve the DID provided
     * @throws {Error} if DID is invalid
     * @throws {Error} if DID method is not supported
     * @throws {Error} if resolving DID fails
     * @param did - the DID to resolve
     * @returns {DidResolutionResult}
     */
    resolve(did: string): Promise<DidResolutionResult>;
    dump(): Promise<void>;
}
/**
 * A generalized interface that can be implemented for individual
 * DID methods
 */
export interface DidMethodResolver {
    /**
     * @returns the DID method supported by {@link DidMethodResolver.resolve}
     */
    method(): string;
    /**
     * attempts to resolve the DID provided into its respective DID Document.
     * More info on resolving DIDs can be found
     * {@link https://www.w3.org/TR/did-core/#resolution here}
     * @param did - the DID to resolve
     * @throws {Error} if unable to resolve the DID
     */
    resolve(did: string): Promise<DidResolutionResult>;
}
export declare type DidDocument = {
    '@context'?: 'https://www.w3.org/ns/did/v1' | string | string[];
    id: string;
    alsoKnownAs?: string[];
    controller?: string | string[];
    verificationMethod?: VerificationMethod[];
    service?: ServiceEndpoint[];
    authentication?: VerificationMethod[] | string[];
    assertionMethod?: VerificationMethod[] | string[];
    keyAgreement?: VerificationMethod[] | string[];
    capabilityInvocation?: VerificationMethod[] | string[];
    capabilityDelegation?: VerificationMethod[] | string[];
};
export declare type DwnServiceEndpoint = {
    nodes: string[];
};
export declare type ServiceEndpoint = {
    id: string;
    type: string;
    serviceEndpoint: string | DwnServiceEndpoint;
    description?: string;
};
export declare type VerificationMethod = {
    id: string;
    type: string;
    controller: string;
    publicKeyJwk?: PublicJwk;
};
export declare type DidResolutionResult = {
    '@context'?: 'https://w3id.org/did-resolution/v1' | string | string[];
    didResolutionMetadata: DidResolutionMetadata;
    didDocument?: DidDocument;
    didDocumentMetadata: DidDocumentMetadata;
};
export declare type DidResolutionMetadata = {
    contentType?: string;
    error?: 'invalidDid' | 'notFound' | 'representationNotSupported' | 'unsupportedDidMethod' | string;
};
export declare type DidDocumentMetadata = {
    created?: string;
    updated?: string;
    deactivated?: boolean;
    versionId?: string;
    nextUpdate?: string;
    nextVersionId?: string;
    equivalentId?: string;
    canonicalId?: string;
};
//# sourceMappingURL=did-resolver.d.ts.map