Skip to main content

Class: Ed25519Seed

Class to help with seeds.

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new Ed25519Seed(secretKeyBytes?)

Create a new instance of Ed25519Seed.

Parameters

NameTypeDescription
secretKeyBytes?Uint8ArrayThe bytes.

Methods

fromMnemonic

Static fromMnemonic(mnemonic): Ed25519Seed

Create the seed from a Bip39 mnemonic.

Parameters

NameTypeDescription
mnemonicstringThe mnemonic to create the seed from.

Returns

Ed25519Seed

A new instance of Ed25519Seed.


keyPair

keyPair(): IKeyPair

Get the key pair from the seed.

Returns

IKeyPair

The key pair.

Implementation of

ISeed.keyPair


generateSeedFromPath

generateSeedFromPath(path): ISeed

Generate a new seed from the path.

Parameters

NameTypeDescription
pathBip32PathThe path to generate the seed for.

Returns

ISeed

The generated seed.

Implementation of

ISeed.generateSeedFromPath


toBytes

toBytes(): Uint8Array

Return the key as bytes.

Returns

Uint8Array

The key as bytes.

Implementation of

ISeed.toBytes