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

Latest commit

 

History

History
128 lines (71 loc) · 1.78 KB

Bip32Path.md

File metadata and controls

128 lines (71 loc) · 1.78 KB

Class: Bip32Path

Class to help with bip32 paths.

Table of contents

Constructors

Methods

Constructors

constructor

new Bip32Path(initialPath?)

Create a new instance of Bip32Path.

Parameters

Name Type Description
initialPath? string Initial path to create.

Methods

fromPath

Static fromPath(bip32Path): Bip32Path

Construct a new path by cloning an existing one.

Parameters

Name Type Description
bip32Path Bip32Path The path to clone.

Returns

Bip32Path

A new instance of Bip32Path.


toString

toString(): string

Converts the path to a string.

Returns

string

The path as a string.


push

push(index): void

Push a new index on to the path.

Parameters

Name Type Description
index number The index to add to the path.

Returns

void


pushHardened

pushHardened(index): void

Push a new hardened index on to the path.

Parameters

Name Type Description
index number The index to add to the path.

Returns

void


pop

pop(): void

Pop an index from the path.

Returns

void


numberSegments

numberSegments(): number[]

Get the segments.

Returns

number[]

The segments as numbers.