

import { CredoError } from "../../../../error/CredoError.mjs";
import "../../../../error/index.mjs";
import { Secp256k1PublicJwk } from "../../../kms/jwk/kty/ec/Secp256k1PublicJwk.mjs";
import "../../../kms/index.mjs";
import { VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, getJsonWebKey2020 } from "../verificationMethod/JsonWebKey2020.mjs";
import { VERIFICATION_METHOD_TYPE_MULTIKEY } from "../verificationMethod/Multikey.mjs";
import { VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, getPublicJwkFromEcdsaSecp256k1VerificationKey2019, isEcdsaSecp256k1VerificationKey2019 } from "../verificationMethod/EcdsaSecp256k1VerificationKey2019.mjs";
import "../verificationMethod/index.mjs";

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

//#endregion
export { keyDidSecp256k1 };
//# sourceMappingURL=secp256k1.mjs.map