public class WeightedMultiSigOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_COUNT_WEIGHTED_PUBLIC_KEY |
Constructor and Description |
---|
WeightedMultiSigOptions()
Creates a empty WeightedMultiSIgOptions instance
This instance used when setting AccountKeyPublic to AccountKeyRoleBased component.
|
WeightedMultiSigOptions(java.math.BigInteger threshold,
java.util.List<java.math.BigInteger> weights)
Creates a WeightedMultiSigOptions instance.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<WeightedMultiSigOptions> |
getDefaultOptionsForRoleBased(java.util.List<java.lang.String[]> roleBasedPublicKeys)
Creates a List that has WeightedMultiSigOptions instance with default value.(threshold, weight has 1)
|
static WeightedMultiSigOptions |
getDefaultOptionsForWeightedMultiSig(java.lang.String[] publicKeyArr)
Create a WeightedMultiSigOptions instance with default value.(threshold, weight has 1)
|
java.math.BigInteger |
getThreshold()
Getter function for threshold
|
java.util.List<java.math.BigInteger> |
getWeights()
Getter function for list of weight
|
boolean |
isEmpty() |
boolean |
isValidateOptions(java.math.BigInteger threshold,
java.util.List<java.math.BigInteger> weights)
Before creating an instance, check whether the passed option is valid.
|
public static final int MAX_COUNT_WEIGHTED_PUBLIC_KEY
public WeightedMultiSigOptions()
public WeightedMultiSigOptions(java.math.BigInteger threshold, java.util.List<java.math.BigInteger> weights)
threshold
- a thresholdweights
- a List contains weight value of keypublic static WeightedMultiSigOptions getDefaultOptionsForWeightedMultiSig(java.lang.String[] publicKeyArr)
publicKeyArr
- public key arraypublic static java.util.List<WeightedMultiSigOptions> getDefaultOptionsForRoleBased(java.util.List<java.lang.String[]> roleBasedPublicKeys)
roleBasedPublicKeys
- Public key list instance for using AccountKeyRolebased.public boolean isValidateOptions(java.math.BigInteger threshold, java.util.List<java.math.BigInteger> weights)
threshold
- a thresholdweights
- public boolean isEmpty()
public java.math.BigInteger getThreshold()
public java.util.List<java.math.BigInteger> getWeights()