

import { KnownJwaKeyAgreementAlgorithms, KnownJwaSignatureAlgorithms } from "../../jwa.mjs";
import { ecPublicJwkToPublicKey, ecPublicKeyToPublicJwk } from "./ecPublicKey.mjs";

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

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