First, assuming that that is a protobuf service, you will need to have a proto file that describes it in order to make the requests. You should be able to get that file from the service provider. Once you have that, there are two main packages for using proto files with the Node gRPC libraries: one is @grpc/proto-loader, which loads proto files at runtime, and the other is grpc-tools, which generates files that depend on the google-protobuf package. These two packages have different ways of representing proto messages: proto-loader uses plain JavaScript objects with structures matching the message definitions, while grpc-tools provides message classes with getters and setters for the different message fields. In both cases, once you load the code up with the gRPC package (we recommend @grpc/grpc-js), you will get a class this.app.rpc.CompactTxStreamer that can be constructed with a specific server address (such as "
main.company.com:9067"), and the concrete object will have a method GetNetworkInfo that can be called with parameters that depend on whether the request is streaming from the client or server. The API looks like the corresponding make[Something]Request method of the
Client class, but without the first three parameters.