'use strict';

var ssiSdkExt_didResolverJwk = require('@sphereon/ssi-sdk-ext.did-resolver-jwk');
var resolver_generic_resolver = require('../generic/resolver.cjs');
require('../../utils/types/array.cjs');
require('crypto');
require('bs58');
require('multiformats/bases/base58');
require('varint');
require('../../utils/encoding/ss-58.cjs');
require('../../utils/types/string.cjs');
require('../generic/const.cjs');
require('../../utils/inheritance.cjs');
require('../../utils/types/object.cjs');
require('../../utils/types/iterable.cjs');
require('../../utils/types/set.cjs');
require('blake2b');
require('../../utils/types/bytes.cjs');
require('../../utils/interfaces.cjs');
require('../../utils/assert.cjs');
require('../../utils/error.cjs');

const jwkResolver = ssiSdkExt_didResolverJwk.getDidJwkResolver();

/**
 * Resolves `DID` keys with identifier `did:jwk:*`.
 */
class DIDJWKResolver extends resolver_generic_resolver {
  prefix = 'did';

  method = 'jwk';

  constructor() {
    super(void 0);
  }

  async resolve(did) {
    const { didDocument } = await jwkResolver.jwk(did);
    return {
      '@context': 'https://www.w3.org/ns/did/v1',
      ...didDocument,
    };
  }
}

module.exports = DIDJWKResolver;
//# sourceMappingURL=did-jwk-resolver.cjs.map
