public class Account extends Object implements Serializable
| 构造器和说明 |
|---|
Account() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
copy() |
void |
encrypt(String password)
根据密码加密账户(给账户设置密码)
Password-encrypted account (set password for account)
|
void |
encrypt(String password,
boolean isForce)
根据密码加密账户(给账户设置密码)
Password-encrypted account (set password for account)
|
boolean |
equals(Object obj) |
Address |
getAddress() |
String |
getAlias() |
int |
getChainId() |
Long |
getCreateTime() |
ECKey |
getEcKey() |
ECKey |
getEcKey(String password)
根据密码获取ECKey
|
ECKey |
getEcKey1(String password) |
byte[] |
getEncryptedPriKey() |
byte[] |
getExtend() |
byte[] |
getHash160() |
byte[] |
getPriKey() |
byte[] |
getPriKey(String password) |
byte[] |
getPubKey() |
String |
getRemark() |
int |
getStatus() |
int |
hashCode() |
boolean |
isEncrypted()
账户是否被加密(是否设置过密码)
Whether the account is encrypted (Whether the password is set)
|
boolean |
isLocked()
账户是否被锁定(是否有明文私钥) 有私钥表示解锁
Whether the account is locked (is there a cleartext private key)
|
void |
lock()
锁定账户
Lock account
|
void |
setAddress(Address address) |
void |
setAlias(String alias) |
void |
setChainId(int chainId) |
void |
setCreateTime(Long createTime) |
void |
setEcKey(ECKey ecKey) |
void |
setEncryptedPriKey(byte[] encryptedPriKey) |
void |
setExtend(byte[] extend) |
void |
setPriKey(byte[] priKey) |
void |
setPubKey(byte[] pubKey) |
void |
setRemark(String remark) |
void |
setStatus(int status) |
boolean |
unlock(String password)
根据密码解锁账户
Unlock account based on password
|
boolean |
validatePassword(String password)
验证账户密码是否正确
Verify that the account password is correct
|
public boolean isEncrypted()
public void lock()
public byte[] getHash160()
public boolean unlock(String password) throws NulsException
NulsExceptionpublic boolean isLocked()
public boolean validatePassword(String password)
public void encrypt(String password) throws NulsException
NulsExceptionpublic void encrypt(String password, boolean isForce) throws NulsException
NulsExceptionpublic Object copy()
public int getChainId()
public void setChainId(int chainId)
public Address getAddress()
public void setAddress(Address address)
public String getAlias()
public void setAlias(String alias)
public int getStatus()
public void setStatus(int status)
public byte[] getPubKey()
public void setPubKey(byte[] pubKey)
public byte[] getExtend()
public void setExtend(byte[] extend)
public Long getCreateTime()
public void setCreateTime(Long createTime)
public byte[] getEncryptedPriKey()
public void setEncryptedPriKey(byte[] encryptedPriKey)
public byte[] getPriKey()
public byte[] getPriKey(String password) throws NulsException
NulsExceptionpublic void setPriKey(byte[] priKey)
public ECKey getEcKey()
public void setEcKey(ECKey ecKey)
public ECKey getEcKey(String password) throws NulsException
NulsExceptionpublic ECKey getEcKey1(String password) throws NulsException
NulsExceptionpublic String getRemark()
public void setRemark(String remark)
Copyright © 2021. All rights reserved.