0

I issue new identity by using guideline at https://hyperledger.github.io/composer/unstable//managing/identity-issue.html but then I can't connect using that account, the system say Card not found: abc@mynetwork. I know I missing the code to import card, (in the command I used composer card import --file abc.card). How can I do that by using code (JavaScript API)?

My problem is very similar to that Hyperledger Composer issue identity but missing business card. I try all the answer but still not work.

Phan Hoàng Nhân
  • 990
  • 1
  • 8
  • 21

1 Answers1

1

see https://github.com/hyperledger/composer-knowledge-wiki/blob/master/knowledge.md#cardapis in the Composer knowledge wiki for more info on using the JS APIs.

You need to IMPORT the card after issuing the identity, you will set the Credentials and then connect to the business network (with the card).

see example (and link below)

`var businessNetwork = new BusinessNetworkConnection();
   return businessNetwork.connect('cardName')
   .then(function(businessNetworkDefinition){
   // Connected
    });
`

see additional examples here -> nodejs test hyperledger composer v0.15 fails with Error: Card not found: PeerAdmin@hlfv1

Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15