

import { KnownJwaKeyAgreementAlgorithms } from "../../jwa.mjs";
import { okpPublicJwkToPublicKey, okpPublicKeyToPublicJwk } from "./okpPublicKey.mjs";

//#region src/modules/kms/jwk/kty/okp/X25519PublicJwk.ts
var X25519PublicJwk = class X25519PublicJwk {
	constructor(jwk) {
		this.jwk = jwk;
		this.supportdEncryptionKeyAgreementAlgorithms = X25519PublicJwk.supportdEncryptionKeyAgreementAlgorithms;
		this.supportedSignatureAlgorithms = X25519PublicJwk.supportedSignatureAlgorithms;
		this.multicodecPrefix = X25519PublicJwk.multicodecPrefix;
	}
	get publicKey() {
		return {
			crv: this.jwk.crv,
			kty: this.jwk.kty,
			publicKey: okpPublicJwkToPublicKey(this.jwk)
		};
	}
	/**
	* Not supported for X25519
	*/
	get compressedPublicKey() {
		return null;
	}
	get multicodec() {
		return okpPublicJwkToPublicKey(this.jwk);
	}
	static fromPublicKey(publicKey) {
		return new X25519PublicJwk(okpPublicKeyToPublicJwk(publicKey, "X25519"));
	}
	static fromMulticodec(multicodec) {
		return new X25519PublicJwk(okpPublicKeyToPublicJwk(multicodec, "X25519"));
	}
};
X25519PublicJwk.supportdEncryptionKeyAgreementAlgorithms = [KnownJwaKeyAgreementAlgorithms.ECDH_HSALSA20];
X25519PublicJwk.supportedSignatureAlgorithms = [];
X25519PublicJwk.multicodecPrefix = 236;

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