Package org.hyperledger.fabric.gateway
Class Wallets
java.lang.Object
org.hyperledger.fabric.gateway.Wallets
Factory methods for creating wallets to hold identity information, using various backing stores.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Wallet
newCouchDBWallet
(URL serverUrl, String databaseName) Create a wallet backed by a CouchDB database.static Wallet
newFileSystemWallet
(Path storeDirectory) Create a wallet backed by a directory on the file system.static Wallet
Create a wallet backed by an in-memory (non-persistent) store.static Wallet
newWallet
(WalletStore store) Create a wallet backed by a custom store implementation.
-
Method Details
-
newInMemoryWallet
Create a wallet backed by an in-memory (non-persistent) store. Each wallet instance created will have its own private in-memory store.- Returns:
- A wallet.
-
newFileSystemWallet
Create a wallet backed by a directory on the file system.- Parameters:
storeDirectory
- A directory.- Returns:
- A wallet.
- Throws:
IOException
- if the specified directory does not exist and can not be created.
-
newCouchDBWallet
Create a wallet backed by a CouchDB database.- Parameters:
serverUrl
- Connection URL for CouchDB server.databaseName
- Wallet database name.- Returns:
- A wallet.
-
newWallet
Create a wallet backed by a custom store implementation.- Parameters:
store
- A wallet store implementation.- Returns:
- A wallet.
-