Skip to content

Mnemonic.toSeed

Converts a mnemonic to a master seed.

Imports

Named
import { Mnemonic } from 'ox'

Examples

import { Mnemonic } from 'ox'
 
const mnemonic = Mnemonic.random(Mnemonic.english)
const seed = Mnemonic.toSeed(mnemonic)
Uint8Array [...64 bytes]

Definition

function toSeed<as>(
  mnemonic: string,
  options?: toSeed.Options<as>,
): toSeed.ReturnType<as>

Source: src/Mnemonic.ts

Parameters

mnemonic

  • Type: string

The mnemonic to convert.

options

  • Type: toSeed.Options<as>
  • Optional

Conversion options.

options.as

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

The output format.

options.passphrase

  • Type: string
  • Optional

An optional passphrase for additional protection to the seed.

Return Type

The master seed.

toSeed.ReturnType<as>