@ApiAudience.Public @ApiStability.Unstable public interface KeyStoreOperation
Modifier and Type | Method and Description |
---|---|
AccountAddress |
create(java.lang.String password)
Create an account with a password.
|
EncryptedPrivateKey |
exportKey(Authentication authentication)
Export an encrypted private key of account which is stored in a server key store.
|
AccountAddress |
importKey(EncryptedPrivateKey encryptedKey,
java.lang.String oldPassword,
java.lang.String newPassword)
Import an encrypted private key to a server key store.
|
java.util.List<AccountAddress> |
list()
Get account list on a key store.
|
boolean |
lock(Authentication authentication)
Lock a private key of account which is stored in a server key store.
|
Transaction |
sign(RawTransaction rawTransaction)
Sign for transaction.
|
boolean |
unlock(Authentication authentication)
Unlock a private key of account which is stored in a server key store.
|
java.util.List<AccountAddress> list()
AccountAddress create(java.lang.String password)
password
- a password to encrypt private keyboolean lock(Authentication authentication)
authentication
- an authentication to lockboolean unlock(Authentication authentication)
authentication
- an authentication to unlockTransaction sign(RawTransaction rawTransaction)
rawTransaction
- raw transaction to signAccountAddress importKey(EncryptedPrivateKey encryptedKey, java.lang.String oldPassword, java.lang.String newPassword)
oldPassword
is used to
decrypt passed private key. An newPassword
is used to store private key as encrypted
state in a server.encryptedKey
- an encrypted private keyoldPassword
- an old password to decrypt encrypted private keynewPassword
- an new password to encrypt passed private key in a server keystoreEncryptedPrivateKey exportKey(Authentication authentication)
authentication
- an authentication of stored account