Package com.klaytn.caver.account
Class Account
- java.lang.Object
-
- com.klaytn.caver.account.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 instancestatic 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 instancestatic 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 instancestatic Account
createFromRLPEncoding(java.lang.String address, java.lang.String rlpEncodedKey)
Create an Account instance from RLP-encoded account keystatic Account
createWithAccountKeyFail(java.lang.String address)
Create an Account instance which has AccountKeyFail as an accountKeystatic Account
createWithAccountKeyLegacy(java.lang.String address)
Create an Account instance which has AccountKeyLegacy as an accountKeystatic Account
createWithAccountKeyPublic(java.lang.String address, java.lang.String publicKey)
Creates an Account instance which has AccountKeyPublic as an accountKeystatic 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 accountKeystatic 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 accountKeyIAccountKey
getAccountKey()
Getter function for accountKeyjava.lang.String
getAddress()
Getter function for addressjava.lang.String
getRLPEncodingAccountKey()
Returns RLP-encoded accountKey string
-
-
-
Constructor Detail
-
Account
public Account(java.lang.String address, IAccountKey accountKey)
Creates an Account instance- Parameters:
address
- The address of AccountaccountKey
- 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 AccountpublicKey
- 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 AccountpublicKeys
- 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 AccountpublicKeys
- public key arrayoptions
- 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 AccountpublicKeyList
- 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 AccountpublicKeyList
- List of public key arrayoptionsList
- 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 AccountrlpEncodedKey
- 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 AccountpublicKey
- 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 AccountpublicKeys
- 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 AccountpublicKeys
- List of public key arrayoptions
- 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 AccountroleBasedPublicKey
- 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 AccountroleBasedPublicKey
- List of public key arrayoptionsList
- 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
-
-