Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Latest commit

 

History

History
84 lines (51 loc) · 1.55 KB

Slip0010.md

File metadata and controls

84 lines (51 loc) · 1.55 KB

Class: Slip0010

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

Table of contents

Methods

Methods

getMasterKeyFromSeed

Static getMasterKeyFromSeed(seed): Object

Get the master key from the seed.

Parameters

Name Type Description
seed Uint8Array The seed to generate the master key from.

Returns

Object

The key and chain code.

Name Type
privateKey Uint8Array
chainCode Uint8Array

derivePath

Static derivePath(seed, path): Object

Derive a key from the path.

Parameters

Name Type Description
seed Uint8Array The seed.
path Bip32Path The path.

Returns

Object

The key and chain code.

Name Type
privateKey Uint8Array
chainCode Uint8Array

getPublicKey

Static getPublicKey(privateKey, withZeroByte?): Uint8Array

Get the public key from the private key.

Parameters

Name Type Default value Description
privateKey Uint8Array undefined The private key.
withZeroByte boolean true Include a zero bute prefix.

Returns

Uint8Array

The public key.