Skip to main content
Module

x/earthstar/deps.ts>ed.getPublicKey

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
function ed.getPublicKey
import { ed } from "https://deno.land/x/earthstar@v10.0.0-beta.8/deps.ts";
const { getPublicKey } = ed;

Calculates ed25519 public key.

  1. private key is hashed with sha512, then first 32 bytes are taken from the hash
  2. 3 least significant bits of the first byte are cleared RFC8032 5.1.5

Parameters

privateKey: PrivKey

Returns

Promise<Uint8Array>