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
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet
Assembly: Libplanet.dll
Syntax
public static class AddressExtensions

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
In This Article
Back to top Copyright © 2018–2021 Planetarium