Skip to main content

Class: Slip0010

Class to help with slip0010 key derivation https://github.com/satoshilabs/slips/blob/master/slip-0010.md.

Table of contents

Methods

Constructors

Methods

getMasterKeyFromSeed

Static getMasterKeyFromSeed(seed): Object

Get the master key from the seed.

Parameters

NameTypeDescription
seedUint8ArrayThe seed to generate the master key from.

Returns

Object

The key and chain code.


derivePath

Static derivePath(seed, path): Object

Derive a key from the path.

Parameters

NameTypeDescription
seedUint8ArrayThe seed.
pathBip32PathThe path.

Returns

Object

The key and chain code.


getPublicKey

Static getPublicKey(privateKey, withZeroByte?): Uint8Array

Get the public key from the private key.

Parameters

NameTypeDefault valueDescription
privateKeyUint8ArrayundefinedThe private key.
withZeroBytebooleantrueInclude a zero bute prefix.

Returns

Uint8Array

The public key.

Constructors

constructor

new Slip0010()