Hyperledger Fabric query system chaincode using node SDK

0 votes

My end goal is to get all existing channels. For that, I would have to query CSCC as suggested in this answer: https://stackoverflow.com/a/46451026/2503940

However, after creating the request, I would need a client object on which I would call the queryByChaincode method. When I try to create a channel instance using client.newChannel(''), the code throws an error saying that channel name is mandatory.

Now how do I query an SCC using node sdk without a channel instance?

Nov 9, 2018 in Blockchain by Perry
• 17,100 points
1,169 views

1 answer to this question.

0 votes

The Fabric Node SDK actually provides a method on the client class which will retrieve all the channels to which a peer belongs: client.queryChannels(peer, useAdmin)

answered Nov 9, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

+16 votes
4 answers
+1 vote
2 answers
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,402 views
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
• 26,740 points
925 views
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer

What happened on deploy, invoke and query in Hyperledger chaincode?

1. Deploy: During Deploy the chaincode is written onto ...READ MORE

answered Apr 26, 2018 in Blockchain by Christine
• 15,790 points
1,462 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP