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
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.