类 Account
- java.lang.Object
-
- network.nerve.kit.model.Account
-
- 所有已实现的接口:
Serializable
public class Account extends Object implements Serializable
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 Account()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectcopy()voidencrypt(String password)根据密码加密账户(给账户设置密码) Password-encrypted account (set password for account)voidencrypt(String password, boolean isForce)根据密码加密账户(给账户设置密码) Password-encrypted account (set password for account)booleanequals(Object obj)AddressgetAddress()StringgetAlias()intgetChainId()LonggetCreateTime()ECKeygetEcKey()ECKeygetEcKey(String password)根据密码获取ECKeyECKeygetEcKey1(String password)byte[]getEncryptedPriKey()byte[]getExtend()byte[]getHash160()byte[]getPriKey()byte[]getPriKey(String password)byte[]getPubKey()StringgetRemark()intgetStatus()inthashCode()booleanisEncrypted()账户是否被加密(是否设置过密码) Whether the account is encrypted (Whether the password is set)booleanisLocked()账户是否被锁定(是否有明文私钥) 有私钥表示解锁 Whether the account is locked (is there a cleartext private key)voidlock()锁定账户 Lock accountvoidsetAddress(Address address)voidsetAlias(String alias)voidsetChainId(int chainId)voidsetCreateTime(Long createTime)voidsetEcKey(ECKey ecKey)voidsetEncryptedPriKey(byte[] encryptedPriKey)voidsetExtend(byte[] extend)voidsetPriKey(byte[] priKey)voidsetPubKey(byte[] pubKey)voidsetRemark(String remark)voidsetStatus(int status)booleanunlock(String password)根据密码解锁账户 Unlock account based on passwordbooleanvalidatePassword(String password)验证账户密码是否正确 Verify that the account password is correct
-
-
-
方法详细资料
-
isEncrypted
public boolean isEncrypted()
账户是否被加密(是否设置过密码) Whether the account is encrypted (Whether the password is set)
-
lock
public void lock()
锁定账户 Lock account
-
getHash160
public byte[] getHash160()
-
unlock
public boolean unlock(String password) throws NulsException
根据密码解锁账户 Unlock account based on password- 抛出:
NulsException
-
isLocked
public boolean isLocked()
账户是否被锁定(是否有明文私钥) 有私钥表示解锁 Whether the account is locked (is there a cleartext private key)- 返回:
- true: Locked, false: not Locked
-
validatePassword
public boolean validatePassword(String password)
验证账户密码是否正确 Verify that the account password is correct
-
encrypt
public void encrypt(String password) throws NulsException
根据密码加密账户(给账户设置密码) Password-encrypted account (set password for account)- 抛出:
NulsException
-
encrypt
public void encrypt(String password, boolean isForce) throws NulsException
根据密码加密账户(给账户设置密码) Password-encrypted account (set password for account)- 抛出:
NulsException
-
copy
public Object copy()
-
getChainId
public int getChainId()
-
setChainId
public void setChainId(int chainId)
-
getAddress
public Address getAddress()
-
setAddress
public void setAddress(Address address)
-
getAlias
public String getAlias()
-
setAlias
public void setAlias(String alias)
-
getStatus
public int getStatus()
-
setStatus
public void setStatus(int status)
-
getPubKey
public byte[] getPubKey()
-
setPubKey
public void setPubKey(byte[] pubKey)
-
getExtend
public byte[] getExtend()
-
setExtend
public void setExtend(byte[] extend)
-
getCreateTime
public Long getCreateTime()
-
setCreateTime
public void setCreateTime(Long createTime)
-
getEncryptedPriKey
public byte[] getEncryptedPriKey()
-
setEncryptedPriKey
public void setEncryptedPriKey(byte[] encryptedPriKey)
-
getPriKey
public byte[] getPriKey()
-
getPriKey
public byte[] getPriKey(String password) throws NulsException
- 抛出:
NulsException
-
setPriKey
public void setPriKey(byte[] priKey)
-
getEcKey
public ECKey getEcKey()
-
setEcKey
public void setEcKey(ECKey ecKey)
-
getEcKey
public ECKey getEcKey(String password) throws NulsException
根据密码获取ECKey- 抛出:
NulsException
-
getEcKey1
public ECKey getEcKey1(String password) throws NulsException
- 抛出:
NulsException
-
getRemark
public String getRemark()
-
setRemark
public void setRemark(String remark)
-
-