Hyperledger Fabric: How to create wallet using program?

0 votes

I can use this command to get the wallet from the default path: '˜/.composer/client-data/admin@proak-hyperledger-network':

const wallet = await this.bizNetworkConnection.cardStore.getWallet('admin@proak-hyperledger-network');

But what if I dont want to do that? I'd like create the wallet. Can I do something like:

let wallet = new Wallet(args)

Oct 31, 2018 in Blockchain by digger
• 27,620 points
356 views

1 answer to this question.

0 votes

You can do this by passing some options to BusinessNetworkConnection, something like this:

constructor() {
    let connectionOptions = {}
    connectionOptions = {
        wallet : {
          type: 'composer-wallet-filesystem',
          options : {
            storePath : '/tmp/.composer'
          }
        }
      };
    this.bizNetworkConnection = new BusinessNetworkConnection(connectionOptions);
  }
answered Oct 31, 2018 by Omkar
• 67,200 points

Related Questions In Blockchain

0 votes
1 answer
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
415 views
+15 votes
5 answers
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
55 views
+1 vote
1 answer
0 votes
1 answer

Hyperledger Fabric: How to ping network using program?

// http://nodejs.org/api.html#_child_processes var sys = require('sys') var exec = ...READ MORE

answered Nov 9, 2018 in Blockchain by Omkar
• 67,200 points
95 views
0 votes
1 answer

Hyperledger Fabric: How to get transaction history using key?

history, err := stub.GetHistoryForKey(key_value) for history.HasNext() { ...READ MORE

answered Nov 20, 2018 in Blockchain by Omkar
• 67,200 points
489 views