

const require_jwa = require('../../jwa.js');
const require_ecPublicKey = require('./ecPublicKey.js');

//#region src/modules/kms/jwk/kty/ec/P521PublicJwk.ts
var P521PublicJwk = class P521PublicJwk {
	constructor(jwk) {
		this.jwk = jwk;
		this.supportdEncryptionKeyAgreementAlgorithms = P521PublicJwk.supportdEncryptionKeyAgreementAlgorithms;
		this.supportedSignatureAlgorithms = P521PublicJwk.supportedSignatureAlgorithms;
		this.multicodecPrefix = P521PublicJwk.multicodecPrefix;
	}
	get publicKey() {
		return {
			crv: this.jwk.crv,
			kty: this.jwk.kty,
			publicKey: require_ecPublicKey.ecPublicJwkToPublicKey(this.jwk)
		};
	}
	get compressedPublicKey() {
		return {
			crv: this.jwk.crv,
			kty: this.jwk.kty,
			publicKey: require_ecPublicKey.ecPublicJwkToPublicKey(this.jwk, { compressed: true })
		};
	}
	get multicodec() {
		return require_ecPublicKey.ecPublicJwkToPublicKey(this.jwk, { compressed: true });
	}
	static fromPublicKey(publicKey) {
		return new P521PublicJwk(require_ecPublicKey.ecPublicKeyToPublicJwk(publicKey, "P-521"));
	}
	static fromMulticodec(multicodec) {
		return new P521PublicJwk(require_ecPublicKey.ecPublicKeyToPublicJwk(multicodec, "P-521"));
	}
};
P521PublicJwk.supportedSignatureAlgorithms = [require_jwa.KnownJwaSignatureAlgorithms.ES512];
P521PublicJwk.supportdEncryptionKeyAgreementAlgorithms = [require_jwa.KnownJwaKeyAgreementAlgorithms.ECDH_ES];
P521PublicJwk.multicodecPrefix = 4610;

//#endregion
exports.P521PublicJwk = P521PublicJwk;