Package com.klaytn.caver.wallet
Interface IWallet
-
- All Known Implementing Classes:
KeyringContainer
public interface IWallet
The Interface of wallet that can manage multiple key data. It can be used in classes that sign transactions using private key existed in wallet internally.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>
generate(int num)
Generates key data to manage in wallet.boolean
isExisted(java.lang.String address)
Check whether there is a key data corresponding to the address passed as a parameter in the wallet.boolean
remove(java.lang.String address)
Deletes the key data that associates with the given address from wallet.AbstractTransaction
sign(java.lang.String address, AbstractTransaction transaction)
Signs the transaction using all keys in the key data corresponding to the address.AbstractFeeDelegatedTransaction
signAsFeePayer(java.lang.String address, AbstractFeeDelegatedTransaction transaction)
Signs the FeeDelegatedTransaction using all keys in the key data corresponding to the address.
-
-
-
Method Detail
-
generate
java.util.List<java.lang.String> generate(int num) throws java.lang.Exception
Generates key data to manage in wallet.- Parameters:
num
- The number of key data to create.- Returns:
- List
- Throws:
java.lang.Exception
-
isExisted
boolean isExisted(java.lang.String address) throws java.lang.Exception
Check whether there is a key data corresponding to the address passed as a parameter in the wallet.- Parameters:
address
- An address to find key data in wallet.- Returns:
- boolean
- Throws:
java.lang.Exception
-
remove
boolean remove(java.lang.String address) throws java.lang.Exception
Deletes the key data that associates with the given address from wallet.- Parameters:
address
- An address of the key data to be deleted in wallet.- Returns:
- boolean
- Throws:
java.lang.Exception
-
sign
AbstractTransaction sign(java.lang.String address, AbstractTransaction transaction) throws java.io.IOException
Signs the transaction using all keys in the key data corresponding to the address.- Parameters:
address
- An address of key data in wallet.transaction
- An AbstractTransaction instance to sign- Returns:
- AbstractTransaction
- Throws:
java.io.IOException
-
signAsFeePayer
AbstractFeeDelegatedTransaction signAsFeePayer(java.lang.String address, AbstractFeeDelegatedTransaction transaction) throws java.io.IOException
Signs the FeeDelegatedTransaction using all keys in the key data corresponding to the address.- Parameters:
address
- An address of key data in wallet.transaction
- An AbstractFeeDelegatedTransaction instance to sign.- Returns:
- AbstractFeeDelegatedTransaction
- Throws:
java.io.IOException
-
-