const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.js');
const require_index = require('../../../../../../../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/index.js');
const require_PublicKey = require('./PublicKey.js');
const require_Ed25119Sig2018 = require('./Ed25119Sig2018.js');
const require_EddsaSaSigSecp256k1 = require('./EddsaSaSigSecp256k1.js');
const require_RsaSig2018 = require('./RsaSig2018.js');

//#region ../didcomm/src/modules/connections/models/did/publicKey/index.ts
var import_cjs = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_cjs());
const publicKeyTypes = {
	RsaVerificationKey2018: require_RsaSig2018.RsaSig2018,
	Ed25519VerificationKey2018: require_Ed25119Sig2018.Ed25119Sig2018,
	Secp256k1VerificationKey2018: require_EddsaSaSigSecp256k1.EddsaSaSigSecp256k1
};
/**
* Decorator that transforms public key json to corresonding class instances. See {@link publicKeyTypes}
*
* @example
* class Example {
*   ＠PublicKeyTransformer()
*   private publicKey: PublicKey
* }
*/
function PublicKeyTransformer() {
	return (0, import_cjs.Transform)(({ value }) => {
		return value.map((publicKeyJson) => {
			return (0, import_cjs.plainToInstance)(publicKeyTypes[publicKeyJson.type] ?? require_PublicKey.PublicKey, publicKeyJson);
		});
	}, { toClassOnly: true });
}

//#endregion
exports.PublicKeyTransformer = PublicKeyTransformer;
exports.publicKeyTypes = publicKeyTypes;