Ed25519.randomPrivateKey
Generates a random Ed25519 private key.
Imports
Named
import { Ed25519 } from 'ox'Examples
import { Ed25519 } from 'ox'
const privateKey = Ed25519.randomPrivateKey()Definition
function randomPrivateKey<as>(
options?: randomPrivateKey.Options<as>,
): randomPrivateKey.ReturnType<as>Source: src/core/Ed25519.ts
Parameters
options
- Type:
randomPrivateKey.Options<as> - Optional
The options to generate the private key.
options.as
- Type:
"Bytes" | "Hex" | as - Optional
Format of the returned private key.
Return Type
The generated private key.
randomPrivateKey.ReturnType<as>

