Search code examples
node.jsgrpcgrpc-node

How to load remote proto definitions using proto-loader in NodeJS


Url for RPCs is flow-testnet.g.alchemy.com:443

I don't have any .proto files locally.

How do I load them to generate package definitions?


Solution

  • There is a Reflection API concept exact for this purpose. Loader implementation can be found here https://www.npmjs.com/package/grpc-reflection-js