Hedera.Grpc (Hedera v0.1.0)

Copy Markdown View Source

A minimal gRPC unary client over HTTP/2 (via Mint), speaking the cleartext (h2c) protocol Hedera consensus nodes serve on port 50211. Handles the 5-byte gRPC length-prefixed framing and the grpc-status trailer; enough for the single-request/single-response calls this SDK makes.

Summary

Functions

Make a unary gRPC call: send message (raw protobuf bytes) to path on host:port, return {:ok, response_bytes} or {:error, reason}.

Functions

unary(host, port, path, message, opts \\ [])

@spec unary(binary(), :inet.port_number(), binary(), binary(), keyword()) ::
  {:ok, binary()} | {:error, term()}

Make a unary gRPC call: send message (raw protobuf bytes) to path on host:port, return {:ok, response_bytes} or {:error, reason}.