Class Account


  • public class Account
    extends java.lang.Object
    Representing an Account which includes information for account update
    • Constructor Summary

      Constructors 
      Constructor Description
      Account​(java.lang.String address, IAccountKey accountKey)
      Creates an Account instance
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Account create​(java.lang.String address, java.lang.String publicKey)
      Create an Account instance that contains the AccountKeyPublic instance
      static Account create​(java.lang.String address, java.lang.String[] publicKeys)
      Create an Account instance that contains the AccountKeyWeightedMultiSig instance This method set 1 to WeightedMultiSigOptions values(threshold, weights)
      static Account create​(java.lang.String address, java.lang.String[] publicKeys, WeightedMultiSigOptions options)
      Create an Account instance that contains AccountKeyWeightedMultiSig instance
      static Account create​(java.lang.String address, java.util.List<java.lang.String[]> publicKeyList)
      Create an Account instance that contains AccountKeyRoleBased instance This method set 1 to WeightedMultiSigOptions values(threshold, weights)
      static Account create​(java.lang.String address, java.util.List<java.lang.String[]> publicKeyList, java.util.List<WeightedMultiSigOptions> optionsList)
      Create an Account instance that contains AccountKeyRoleBased instance
      static Account createFromRLPEncoding​(java.lang.String address, java.lang.String rlpEncodedKey)
      Create an Account instance from RLP-encoded account key
      static Account createWithAccountKeyFail​(java.lang.String address)
      Create an Account instance which has AccountKeyFail as an accountKey
      static Account createWithAccountKeyLegacy​(java.lang.String address)
      Create an Account instance which has AccountKeyLegacy as an accountKey
      static Account createWithAccountKeyPublic​(java.lang.String address, java.lang.String publicKey)
      Creates an Account instance which has AccountKeyPublic as an accountKey
      static Account createWithAccountKeyRoleBased​(java.lang.String address, java.util.List<java.lang.String[]> roleBasedPublicKey)
      Create an Account instance which has AccountKeyRoleBased as an accountKey This method set 1 to WeightedMultiSigOptions values(threshold, weights)
      static Account createWithAccountKeyRoleBased​(java.lang.String address, java.util.List<java.lang.String[]> roleBasedPublicKey, java.util.List<WeightedMultiSigOptions> optionsList)
      Create an Account instance which has AccountKeyRoleBased as an accountKey
      static Account createWithAccountKeyWeightedMultiSig​(java.lang.String address, java.lang.String[] publicKeys)
      Create an Account instance which has AccountKeyWeightedMultiSig as an accountKey This method set 1 to WeightedMultiSigOptions values(threshold, weights)
      static Account createWithAccountKeyWeightedMultiSig​(java.lang.String address, java.lang.String[] publicKeys, WeightedMultiSigOptions options)
      Create an Account instance which has AccountKeyWeightedMultiSig as an accountKey
      IAccountKey getAccountKey()
      Getter function for accountKey
      java.lang.String getAddress()
      Getter function for address
      java.lang.String getRLPEncodingAccountKey()
      Returns RLP-encoded accountKey string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Account

        public Account​(java.lang.String address,
                       IAccountKey accountKey)
        Creates an Account instance
        Parameters:
        address - The address of Account
        accountKey - The accountKey of Account
    • Method Detail

      • create

        public static Account create​(java.lang.String address,
                                     java.lang.String publicKey)
        Create an Account instance that contains the AccountKeyPublic instance
        Parameters:
        address - The address of Account
        publicKey - public key
        Returns:
        Account
      • create

        public static Account create​(java.lang.String address,
                                     java.lang.String[] publicKeys)
        Create an Account instance that contains the AccountKeyWeightedMultiSig instance This method set 1 to WeightedMultiSigOptions values(threshold, weights)
        Parameters:
        address - address of Account
        publicKeys - public key array
        Returns:
        Account
      • create

        public static Account create​(java.lang.String address,
                                     java.lang.String[] publicKeys,
                                     WeightedMultiSigOptions options)
        Create an Account instance that contains AccountKeyWeightedMultiSig instance
        Parameters:
        address - address of Account
        publicKeys - public key array
        options - WeightedMultiSigOptions
        Returns:
        Account
      • create

        public static Account create​(java.lang.String address,
                                     java.util.List<java.lang.String[]> publicKeyList)
        Create an Account instance that contains AccountKeyRoleBased instance This method set 1 to WeightedMultiSigOptions values(threshold, weights)
        Parameters:
        address - address of Account
        publicKeyList - List of public key array
        Returns:
        Account
      • create

        public static Account create​(java.lang.String address,
                                     java.util.List<java.lang.String[]> publicKeyList,
                                     java.util.List<WeightedMultiSigOptions> optionsList)
        Create an Account instance that contains AccountKeyRoleBased instance
        Parameters:
        address - address of Account
        publicKeyList - List of public key array
        optionsList - List of WeightedMultiSigOptions
        Returns:
        Account
      • createFromRLPEncoding

        public static Account createFromRLPEncoding​(java.lang.String address,
                                                    java.lang.String rlpEncodedKey)
        Create an Account instance from RLP-encoded account key
        Parameters:
        address - address of Account
        rlpEncodedKey - RLP-encoded account key string
        Returns:
        Account
      • createWithAccountKeyLegacy

        public static Account createWithAccountKeyLegacy​(java.lang.String address)
        Create an Account instance which has AccountKeyLegacy as an accountKey
        Parameters:
        address - address of Account
        Returns:
        Account
      • createWithAccountKeyFail

        public static Account createWithAccountKeyFail​(java.lang.String address)
        Create an Account instance which has AccountKeyFail as an accountKey
        Parameters:
        address - address of Account
        Returns:
        Account
      • createWithAccountKeyPublic

        public static Account createWithAccountKeyPublic​(java.lang.String address,
                                                         java.lang.String publicKey)
        Creates an Account instance which has AccountKeyPublic as an accountKey
        Parameters:
        address - address of Account
        publicKey - public key
        Returns:
        Account
      • createWithAccountKeyWeightedMultiSig

        public static Account createWithAccountKeyWeightedMultiSig​(java.lang.String address,
                                                                   java.lang.String[] publicKeys)
        Create an Account instance which has AccountKeyWeightedMultiSig as an accountKey This method set 1 to WeightedMultiSigOptions values(threshold, weights)
        Parameters:
        address - address of Account
        publicKeys - array of public key
        Returns:
        Account
      • createWithAccountKeyWeightedMultiSig

        public static Account createWithAccountKeyWeightedMultiSig​(java.lang.String address,
                                                                   java.lang.String[] publicKeys,
                                                                   WeightedMultiSigOptions options)
        Create an Account instance which has AccountKeyWeightedMultiSig as an accountKey
        Parameters:
        address - address of Account
        publicKeys - List of public key array
        options - List of WeightedMultiSigOptions
        Returns:
        Account
      • createWithAccountKeyRoleBased

        public static Account createWithAccountKeyRoleBased​(java.lang.String address,
                                                            java.util.List<java.lang.String[]> roleBasedPublicKey)
        Create an Account instance which has AccountKeyRoleBased as an accountKey This method set 1 to WeightedMultiSigOptions values(threshold, weights)
        Parameters:
        address - address of Account
        roleBasedPublicKey - List of public key array
        Returns:
        Account
      • createWithAccountKeyRoleBased

        public static Account createWithAccountKeyRoleBased​(java.lang.String address,
                                                            java.util.List<java.lang.String[]> roleBasedPublicKey,
                                                            java.util.List<WeightedMultiSigOptions> optionsList)
        Create an Account instance which has AccountKeyRoleBased as an accountKey
        Parameters:
        address - address of Account
        roleBasedPublicKey - List of public key array
        optionsList - List of WeightedMultiSigOptions
        Returns:
        Account
      • getRLPEncodingAccountKey

        public java.lang.String getRLPEncodingAccountKey()
        Returns RLP-encoded accountKey string
        Returns:
        String
      • getAddress

        public java.lang.String getAddress()
        Getter function for address
        Returns:
        address
      • getAccountKey

        public IAccountKey getAccountKey()
        Getter function for accountKey
        Returns:
        accountKey