Class AccountKeyWeightedMultiSig

  • All Implemented Interfaces:
    IAccountKey

    public class AccountKeyWeightedMultiSig
    extends java.lang.Object
    implements IAccountKey
    AccountKeyWeightedMultiSig is an account key type containing a threshold and WeightedPublicKeys. WeightedPublicKeys contains a slice of {weight and key}. To be a valid tx for an account associated with AccountKeyWeightedMultiSig, the weighted sum of signed public keys should be larger than the threshold.
    • Method Detail

      • decode

        public static AccountKeyWeightedMultiSig decode​(java.lang.String rlpEncodedKey)
        Decodes a RLP-encoded AccountKeyWeightedMultiSig string
        Parameters:
        rlpEncodedKey - RLP-encoded AccountKeyWeightedMultiSig string.
        Returns:
        AccountKeyWeightedMultiSig
      • decode

        public static AccountKeyWeightedMultiSig decode​(byte[] rlpEncodedKey)
        Decodes a RLP-encoded AccountKeyWeightedMultiSig byte array.
        Parameters:
        rlpEncodedKey - RLP-encoded AccountKeyWeightedMultiSig byte array.
        Returns:
        AccountKeyWeightedMultiSig
      • fromPublicKeysAndOptions

        public static AccountKeyWeightedMultiSig fromPublicKeysAndOptions​(java.lang.String[] publicKeyArr,
                                                                          WeightedMultiSigOptions options)
        Create AccountKeyWeightedMultiSig instance form public Key array and WeightedMultiSigOption
        Parameters:
        publicKeyArr - Array of public key string
        options - An options which defines threshold and weight.
        Returns:
        AccountKeyWeightedMultiSig
      • getRLPEncoding

        public java.lang.String getRLPEncoding()
        Encodes a AccountKeyWeightedMultiSig Object by RLP-encoding method.
        Specified by:
        getRLPEncoding in interface IAccountKey
        Returns:
        RLP-encoded AccountKeyWeightedMultiSig String
      • getThreshold

        public java.math.BigInteger getThreshold()
        Getter function for threshold
        Returns:
        threshold
      • getWeightedPublicKeys

        public java.util.List<WeightedPublicKey> getWeightedPublicKeys()
        Getter function for List of WeightedOfPublicKey
        Returns:
        List of WeightedOfPublicKey
      • getType

        public static java.lang.String getType()
        Returns an AccountKeyWeightedMultiSig's type attribute
        Returns:
        AccountKeyWeightedMultiSig's type attribute