

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

//#region src/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.ts
var Secp256k1PublicJwk = class Secp256k1PublicJwk {
	constructor(jwk) {
		this.jwk = jwk;
		this.supportdEncryptionKeyAgreementAlgorithms = Secp256k1PublicJwk.supportdEncryptionKeyAgreementAlgorithms;
		this.supportedSignatureAlgorithms = Secp256k1PublicJwk.supportedSignatureAlgorithms;
		this.multicodecPrefix = Secp256k1PublicJwk.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 Secp256k1PublicJwk(ecPublicKeyToPublicJwk(publicKey, "secp256k1"));
	}
	static fromMulticodec(multicodec) {
		return new Secp256k1PublicJwk(ecPublicKeyToPublicJwk(multicodec, "secp256k1"));
	}
};
Secp256k1PublicJwk.supportedSignatureAlgorithms = [KnownJwaSignatureAlgorithms.ES256K];
Secp256k1PublicJwk.supportdEncryptionKeyAgreementAlgorithms = [KnownJwaKeyAgreementAlgorithms.ECDH_ES];
Secp256k1PublicJwk.multicodecPrefix = 231;

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