

const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
const require_jwa = require('../../jwa.js');
const require_okpPublicKey = require('./okpPublicKey.js');
const require_X25519PublicJwk = require('./X25519PublicJwk.js');
let __stablelib_ed25519 = require("@stablelib/ed25519");

//#region src/modules/kms/jwk/kty/okp/Ed25519PublicJwk.ts
var Ed25519PublicJwk = class Ed25519PublicJwk {
	constructor(jwk) {
		this.jwk = jwk;
		this.supportdEncryptionKeyAgreementAlgorithms = Ed25519PublicJwk.supportdEncryptionKeyAgreementAlgorithms;
		this.supportedSignatureAlgorithms = Ed25519PublicJwk.supportedSignatureAlgorithms;
		this.multicodecPrefix = Ed25519PublicJwk.multicodecPrefix;
	}
	get publicKey() {
		return {
			crv: this.jwk.crv,
			kty: this.jwk.kty,
			publicKey: require_okpPublicKey.okpPublicJwkToPublicKey(this.jwk)
		};
	}
	/**
	* Not supported for Ed25519
	*/
	get compressedPublicKey() {
		return null;
	}
	get multicodec() {
		return require_okpPublicKey.okpPublicJwkToPublicKey(this.jwk);
	}
	static fromPublicKey(publicKey) {
		return new Ed25519PublicJwk(require_okpPublicKey.okpPublicKeyToPublicJwk(publicKey, "Ed25519"));
	}
	static fromMulticodec(multicodec) {
		return new Ed25519PublicJwk(require_okpPublicKey.okpPublicKeyToPublicJwk(multicodec, "Ed25519"));
	}
	toX25519PublicJwk() {
		return require_X25519PublicJwk.X25519PublicJwk.fromPublicKey((0, __stablelib_ed25519.convertPublicKeyToX25519)(this.publicKey.publicKey)).jwk;
	}
};
Ed25519PublicJwk.supportedSignatureAlgorithms = [require_jwa.KnownJwaSignatureAlgorithms.EdDSA, require_jwa.KnownJwaSignatureAlgorithms.Ed25519];
Ed25519PublicJwk.supportdEncryptionKeyAgreementAlgorithms = [];
Ed25519PublicJwk.multicodecPrefix = 237;

//#endregion
exports.Ed25519PublicJwk = Ed25519PublicJwk;