import { getDidJwkResolver } from '@sphereon/ssi-sdk-ext.did-resolver-jwk';
import Resolver from '../generic/resolver.js';
import '../../utils/types/array.js';
import 'crypto';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../utils/encoding/ss-58.js';
import '../../utils/types/string.js';
import '../generic/const.js';
import '../../utils/inheritance.js';
import '../../utils/types/object.js';
import '../../utils/types/iterable.js';
import '../../utils/types/set.js';
import 'blake2b';
import '../../utils/types/bytes.js';
import '../../utils/interfaces.js';
import '../../utils/assert.js';
import '../../utils/error.js';

const jwkResolver = getDidJwkResolver();

/**
 * Resolves `DID` keys with identifier `did:jwk:*`.
 */
class DIDJWKResolver extends 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,
    };
  }
}

export { DIDJWKResolver as default };
//# sourceMappingURL=did-jwk-resolver.js.map
