public class WeightedPublicKey
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WeightedPublicKey.WeightedPublicKeyDeserializer |
static class |
WeightedPublicKey.WeightedPublicKeySerializer |
Modifier and Type | Field and Description |
---|---|
static int |
OFFSET_PUBLIC_KEY |
static int |
OFFSET_WEIGHT |
Constructor and Description |
---|
WeightedPublicKey(java.lang.String publicKey,
java.math.BigInteger weight)
Creates WeightedPublicKey instance
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
encodeToBytes()
Returns an encoded weighted public key string.
|
java.lang.String |
getPublicKey()
Getter function for PublicKey
|
java.math.BigInteger |
getWeight()
Getter function for weight.
|
void |
setPublicKey(java.lang.String publicKey)
Setter function for PublicKey
It allows both compressed and uncompressed format.
|
void |
setWeight(java.math.BigInteger weight)
Setter function for weight
|
public static final int OFFSET_WEIGHT
public static final int OFFSET_PUBLIC_KEY
public WeightedPublicKey(java.lang.String publicKey, java.math.BigInteger weight)
publicKey
- The ECC Public key String.(Compressed or Uncompressed format)weight
- THe weight of Keypublic java.lang.String getPublicKey()
public void setPublicKey(java.lang.String publicKey)
publicKey
- ecc Public keypublic java.math.BigInteger getWeight()
public void setWeight(java.math.BigInteger weight)
weight
- a weightpublic java.lang.String[] encodeToBytes()