import type { JwkKeyPair, PublicKeyJwk } from '../crypto/index.js'; import type { IonDocumentModel } from '@decentralized-identity/ion-sdk'; import type { DidDocument, DidKeySetVerificationMethodKey, DidMethod, DidResolutionOptions, DidResolutionResult, DidService, PortableDid } from './types.js'; export type DidIonAnchorOptions = { challengeEnabled?: boolean; challengeEndpoint?: string; operationsEndpoint?: string; keySet: DidIonKeySet; services: DidService[]; }; export type DidIonCreateOptions = { anchor?: boolean; keyAlgorithm?: typeof SupportedCryptoAlgorithms[number]; keySet?: DidIonKeySet; services?: DidService[]; }; export type DidIonKeySet = { recoveryKey?: JwkKeyPair; updateKey?: JwkKeyPair; verificationMethodKeys?: DidKeySetVerificationMethodKey[]; }; declare enum OperationType { Create = "create", Update = "update", Deactivate = "deactivate", Recover = "recover" } /** * Data model representing a public key in the DID Document. */ export interface IonCreateRequestModel { type: OperationType; suffixData: { deltaHash: string; recoveryCommitment: string; }; delta: { updateCommitment: string; patches: { action: string; document: IonDocumentModel; }[]; }; } declare const SupportedCryptoAlgorithms: readonly ["Ed25519", "secp256k1"]; export declare class DidIonMethod implements DidMethod { /** * Name of the DID method */ static methodName: string; static anchor(options: { services: DidService[]; keySet: DidIonKeySet; challengeEnabled?: boolean; challengeEndpoint?: string; operationsEndpoint?: string; }): Promise; static create(options?: DidIonCreateOptions): Promise; static decodeLongFormDid(options: { didUrl: string; }): Promise; /** * Generates two key pairs used for authorization and encryption purposes * when interfacing with DWNs. The IDs of these keys are referenced in the * service object that includes the dwnUrls provided. */ static generateDwnOptions(options: { encryptionKeyId?: string; serviceEndpointNodes: string[]; serviceId?: string; signingKeyAlgorithm?: typeof SupportedCryptoAlgorithms[number]; signingKeyId?: string; }): Promise; static generateJwkKeyPair(options: { keyAlgorithm: typeof SupportedCryptoAlgorithms[number]; keyId?: string; }): Promise; static generateKeySet(options?: { keyAlgorithm?: typeof SupportedCryptoAlgorithms[number]; keySet?: DidIonKeySet; }): Promise; /** * Given the W3C DID Document of a `did:ion` DID, return the identifier of * the verification method key that will be used for signing messages and * credentials, by default. * * @param document = DID Document to get the default signing key from. * @returns Verification method identifier for the default signing key. */ static getDefaultSigningKey(options: { didDocument: DidDocument; }): Promise; static getLongFormDid(options: { services: DidService[]; keySet: DidIonKeySet; }): Promise; static getShortFormDid(options: { didUrl: string; }): Promise; static resolve(options: { didUrl: string; resolutionOptions?: DidResolutionOptions; }): Promise; static createIonDocument(options: { keySet: DidIonKeySet; services?: DidService[]; }): Promise; static getIonCreateRequest(options: { ionDocument: IonDocumentModel; recoveryPublicKeyJwk: PublicKeyJwk; updatePublicKeyJwk: PublicKeyJwk; }): Promise; private static jwkToIonJwk; } export {}; //# sourceMappingURL=did-ion.d.ts.map