ExtendedPrivateKey
Extends
Serializable
Constructors
new ExtendedPrivateKey()
Creates an ExtendedPrivateKey from a private key and chain code.
Parameter | Type |
---|---|
First | Uint8Array |
Returns |
---|
ExtendedPrivateKey |
Overrides
Serializable.constructor
Properties
CHAIN_CODE_SIZE
Accessors
chainCode
Get Signature
Returns the chain code of this ExtendedPrivateKey.
privateKey
Get Signature
Returns the private key of this ExtendedPrivateKey.
serializedSize
Get Signature
Returns the serialized size of this ExtendedPrivateKey.
Methods
compare()
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.
Parameter | Type |
---|---|
First | Serializable |
Inherited from
Serializable.compare
derive()
Derives a child ExtendedPrivateKey from the current key at the provided index.
Parameter | Type |
---|---|
First | number |
Returns |
---|
ExtendedPrivateKey |
derivePath()
Derives a child ExtendedPrivateKey from the current key at the provided path.
Parameter | Type |
---|---|
First | string |
Returns |
---|
ExtendedPrivateKey |
equals()
Checks for equality with another ExtendedPrivateKey.
Parameter | Type |
---|---|
First | unknown |
Overrides
Serializable.equals
serialize()
Serializes the ExtendedPrivateKey to a byte array.
Parameter | Type |
---|---|
First | SerialBuffer |
Returns |
---|
SerialBuffer |
Overrides
Serializable.serialize
toAddress()
Returns the address related to this ExtendedPrivateKey.
toBase64()
Formats the object into a base64 string.
Inherited from
Serializable.toBase64
toHex()
Formats the object into a hex string.
Inherited from
Serializable.toHex
toString()
Formats the object into a hex string.
Inherited from
Serializable.toString
derivePathFromSeed()
Derives an ExtendedPrivateKey from a seed and a derivation path.
Parameter | Type |
---|---|
First | Uint8Array |
Returns |
---|
ExtendedPrivateKey |
deserialize()
Deserializes an ExtendedPrivateKey from a byte array.
Parameter | Type |
---|---|
First | SerialBuffer |
Returns |
---|
ExtendedPrivateKey |
fromHex()
Deserializes an ExtendedPrivateKey from a hex string.
Parameter | Type |
---|---|
First | string |
Returns |
---|
ExtendedPrivateKey |
generateMasterKey()
Generates the master ExtendedPrivateKey from a seed.
Parameter | Type |
---|---|
First | Uint8Array |
Returns |
---|
ExtendedPrivateKey |
isValidPath()
Tests if a HD derivation path is valid.
Parameter | Type |
---|---|
First | string |