Helios API/ API Reference/ Classes/

RootPrivateKey

Implements

Implements

Index

Constructors

constructor

new RootPrivateKey(entropy)

Parameters

NameType
entropynumber[]

Accessors

bytes

get bytes(): number[]

Returns

number[]

entropy

get entropy(): number[]

Returns

number[]

Methods

derive

derive(i): Bip32PrivateKey

Parameters

NameTypeDescription
inumberchildIndex

Returns

Bip32PrivateKey

derivePath

derivePath(path): Bip32PrivateKey

Parameters

NameType
pathnumber[]

Returns

Bip32PrivateKey

derivePubKey

derivePubKey(): PubKey

Returns

PubKey

Implementation of

PrivateKey.derivePubKey

deriveSpendingKey

deriveSpendingKey(accountIndex?, i?): Bip32PrivateKey

Parameters

NameType
accountIndex?number
i?number

Returns

Bip32PrivateKey

deriveSpendingRootKey

deriveSpendingRootKey(accountIndex?): Bip32PrivateKey

Parameters

NameType
accountIndex?number

Returns

Bip32PrivateKey

deriveStakingKey

deriveStakingKey(accountIndex?, i?): Bip32PrivateKey

Parameters

NameType
accountIndex?number
i?number

Returns

Bip32PrivateKey

deriveStakingRootKey

deriveStakingRootKey(accountIndex): Bip32PrivateKey

Parameters

NameType
accountIndexnumber

Returns

Bip32PrivateKey

sign

sign(message): Signature

Parameters

NameType
messagenumber[]

Returns

Signature

Implementation of

PrivateKey.sign

toPhrase

toPhrase(dict?): string[]

Parameters

NameType
dict?string[]

Returns

string[]

fromPhrase

Static fromPhrase(phrase, dict?): RootPrivateKey

Parameters

NameType
phrasestring[]
dict?string[]

Returns

RootPrivateKey

isValidPhrase

Static isValidPhrase(phrase, dict?): boolean

Parameters

NameType
phrasestring[]
dict?string[]

Returns

boolean