X25519.getPublicKey
Computes the X25519 public key from a provided private key.
Imports
Named
import { X25519 } from 'ox'
Examples
import { X25519 } from 'ox'
const publicKey = X25519.getPublicKey({ privateKey: '0x...' })
Definition
function getPublicKey<as>(
options: getPublicKey.Options<as>,
): getPublicKey.ReturnType<as>
Source: src/core/X25519.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>