

const require_DidJwk = require('./DidJwk.js');

//#region src/modules/dids/methods/jwk/JwkDidResolver.ts
var JwkDidResolver = class {
	constructor() {
		this.supportedMethods = ["jwk"];
		this.allowsCaching = false;
		this.allowsLocalDidRecord = false;
	}
	async resolve(_agentContext, did) {
		const didDocumentMetadata = {};
		try {
			return {
				didDocument: require_DidJwk.DidJwk.fromDid(did).didDocument,
				didDocumentMetadata,
				didResolutionMetadata: { contentType: "application/did+ld+json" }
			};
		} catch (error) {
			return {
				didDocument: null,
				didDocumentMetadata,
				didResolutionMetadata: {
					error: "notFound",
					message: `resolver_error: Unable to resolve did '${did}': ${error}`
				}
			};
		}
	}
};

//#endregion
exports.JwkDidResolver = JwkDidResolver;