hfc.fabric_network.couchdbwalletstore
¶
Module Contents¶
Classes¶
|
CouchDBWalletStore stores the identities of users and admins |
-
class
hfc.fabric_network.couchdbwalletstore.
CouchDBWalletStore
(dbName, config='http://localhost:5984')¶ Bases:
object
CouchDBWalletStore stores the identities of users and admins in a CouchDB with given config ie. it contains the Private Key and Enrollment Certificate
-
exists
(self, enrollment_id)¶ - Returns whether or not the creds of a user with a given user_id
exists in the wallet
- Parameters
enrollment_id – enrollment id
- Returns
True or False
-
remove
(self, enrollment_id)¶ deletes identities of user with given enrollment_id
- Parameters
enrollment_id – enrollment id
- Returns
-
put
(self, enrollment_id, user_enrollment)¶ Saves the particular Identity in the wallet
- Parameters
enrollment_id – enrollment id
user_enrollment – Enrollment object
- Returns
-
create_user
(self, enrollment_id, org, msp_id, state_store=None)¶ - Returns an instance of a user whose identity
is stored in the CouchDBWallet
- Parameters
enrollment_id – enrollment id
org – organization
msp_id – MSP id
state_store – (Default value = None)
- Returns
a validated user instance
-