

const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
const require_CredoError = require('../../../../error/CredoError.js');
require('../../../../error/index.js');
const require_Ed25519PublicJwk = require('../../../kms/jwk/kty/okp/Ed25519PublicJwk.js');
require('../../../kms/index.js');
const require_Ed25519VerificationKey2018 = require('../verificationMethod/Ed25519VerificationKey2018.js');
const require_Ed25519VerificationKey2020 = require('../verificationMethod/Ed25519VerificationKey2020.js');
const require_JsonWebKey2020 = require('../verificationMethod/JsonWebKey2020.js');
const require_Multikey = require('../verificationMethod/Multikey.js');
require('../verificationMethod/index.js');
let __stablelib_ed25519 = require("@stablelib/ed25519");
__stablelib_ed25519 = require_rolldown_runtime.__toESM(__stablelib_ed25519);

//#region src/modules/dids/domain/key-type/ed25519.ts
const keyDidEd25519 = {
	PublicJwkTypes: [require_Ed25519PublicJwk.Ed25519PublicJwk],
	supportedVerificationMethodTypes: [
		require_Ed25519VerificationKey2018.VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018,
		require_Ed25519VerificationKey2020.VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020,
		require_JsonWebKey2020.VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020,
		require_Multikey.VERIFICATION_METHOD_TYPE_MULTIKEY
	],
	getVerificationMethods: (did, publicJwk) => [require_Ed25519VerificationKey2018.getEd25519VerificationKey2018({
		id: `${did}#${publicJwk.fingerprint}`,
		publicJwk,
		controller: did
	})],
	getPublicJwkFromVerificationMethod: (verificationMethod) => {
		if (require_Ed25519VerificationKey2018.isEd25519VerificationKey2018(verificationMethod)) return require_Ed25519VerificationKey2018.getPublicJwkFromEd25519VerificationKey2018(verificationMethod);
		if (require_Ed25519VerificationKey2020.isEd25519VerificationKey2020(verificationMethod)) return require_Ed25519VerificationKey2020.getPublicJwkFromEd25519VerificationKey2020(verificationMethod);
		throw new require_CredoError.CredoError(`Verification method with type '${verificationMethod.type}' not supported for key type Ed25519`);
	}
};

//#endregion
exports.keyDidEd25519 = keyDidEd25519;