Class AddressExtensions
This extension class enables some convenient methods (sugar for the most part) to deal with Address.
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
public static class AddressExtensions : object
Methods
| Improve this Doc View SourceToAddress(PrivateKey)
Derives the corresponding Address from a PrivateKey.
This enables a code like privateKey.ToAddress()
instead
of new Address(privateKey.PublicKey)
.
Declaration
public static Address ToAddress(this PrivateKey privateKey)
Parameters
Type | Name | Description |
---|---|---|
PrivateKey | privateKey | A PrivateKey to derive the corresponding Address from. |
Returns
Type | Description |
---|---|
Address | The corresponding Address derived from
|
ToAddress(PublicKey)
Derives the corresponding Address from a PublicKey.
This enables a code like publicKey.ToAddress()
instead
of new Address(publicKey)
.
Declaration
public static Address ToAddress(this PublicKey publicKey)
Parameters
Type | Name | Description |
---|---|---|
PublicKey | publicKey |
Returns
Type | Description |
---|---|
Address | The corresponding Address derived from
|