

const require_CredoError = require('../../../../error/CredoError.js');
require('../../../../error/index.js');
const require_Secp256k1PublicJwk = require('../../../kms/jwk/kty/ec/Secp256k1PublicJwk.js');
require('../../../kms/index.js');
const require_JsonWebKey2020 = require('../verificationMethod/JsonWebKey2020.js');
const require_Multikey = require('../verificationMethod/Multikey.js');
const require_EcdsaSecp256k1VerificationKey2019 = require('../verificationMethod/EcdsaSecp256k1VerificationKey2019.js');
require('../verificationMethod/index.js');

//#region src/modules/dids/domain/key-type/secp256k1.ts
const keyDidSecp256k1 = {
	PublicJwkTypes: [require_Secp256k1PublicJwk.Secp256k1PublicJwk],
	supportedVerificationMethodTypes: [
		require_EcdsaSecp256k1VerificationKey2019.VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019,
		require_JsonWebKey2020.VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020,
		require_Multikey.VERIFICATION_METHOD_TYPE_MULTIKEY
	],
	getVerificationMethods: (did, publicJwk) => [require_JsonWebKey2020.getJsonWebKey2020({
		did,
		publicJwk
	})],
	getPublicJwkFromVerificationMethod: (verificationMethod) => {
		if (require_EcdsaSecp256k1VerificationKey2019.isEcdsaSecp256k1VerificationKey2019(verificationMethod)) return require_EcdsaSecp256k1VerificationKey2019.getPublicJwkFromEcdsaSecp256k1VerificationKey2019(verificationMethod);
		throw new require_CredoError.CredoError(`Verification method with type '${verificationMethod.type}' not supported for key type Secp256K1`);
	}
};

//#endregion
exports.keyDidSecp256k1 = keyDidSecp256k1;