new WalletKey(options)
Represents a key ring which amounts to an address.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
Methods
(static) fromHD(account, key, branch, index) → {WalletKey}
Instantiate a wallet key from hd key.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
key |
HDPrivateKey | HDPublicKey | |
branch |
Number | |
index |
Number |
- Source:
Returns:
- Type
- WalletKey
(static) fromImport(account, data) → {WalletKey}
Instantiate a wallet key from imported data.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
data |
Buffer |
- Source:
Returns:
- Type
- WalletKey
(static) fromJSON(json) → {WalletKey}
Instantiate an WalletKey from a jsonified transaction object.
Parameters:
Name | Type | Description |
---|---|---|
json |
Object | The jsonified transaction object. |
- Source:
Returns:
- Type
- WalletKey
(static) fromKey(publicKey, network) → {WalletKey}
Instantiate wallet key from a public key.
Parameters:
Name | Type | Description |
---|---|---|
publicKey |
Buffer | |
network |
NetworkType | Network |
- Source:
Returns:
- Type
- WalletKey
(static) fromOptions(options) → {WalletKey}
Instantiate key ring from options.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
Returns:
- Type
- WalletKey
(static) fromPrivate(key, compressednullable, network) → {WalletKey}
Instantiate wallet key from a private key.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
Buffer | ||
compressed |
Boolean |
<nullable> |
|
network |
NetworkType | Network |
- Source:
Returns:
- Type
- WalletKey
(static) fromPublic(publicKey, network) → {WalletKey}
Instantiate wallet key from a public key.
Parameters:
Name | Type | Description |
---|---|---|
publicKey |
Buffer | |
network |
NetworkType | Network |
- Source:
Returns:
- Type
- WalletKey
(static) fromRaw(data) → {WalletKey}
Instantiate a wallet key from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- WalletKey
(static) fromRing(account, ring) → {WalletKey}
Instantiate a wallet key from regular key.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
ring |
KeyRing |
- Source:
Returns:
- Type
- WalletKey
(static) fromScript(key, script, network) → {WalletKey}
Instantiate wallet key from script.
Parameters:
Name | Type | Description |
---|---|---|
key |
Buffer | |
script |
Script | |
network |
NetworkType | Network |
- Source:
Returns:
- Type
- WalletKey
(static) fromSecret(secret) → {WalletKey}
Instantiate a wallet key from a serialized CBitcoinSecret.
Parameters:
Name | Type | Description |
---|---|---|
secret |
Base58String |
- Source:
Returns:
- Type
- WalletKey
(static) generate(networknullable) → {WalletKey}
Generate a wallet key.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
network |
Network | NetworkType |
<nullable> |
- Source:
Returns:
- Type
- WalletKey
(static) isWalletKey(obj) → {Boolean}
Test whether an object is a WalletKey.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
- Source:
Returns:
- Type
- Boolean
(private) fromHD(account, key, branch, index) → {WalletKey}
Inject properties from hd key.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
key |
HDPrivateKey | HDPublicKey | |
branch |
Number | |
index |
Number |
- Source:
Returns:
- Type
- WalletKey
(private) fromImport(account, data) → {WalletKey}
Inject properties from imported data.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
data |
Buffer |
- Source:
Returns:
- Type
- WalletKey
(private) fromRing(account, ring) → {WalletKey}
Inject properties from key.
Parameters:
Name | Type | Description |
---|---|---|
account |
Account | |
ring |
KeyRing |
- Source:
Returns:
- Type
- WalletKey
toJSON() → {Object}
Convert an WalletKey to a more json-friendly object.
- Source:
Returns:
- Type
- Object
toPath() → {Path}
Convert wallet key to a path.
- Source:
Returns:
- Type
- Path