/** * DID:key Resolver * * Resolves did:key DIDs to DID Documents with verification methods. * Supports Ed25519 keys (multicodec prefix 0xed01). * * did:key format: did:key:z)> * * For Ed25519: * - Multicodec prefix: 0xed 0x01 * - Public key: 32 bytes * - Multibase prefix: 'z' (base58btc) * * @see https://w3c-ccg.github.io/did-method-key/ */ import type { DIDResolver, DIDDocument } from './vc-verifier'; /** * Check if a DID is a valid did:key with Ed25519 key * * Ed25519 keys in did:key start with 'z6Mk' after the method prefix. * The 'z' is the multibase prefix for base58btc, and '6Mk' is the * base58-encoded prefix for Ed25519 (0xed 0x01). * * @param did - The DID to check * @returns true if it's a valid did:key with Ed25519 key */ export declare function isEd25519DidKey(did: string): boolean; /** * Extract the public key bytes from a did:key DID * * @param did - The did:key DID * @returns Public key bytes or null if invalid */ export declare function extractPublicKeyFromDidKey(did: string): Uint8Array | null; /** * Convert Ed25519 public key bytes to JWK format * * @param publicKeyBytes - 32-byte Ed25519 public key * @returns JWK object */ export declare function publicKeyToJwk(publicKeyBytes: Uint8Array): { kty: string; crv: string; x: string; }; /** * Create a DID:key resolver * * Returns a DIDResolver that can resolve did:key DIDs to DID Documents. * Currently supports only Ed25519 keys. * * @returns DIDResolver implementation for did:key */ export declare function createDidKeyResolver(): DIDResolver; /** * Resolve a did:key DID synchronously * * Convenience function for cases where async is not needed. * * @param did - The did:key DID to resolve * @returns DID Document or null if invalid */ export declare function resolveDidKeySync(did: string): DIDDocument | null; //# sourceMappingURL=did-key-resolver.d.ts.map