UNPKG

@peculiar/webcrypto

Version:
22 lines (21 loc) • 481 B
/** * Copyright (c) 2019-2026, Peculiar Ventures * SPDX-License-Identifier: MIT */ import { Ed25519CryptoKey } from "./crypto_key.js"; import crypto from "node:crypto"; // src/mechs/ed25519/public_key.ts var Ed25519PublicKey = class extends Ed25519CryptoKey { type = "public"; toJWK() { const jwk = crypto.createPublicKey({ key: this.data, format: "pem" }).export({ format: "jwk" }); return { ...super.toJWK(), ...jwk }; } }; export { Ed25519PublicKey };