export interface VerificationMethod extends Record { id: string; type: string; controller: string; } export interface Service extends Record { id: string; type: string; serviceEndpoint: string | Record | (string | Record)[]; } export interface IDIDDocument { "@context"?: "https://www.w3.org/ns/did/v1" | string | string[]; id: string; alsoKnownAs?: string[]; controller?: string | string[]; verificationMethod?: VerificationMethod[]; service?: Service[]; } export declare class DIDDocument { "@context"?: "https://www.w3.org/ns/did/v1" | string | string[]; id: string; alsoKnownAs?: string[]; controller?: string | string[]; verificationMethod?: VerificationMethod[]; service?: Service[]; constructor(id: string, opts?: Omit); /** * Checks if a given value is a valid DID Document. */ static isDoc(o: any): boolean; /** * Adds to a top level field in the document named `set`. Will create it, if * it doesn't exist already. * @throws Will throw if there exists an object in the set wth the same `id` as `item.id` */ addToSet(set: string, item: Record): void; /** * Add a new verification method to the document. * @throws Will throw if a method with the same ID already exists in the document * @param {Object} method * @param {string} method.id Method ID * @param {string} method.type Method type * @param {string} [method.controller] Method controller DID. If left out, will be set to the document's ID. */ addVerificationMethod(method: { id: string; type: string; controller?: string; }): void; }