public class Address extends Base<Codec> implements Codec
A wrapper around an AccountId and/or AccountIndex that is encoded with a prefix. Since we are dealing with underlying publicKeys (or shorter encoded addresses), we extend from Base with an AccountId/AccountIndex wrapper. Basically the Address is encoded as [ <prefix-byte>, ...publicKey/...bytes ]
as per spec
Modifier and Type | Field and Description |
---|---|
static byte[] |
ACCOUNT_ID_PREFIX |
Constructor and Description |
---|
Address(java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
boolean |
eq(java.lang.Object other)
Compares the value of the input to see if there is a match
|
int |
getEncodedLength()
The length of the value when encoded as a Uint8Array
|
int |
getRawLength()
The length of the raw value, either AccountIndex or AccountId
|
boolean |
isEmpty()
Checks if the value is an empty value
|
java.lang.String |
toHex()
Returns a hex string representation of the value
|
java.lang.Object |
toJson()
Converts the Object to JSON, typically used for RPC transfers
|
java.lang.String |
toString()
Returns the string representation of the value
|
byte[] |
toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConstructorCodec, toU8a
public int getRawLength()
The length of the raw value, either AccountIndex or AccountId
public int getEncodedLength()
The length of the value when encoded as a Uint8Array
getEncodedLength
in interface Codec
public boolean isEmpty()
Checks if the value is an empty value
public boolean eq(java.lang.Object other)
Compares the value of the input to see if there is a match
public java.lang.String toHex()
Returns a hex string representation of the value
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers
public java.lang.String toString()
Returns the string representation of the value
toString
in class java.lang.Object