Skip to content

Ed25519.getPublicKey

Computes the Ed25519 public key from a provided private key.

Imports

Named
import { Ed25519 } from 'ox'

Examples

import { Ed25519 } from 'ox'
 
const publicKey = Ed25519.getPublicKey({ privateKey: '0x...' })

Definition

function getPublicKey<as>(
  options: getPublicKey.Options<as>,
): getPublicKey.ReturnType<as>

Source: src/core/Ed25519.ts

Parameters

options

  • Type: getPublicKey.Options<as>

The options to compute the public key.

options.as

  • Type: "Bytes" | "Hex" | as
  • Optional

Format of the returned public key.

options.privateKey

  • Type: 0x${string} | Uint8Array

Private key to compute the public key from.

Return Type

The computed public key.

getPublicKey.ReturnType<as>