6

I've been messing around with gRPC and I was looking into building my own simple and comprehensive hyperledger fabric SDK in rust.

I've looked everywhere for any gRPC spec of hyperledger fabric to see how we can reproduce the functionality of interacting with the peers, stuff like managing channels and performing invokes and queries.

(reproduce this behavior: https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchannel.html).

Online, everyone says that the functionality is exposed over gRPC, but that they recommend using an existing SDK.

I've inspected the nodeJS SDK and looked for their .proto files, but there are barely any services (https://github.com/hyperledger/fabric-sdk-node/tree/release-1.4/fabric-client/lib/protos)

Is there any way to get their gRPC spec? is there a generic way to do this for gRPC servers? Why is it so hidden?

Thanks!

Afsanefda
  • 3,069
  • 6
  • 36
  • 76

1 Answers1

3

I believe the protos are recently relocated to https://github.com/hyperledger/fabric-protos for the master branch, which is not yet released.

For an as current 1.4 based project, look at the protos/ directory in the main fabric repository. https://github.com/hyperledger/fabric/tree/release-1.4/protos

mhb
  • 754
  • 8
  • 20
  • 1
    Thanks for the links, Is there any documentation on how to consume them? So far it looks like they have very few generic services, it seems like it was design with node communication in mind which would make sense, but this means that we can only use it to create an SDK if you have connections with the core devs. Maybe I should look into the peer code and exposing the functionality as is in gRPC myself? – Enrique Alcázar Garzás Sep 26 '19 at 07:22
  • Sadly no... your best bet is to look what an existing SDK does, or look what the peer CLI does - and just mimic it. You can ask the developers in the rocket chat channels for questions, but - there is no documentation how to build the messages. – yacovm Sep 27 '19 at 23:08