Reputation: 981
I need that, once an organization is added to the network, my application can get the updated list of all organizations.
I've researched this and the solutions I've found (Discovery Service and Node.js SDK Channel class) only return the name of the peers.
Upvotes: 0
Views: 416
Reputation: 1649
In the Node SDK, at least when using discovery, the getMspids()
method on the Channel
returns an array of Member Services Provider IDs:
https://hyperledger.github.io/fabric-sdk-node/release-2.2/Channel.html#getMspids
It may be a bit of work to implement but another approach might be to implement a block listener that inspects blocks as they are committed and looks for config update transactions that include changes to the organizations configured for a network:
Upvotes: 1