Show / Hide Table of Contents

Class AddressExtensions

This extension class enables some convenient methods (sugar for the most part) to deal with Address.

Inheritance
Object
AddressExtensions
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
public static class AddressExtensions : object

Methods

| Improve this Doc View Source

ToAddress(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 privateKey.

| Improve this Doc View Source

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

A PublicKey to derive the corresponding Address from.

Returns
Type Description
Address

The corresponding Address derived from publicKey.

See Also
Address(PublicKey)

See Also

Address
  • Improve this Doc
  • View Source
Back to top Copyright © 2019–2020 Planetarium