@exodus/key-utils
Version: 0.0.0
Classes
Functions
DerivationPath
class
Constructor
constructor
Parameters:
derivationPath: number[]
__namedParameters (optional): DerivationPathOptions
Returns:
DerivationPathMethods
at
at(index: number, __namedParameters?: any): number
Parameters:
index: number
__namedParameters (optional): any
Returns:
numberextend
replaceAtIndex
Parameters:
index: number
value: string | number
Returns:
DerivationPathtoJSON
toJSON(): string
Returns:
stringtoPathArray
toPathArray(): number[]
Returns:
number[]toString
toString(): string
Returns:
stringfrom
Parameters:
pathLike: PathLike
__namedParameters (optional): DerivationPathOptions
Returns:
DerivationPathAccessors
[toStringTag]
PathLike
type
assertValidDerivationPath
variable
Type
const assertValidDerivationPath: (path: unknown, requireAllHardened: boolean) => voidSignature
__type(path: unknown, requireAllHardened?: boolean): void
Parameters:
path: unknown
requireAllHardened (optional): boolean
Returns:
voidBIP32_PURPOSES
variable
Type
number[]
buildDerivationPath
variable
Type
const buildDerivationPath: ({ derivationAlgorithm, purpose, bip44, accountIndex, chainIndex, addressIndex, }: BuildDerivationPathParams) => stringSignature
__type({ derivationAlgorithm, purpose, bip44, accountIndex, chainIndex, addressIndex, }: BuildDerivationPathParams): string
Parameters:
{ derivationAlgorithm, purpose, bip44, accountIndex, chainIndex, addressIndex, }: BuildDerivationPathParams
Returns:
stringDEFAULT_ADDRESS_INDEX
variable
Type
0
DEFAULT_CHAIN_INDEX
variable
Type
0
DEFAULT_PURPOSE
variable
Type
44
isValidDerivationPath
variable
Type
const isValidDerivationPath: (path: unknown, requireAllHardened: boolean) => booleanSignature
__type(path: unknown, requireAllHardened?: boolean): boolean
Parameters:
path: unknown
requireAllHardened (optional): boolean
Returns:
booleanparseDerivationPath
variable
Type
const parseDerivationPath: (path: string) => { ... }Signature
__type(path: string): any
Parameters:
path: string
Returns:
anyProperties
accountIndex
number
addressIndex
number | undefined
chainIndex
number | undefined
coinIndex
number
purpose
number
unhardenDerivationIndex
variable
Type
const unhardenDerivationIndex: (hardenedIndex: number) => numberSignature
__type(hardenedIndex: number): number
Parameters:
hardenedIndex: number
Returns:
numbercreateGetKeyIdentifier
function
Signature
createGetKeyIdentifier(__namedParameters: CreateGetKeyIdentifierOptions): any
Parameters:
__namedParameters: CreateGetKeyIdentifierOptions
Returns:
anyDerivationPath
class
Adapted bip32-path with stricter input validation and more flexible input parsing
Constructor
constructor
Parameters:
derivationPath: number[]
__namedParameters: DerivationPathOptions
Returns:
DerivationPathMethods
at
at(index: number, __namedParameters: any): number
Parameters:
index: number
__namedParameters: any
Returns:
numberextend
extend(pathLike: PathLike): DerivationPath
Returns a new derivation path extended by the given indices
Parameters:
pathLike: PathLike
Returns:
DerivationPathreplaceAtIndex
Parameters:
index: number
value: string | number
Returns:
DerivationPathtoJSON
toJSON(): string
Returns:
stringtoPathArray
toPathArray(): number[]
Returns:
number[]toString
toString(): string
Returns:
stringfrom
Creates a DerivationPath instance from a string path or array of path indices
Parameters:
pathLike: PathLike
__namedParameters: DerivationPathOptions
Returns:
DerivationPathAccessors
[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:
voidbuildDerivationPath
function
Signature
buildDerivationPath(__namedParameters: BuildDerivationPathParams): string
Parameters:
__namedParameters: BuildDerivationPathParams
Returns:
stringcreateGetKeyIdentifier
function
Signature
createGetKeyIdentifier(__namedParameters: CreateGetKeyIdentifierOptions): any
Factory to create a getKeyIdentifier function
Parameters:
__namedParameters: CreateGetKeyIdentifierOptions
Returns:
anyisValidDerivationPath
function
Signature
isValidDerivationPath(path: unknown, requireAllHardened: boolean): boolean
Parameters:
path: unknown
requireAllHardened: boolean
Returns:
booleanparseDerivationPath
function
Signature
parseDerivationPath(path: string): any
Parameters:
path: string
Returns:
anyunhardenDerivationIndex
function
Signature
unhardenDerivationIndex(hardenedIndex: number): number
Parameters:
hardenedIndex: number
