Classes
Methods
(static) from(options, networknullable) → {HDPrivateKey|HDPublicKey}
Generate an hdkey from any number of options.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | Mnemonic | Buffer | mnemonic, mnemonic options, seed, or base58 key. |
|
network |
Network | NetworkType |
<nullable> |
Returns:
- Type
- HDPrivateKey | HDPublicKey
(static) fromBase58(xkey, networknullable) → {HDPrivateKey|HDPublicKey}
Instantiate an HD key (public or private) from an base58 string.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
xkey |
Base58String | ||
network |
Network |
<nullable> |
Returns:
- Type
- HDPrivateKey | HDPublicKey
(static) fromJSON(json, networknullable) → {HDPrivateKey|HDPublicKey}
Instantiate an HD key from a jsonified key object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
json |
Object | The jsonified transaction object. |
|
network |
Network |
<nullable> |
Returns:
- Type
- HDPrivateKey | HDPublicKey
(static) fromMnemonic(mnemonic) → {HDPrivateKey}
Instantiate an hd private key from a mnemonic.
Parameters:
Name | Type | Description |
---|---|---|
mnemonic |
Mnemonic | Object |
Returns:
- Type
- HDPrivateKey
(static) fromRaw(data, networknullable) → {HDPrivateKey|HDPublicKey}
Instantiate an HD key from serialized data.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | ||
network |
Network |
<nullable> |
Returns:
- Type
- HDPrivateKey | HDPublicKey
(static) fromSeed(options) → {HDPrivateKey}
Generate an HDPrivateKey from a seed.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Mnemonic | Buffer | seed, mnemonic, mnemonic options. |
Returns:
- Type
- HDPrivateKey
(static) generate(options) → {HDPrivateKey}
Generate an HDPrivateKey.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Returns:
- Type
- HDPrivateKey
(static) isBase58(data, networknullable) → {Boolean}
Test whether an object is in the form of a base58 hd key.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
String | ||
network |
Network |
<nullable> |
Returns:
- Type
- Boolean
(static) isHD(obj) → {Boolean}
Test whether an object is an HD key.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
Returns:
- Type
- Boolean
(static) isPrivate(obj) → {Boolean}
Test whether an object is an HD private key.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
Returns:
- Type
- Boolean
(static) isPublic(obj) → {Boolean}
Test whether an object is an HD public key.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
Returns:
- Type
- Boolean
(static) isRaw(data, networknullable) → {NetworkType}
Test whether an object is in the form of a serialized hd key.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | ||
network |
Network |
<nullable> |
Returns:
- Type
- NetworkType