Prayag k
Prayag k

Reputation: 678

How to import identity generated during network setup to a wallet in hyperledger fabric?

I have generated 1 user account using crypto-config tool in addition to the admin account. How can I import this account into a wallet so that I can use it with my client application?

This is my crytpto-config.yaml file

# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

OrdererOrgs:

  - Name: Orderer
    Domain: workspace
    EnableNodeOUs: true
    Template:
      Start: 1
      Count: 5


PeerOrgs:
  - Name: adminOrg
    Domain: adminOrg.workspace
    EnableNodeOUs: true
    Template:
      Start: 1
      Count: 2
    Users:
      Start: 1
      Count: 1

  - Name: userOrg
    Domain: userOrg.workspace
    EnableNodeOUs: true
    Template:
      Start: 1
      Count: 2
    Users:
      Start: 1
      Count: 1

Upvotes: 1

Views: 188

Answers (1)

R Thatcher
R Thatcher

Reputation: 5570

There is a short Javascript program in the Fabric Samples (Commercial Paper) that does exactly what you require addToWallet.js

You will need to edit the code for your filenames and paths. Note that the Wallet created is called Isabella to fit in with the narrative of the Commercial Paper sample even though it actually uses user1.

Upvotes: 1

Related Questions