

const require_PublicJwk = require('../../../kms/jwk/PublicJwk.js');
require('../../../kms/index.js');
const require_parse = require('../../domain/parse.js');
const require_keyDidDocument = require('../../domain/keyDidDocument.js');

//#region src/modules/dids/methods/key/DidKey.ts
var DidKey = class DidKey {
	constructor(publicJwk) {
		this.publicJwk = publicJwk;
	}
	static fromDid(did) {
		const parsed = require_parse.parseDid(did);
		return new DidKey(require_PublicJwk.PublicJwk.fromFingerprint(parsed.id));
	}
	get did() {
		return `did:key:${this.publicJwk.fingerprint}`;
	}
	get didDocument() {
		return require_keyDidDocument.getDidDocumentForPublicJwk(this.did, this.publicJwk);
	}
};

//#endregion
exports.DidKey = DidKey;