Interface: Wallet

fabric-network. Wallet

Wallet defines the interface for storing and managing users' identities in a fabric network. This is an abstract base class and must be extended.

Methods


<async> delete(label)

Removes an identity from the wallet
Parameters:
Name Type Description
label string

<async> exists(label)

Query the existence of an identity in the wallet
Parameters:
Name Type Description
label string
Returns:
Type
boolean

<async> export(label)

Extract an identity from the wallet
Parameters:
Name Type Description
label string
Returns:
Type
module:fabric-network.Wallet~Identity

<async> import(label, identity)

Import an identity into the wallet
Parameters:
Name Type Description
label string
identity module:fabric-network.Wallet~Identity

<async> list()

List the contents of the wallet
Returns:
Type
Array.<module:fabric-network.Wallet~IdentityInfo>

Type Definitions


Identity

Type:
  • Object
Properties:
Name Type Description
type string Type of credentials, for example X509.
mspId string Organizational unit to which this identity belongs.
certificate string Certificate containing the public key in PEM format.
privateKey string Private key in PEM format.

IdentityInfo

Type:
  • Object
Properties:
Name Type Description
label string Label used to refer to this identity in the wallet.
mspId string Organizational unit to which this identity belongs.
identifier string