Classes

ExtendedPrivateKey

Extends

  • Serializable

Constructors

new ExtendedPrivateKey()

new ExtendedPrivateKey(`key`, `chainCode`): [ExtendedPrivateKey](ExtendedPrivateKey)

Creates an ExtendedPrivateKey from a private key and chain code.

ParameterType
FirstUint8Array

Overrides

Serializable.constructor

Properties

CHAIN_CODE_SIZE

`static` CHAIN\_CODE\_SIZE: `number`

Accessors

chainCode

Get Signature

get chainCode(): `Uint8Array`

Returns the chain code of this ExtendedPrivateKey.


privateKey

Get Signature

get privateKey(): `PrivateKey`

Returns the private key of this ExtendedPrivateKey.


serializedSize

Get Signature

get serializedSize(): `number`

Returns the serialized size of this ExtendedPrivateKey.

Methods

compare()

compare(`param14`): `number`

Compares this object to another object.

Returns a negative number if this is smaller than o, a positive number if this is larger than o, and zero if equal.

ParameterType
FirstSerializable

Inherited from

Serializable.compare


derive()

derive(`index`): [ExtendedPrivateKey](ExtendedPrivateKey)

Derives a child ExtendedPrivateKey from the current key at the provided index.

ParameterType
Firstnumber

derivePath()

derivePath(`path`): [ExtendedPrivateKey](ExtendedPrivateKey)

Derives a child ExtendedPrivateKey from the current key at the provided path.

ParameterType
Firststring

equals()

equals(`param13`): `boolean`

Checks for equality with another ExtendedPrivateKey.

ParameterType
Firstunknown

Overrides

Serializable.equals


serialize()

serialize(`buf`?): [SerialBuffer](SerialBuffer)

Serializes the ExtendedPrivateKey to a byte array.

ParameterType
FirstSerialBuffer

Overrides

Serializable.serialize


toAddress()

toAddress(): `Address`

Returns the address related to this ExtendedPrivateKey.


toBase64()

toBase64(): `string`

Formats the object into a base64 string.

Inherited from

Serializable.toBase64


toHex()

toHex(): `string`

Formats the object into a hex string.

Inherited from

Serializable.toHex


toString()

toString(): `string`

Formats the object into a hex string.

Inherited from

Serializable.toString


derivePathFromSeed()

`static` derivePathFromSeed(`path`, `seed`): [ExtendedPrivateKey](ExtendedPrivateKey)

Derives an ExtendedPrivateKey from a seed and a derivation path.

ParameterType
FirstUint8Array

deserialize()

`static` deserialize(`buf`): [ExtendedPrivateKey](ExtendedPrivateKey)

Deserializes an ExtendedPrivateKey from a byte array.

ParameterType
FirstSerialBuffer

fromHex()

`static` fromHex(`hex`): [ExtendedPrivateKey](ExtendedPrivateKey)

Deserializes an ExtendedPrivateKey from a hex string.

ParameterType
Firststring

generateMasterKey()

`static` generateMasterKey(`seed`): [ExtendedPrivateKey](ExtendedPrivateKey)

Generates the master ExtendedPrivateKey from a seed.

ParameterType
FirstUint8Array

isValidPath()

`static` isValidPath(`path`): `boolean`

Tests if a HD derivation path is valid.

ParameterType
Firststring