Class: ExtendedPrivateKey
Extends
Serializable
Constructors
new ExtendedPrivateKey()
new ExtendedPrivateKey(
key
,chainCode
):ExtendedPrivateKey
Creates an ExtendedPrivateKey from a private key and chain code.
Parameters
• key: PrivateKey
• chainCode: Uint8Array
Returns
Overrides
Serializable.constructor
Defined in
@nimiq/core/lib/index.d.ts:120
Properties
CHAIN_CODE_SIZE
static
CHAIN_CODE_SIZE:number
Defined in
@nimiq/core/lib/index.d.ts:114
Accessors
chainCode
Get Signature
get chainCode():
Uint8Array
Returns the chain code of this ExtendedPrivateKey.
Returns
Uint8Array
Defined in
@nimiq/core/lib/index.d.ts:168
privateKey
Get Signature
get privateKey():
PrivateKey
Returns the private key of this ExtendedPrivateKey.
Returns
PrivateKey
Defined in
@nimiq/core/lib/index.d.ts:164
serializedSize
Get Signature
get serializedSize():
number
Returns the serialized size of this ExtendedPrivateKey.
Returns
number
Defined in
@nimiq/core/lib/index.d.ts:156
Methods
compare()
compare(
o
):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.
Parameters
• o: Serializable
Returns
number
Inherited from
Serializable.compare
Defined in
@nimiq/core/lib/index.d.ts:97
derive()
derive(
index
):ExtendedPrivateKey
Derives a child ExtendedPrivateKey from the current key at the provided index.
Parameters
• index: number
Returns
Defined in
@nimiq/core/lib/index.d.ts:128
derivePath()
derivePath(
path
):ExtendedPrivateKey
Derives a child ExtendedPrivateKey from the current key at the provided path.
Parameters
• path: string
Returns
Defined in
@nimiq/core/lib/index.d.ts:136
equals()
equals(
o
):boolean
Checks for equality with another ExtendedPrivateKey.
Parameters
• o: unknown
Returns
boolean
Overrides
Serializable.equals
Defined in
@nimiq/core/lib/index.d.ts:160
serialize()
serialize(
buf
?):SerialBuffer
Serializes the ExtendedPrivateKey to a byte array.
Parameters
• buf?: SerialBuffer
Returns
Overrides
Serializable.serialize
Defined in
@nimiq/core/lib/index.d.ts:152
toAddress()
toAddress():
Address
Returns the address related to this ExtendedPrivateKey.
Returns
Address
Defined in
@nimiq/core/lib/index.d.ts:172
toBase64()
toBase64():
string
Formats the object into a base64 string.
Returns
string
Inherited from
Serializable.toBase64
Defined in
@nimiq/core/lib/index.d.ts:106
toHex()
toHex():
string
Formats the object into a hex string.
Returns
string
Inherited from
Serializable.toHex
Defined in
@nimiq/core/lib/index.d.ts:110
toString()
toString():
string
Formats the object into a hex string.
Returns
string
Inherited from
Serializable.toString
Defined in
@nimiq/core/lib/index.d.ts:102
derivePathFromSeed()
static
derivePathFromSeed(path
,seed
):ExtendedPrivateKey
Derives an ExtendedPrivateKey from a seed and a derivation path.
Parameters
• path: string
• seed: Uint8Array
Returns
Defined in
@nimiq/core/lib/index.d.ts:140
deserialize()
static
deserialize(buf
):ExtendedPrivateKey
Deserializes an ExtendedPrivateKey from a byte array.
Parameters
• buf: SerialBuffer
Returns
Defined in
@nimiq/core/lib/index.d.ts:144
fromHex()
static
fromHex(hex
):ExtendedPrivateKey
Deserializes an ExtendedPrivateKey from a hex string.
Parameters
• hex: string
Returns
Defined in
@nimiq/core/lib/index.d.ts:148
generateMasterKey()
static
generateMasterKey(seed
):ExtendedPrivateKey
Generates the master ExtendedPrivateKey from a seed.
Parameters
• seed: Uint8Array
Returns
Defined in
@nimiq/core/lib/index.d.ts:124
isValidPath()
static
isValidPath(path
):boolean
Tests if a HD derivation path is valid.
Parameters
• path: string
Returns
boolean
Defined in
@nimiq/core/lib/index.d.ts:132