public abstract class AbstractKeyring
extends java.lang.Object
Constructor and Description |
---|
AbstractKeyring(java.lang.String address)
Create a AbstractKeyring instance.
|
Modifier and Type | Method and Description |
---|---|
abstract AbstractKeyring |
copy()
Returns a copied keyring instance.
|
KeyStore |
encrypt(java.lang.String password)
Encrypts a keyring and returns a KeyStore.(according to KeyStore V4)
This function automatically operates SCRYPT KDF Function
|
abstract KeyStore |
encrypt(java.lang.String password,
KeyStoreOption options)
Encrypts a keyring and returns a KeyStore.(according to KeyStore V4)
|
KeyStore |
encryptV3(java.lang.String password)
Encrypts a keyring and returns a KeyStore.(according to KeyStore V3)
|
KeyStore |
encryptV3(java.lang.String password,
KeyStoreOption options)
Encrypts a keyring and returns a KeyStore.(according to KeyStore V3)
|
java.lang.String |
getAddress() |
java.lang.String |
getKlaytnWalletKey()
Returns a KlaytnWalletKey format
|
boolean |
isDecoupled()
Returns true if keyring has decoupled key.
|
abstract java.util.List<SignatureData> |
sign(java.lang.String txHash,
int chainId,
int role)
Signs a transaction hash with all private keys in specific role group and return signature list.
|
abstract SignatureData |
sign(java.lang.String txHash,
int chainId,
int role,
int index)
Signs a transaction hash with a private key in specific role group and return signature.
|
java.util.List<SignatureData> |
sign(java.lang.String txHash,
java.lang.String chainId,
int role)
Signs a transaction hash with all keys in specific role group and return signature list.
|
SignatureData |
sign(java.lang.String txHash,
java.lang.String chainId,
int role,
int index)
Signs a transaction hash with key in specific role group and return signature.
|
abstract MessageSigned |
signMessage(java.lang.String message,
int role)
Signs a hashed data with all private keys in specific role group and return MessageSigned instance.
|
abstract MessageSigned |
signMessage(java.lang.String message,
int role,
int index)
Signs a hashed data with a private key in specific role group and return MessageSigned instance.
|
public AbstractKeyring(java.lang.String address)
address
- public abstract java.util.List<SignatureData> sign(java.lang.String txHash, int chainId, int role)
txHash
- The hash of transaction.chainId
- The chainId specific to the network.role
- A number indicating the role of the key.public abstract SignatureData sign(java.lang.String txHash, int chainId, int role, int index)
txHash
- The hash of transaction.chainId
- The chainId specific to the network.role
- A number indicating the role of the key.index
- The index of the key to be used in the specific role group.public abstract MessageSigned signMessage(java.lang.String message, int role)
message
- The data string to signrole
- A number indicating the role of the keypublic abstract MessageSigned signMessage(java.lang.String message, int role, int index)
message
- The data string to signrole
- A number indicating the role of the keyindex
- The index of the key to be used in the specific role grouppublic abstract KeyStore encrypt(java.lang.String password, KeyStoreOption options) throws org.web3j.crypto.CipherException
password
- The password to be used for encryption. The encrypted in KeyStore can be decrypted with this password.options
- The options to use when encrypt a keyring.org.web3j.crypto.CipherException
public abstract AbstractKeyring copy()
public java.util.List<SignatureData> sign(java.lang.String txHash, java.lang.String chainId, int role)
txHash
- The hash of transaction.chainId
- The chainId specific to the network.role
- A number indicating the role of the key.public SignatureData sign(java.lang.String txHash, java.lang.String chainId, int role, int index)
txHash
- The hash of transaction.chainId
- The chainId specific to the network.role
- A number indicating the role of the key.index
- The index of the key to be used in the specific role group.public KeyStore encrypt(java.lang.String password) throws org.web3j.crypto.CipherException
password
- The password to be used for encryption. The encrypted in KeyStore can be decrypted with this password.org.web3j.crypto.CipherException
public KeyStore encryptV3(java.lang.String password, KeyStoreOption options) throws org.web3j.crypto.CipherException
password
- The password to be used for encryption. The encrypted in KeyStore can be decrypted with this password.options
- The options to use when encrypt a keyring.org.web3j.crypto.CipherException
public KeyStore encryptV3(java.lang.String password) throws org.web3j.crypto.CipherException
password
- The password to be used for encryption. The encrypted in KeyStore can be decrypted with this password.org.web3j.crypto.CipherException
public java.lang.String getKlaytnWalletKey()
public boolean isDecoupled()
public java.lang.String getAddress()