public class PublicKey extends Object implements ByteTransformable
| Constructor and Description |
|---|
PublicKey(eu.bittrade.crypto.core.ECKey publicKey)
Create a new public key by providing a ECKey object containing the public
key.
|
PublicKey(String address)
Create a new public key by providing an address as String.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object otherPublicKey) |
String |
getAddressFromPublicKey()
Recreate the address from the public key.
|
eu.bittrade.crypto.core.ECKey |
getPublicKey()
Get the public key stored in this object.
|
int |
hashCode() |
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
public PublicKey(String address)
address - The address in its String representation.
Example:
STM5jYVokmZHdEpwo5oCG3ES2Ca4VYzy6tM8pWWkGdgVnwo2mFLFq
eu.bittrade.crypto.core.AddressFormatException - If the input is not base 58 or the checksum does not
validate.public PublicKey(eu.bittrade.crypto.core.ECKey publicKey)
publicKey - The public key.public String getAddressFromPublicKey()
public eu.bittrade.crypto.core.ECKey getPublicKey()
public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformabletoByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.Copyright © 2019. All rights reserved.