Package org.hyperledger.fabric.gateway
Interface Wallet
public interface Wallet
A wallet stores identity information used to connect to a Hyperledger Fabric network. Instances are created using
factory methods on
Wallets.-
Method Summary
Modifier and TypeMethodDescriptionGet an identity from the wallet.list()Get the labels of all identities in the wallet.voidPut an identity into the wallet.voidRemove an identity from the wallet.
-
Method Details
-
put
Put an identity into the wallet.- Parameters:
label- Label used to identify the identity within the wallet.identity- Identity to store in the wallet.- Throws:
IOException- if an error occurs accessing the backing store.
-
get
Get an identity from the wallet. The implementation class of the identity object will vary depending on its type.- Parameters:
label- Label used to identify the identity within the wallet.- Returns:
- An identity if it exists; otherwise null.
- Throws:
IOException- if an error occurs accessing the backing store.
-
list
Get the labels of all identities in the wallet.- Returns:
- Identity labels.
- Throws:
IOException- if an error occurs accessing the backing store.
-
remove
Remove an identity from the wallet. If the identity does not exist, this method does nothing.- Parameters:
label- Label used to identify the identity within the wallet.- Throws:
IOException- if an error occurs accessing the backing store.
-