hfc.fabric_network.wallet

Module Contents

Classes

FileSystenWallet(path=os.getcwd() + ‘/tmp/hfc-kvs’)

FileSystemWallet stores the identities of users and admins

Identity(enrollment_id, user)

Class represents a tuple containing

class hfc.fabric_network.wallet.FileSystenWallet(path=os.getcwd() + '/tmp/hfc-kvs')

Bases: object

FileSystemWallet stores the identities of users and admins ie. it contains the Private Key and Enrollment Certificate

exists(self, enrollment_id)
Returns whether or not the credentials 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 users with the given user_id

Parameters

enrollment_id – enrollment id

Returns

create_user(self, enrollment_id, org, msp_id, state_store=None)
Returns an instance of a user whose identity

is stored in the FileSystemWallet

Parameters
  • enrollment_id – enrollment id

  • org – organization

  • msp_id – MSP id

  • state_store – state store (Default value = None)

Returns

a user instance

class hfc.fabric_network.wallet.Identity(enrollment_id, user)

Bases: object

Class represents a tuple containing 1) enrollment_id 2) Enrollment Certificate of user 3) Private Key of user

CreateIdentity(self, Wallet)

Saves the particular Identity in the wallet

Parameters

Wallet

Returns