Skip to Content
Hydra@exodus/key-utils

@exodus/key-utils

Version: 0.0.0

Type Aliases

DerivationPath

class
Adapted bip32-path with stricter input validation and more flexible input parsing

Constructor

constructor
DerivationPath(derivationPath: number[], __namedParameters: DerivationPathOptions): DerivationPath

Parameters:

derivationPath: number[]
__namedParameters: DerivationPathOptions

Methods

at
at(index: number, __namedParameters: any): number

Parameters:

index: number
__namedParameters: any

Returns:

number
extend
extend(pathLike: PathLike): DerivationPath
Returns a new derivation path extended by the given indices

Parameters:

pathLike: PathLike
replaceAtIndex
replaceAtIndex(index: number, value: string | number): DerivationPath

Parameters:

index: number
value: string | number
toJSON
toJSON(): string

Returns:

string
toPathArray
toPathArray(): number[]

Returns:

number[]
toString
toString(): string

Returns:

string
from
from(pathLike: PathLike, __namedParameters: DerivationPathOptions): DerivationPath
Creates a DerivationPath instance from a string path or array of path indices

Parameters:

pathLike: PathLike
__namedParameters: DerivationPathOptions

Accessors

[toStringTag]

PathLike

type

BIP32_PURPOSES

variable

Type

number[]

DEFAULT_ADDRESS_INDEX

variable

Type

0

DEFAULT_CHAIN_INDEX

variable

Type

0

DEFAULT_PURPOSE

variable

Type

44

assertValidDerivationPath

function

Signature

assertValidDerivationPath(path: unknown, requireAllHardened: boolean): void

Parameters:

path: unknown
requireAllHardened: boolean

Returns:

void

buildDerivationPath

function

Signature

buildDerivationPath(__namedParameters: BuildDerivationPathParams): string

Parameters:

__namedParameters: BuildDerivationPathParams

Returns:

string

createGetKeyIdentifier

function

Signature

createGetKeyIdentifier(__namedParameters: CreateGetKeyIdentifierOptions): any
Factory to create a getKeyIdentifier function

Parameters:

Returns:

any

isValidDerivationPath

function

Signature

isValidDerivationPath(path: unknown, requireAllHardened: boolean): boolean

Parameters:

path: unknown
requireAllHardened: boolean

Returns:

boolean

parseDerivationPath

function

Signature

parseDerivationPath(path: string): any

Parameters:

path: string

Returns:

any

unhardenDerivationIndex

function

Signature

unhardenDerivationIndex(hardenedIndex: number): number

Parameters:

hardenedIndex: number

Returns:

number

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help