public class AddressUtils
extends java.lang.Object
| Constructor and Description |
|---|
AddressUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
addressToScriptHash(java.lang.String address)
Transforms the given address into its script hash.
|
static boolean |
isValidAddress(java.lang.String address)
Checks whether the give address is valid or not.
|
static boolean |
isValidAddress(java.lang.String address,
byte addressVersion)
Checks whether the give address is valid or not.
|
static java.lang.String |
scriptHashToAddress(byte[] scriptHash)
Derives the Neo address from the given script hash.
|
static java.lang.String |
scriptHashToAddress(byte[] scriptHash,
byte addressVersion)
Derives the Neo address from the given script hash, also specifying the address version.
|
public static boolean isValidAddress(java.lang.String address)
NeoConstants.DEFAULT_ADDRESS_VERSION.address - The address to be checked.public static boolean isValidAddress(java.lang.String address,
byte addressVersion)
NeoConstants.DEFAULT_ADDRESS_VERSION.address - The address to be checked.addressVersion - The address version.public static byte[] addressToScriptHash(java.lang.String address)
address - The address.public static java.lang.String scriptHashToAddress(byte[] scriptHash)
NeoConstants.DEFAULT_ADDRESS_VERSION.
The script hash needs to be in little-endian order.
scriptHash - The script hash to get the address for.public static java.lang.String scriptHashToAddress(byte[] scriptHash,
byte addressVersion)
scriptHashToAddress(byte[]) if the default address version should be used.
The script hash needs to be in little-endian order.
scriptHash - The script hash to get the address for.