gRPC
Creating a subscription
Creating a subscription
Streams are available with gRPC via Gateway only. To enable gRPC on your Gateway, use the startup flag grpc
.
In order to create a subscription via gRPC, you must first open a gRPC connection to the Gateway using the gRPC host IP and port specified by the startup parameters grpc-host
(default: 127.0.0.1
) and grpc-port
(default: 5001
).
The Gateway client connection interface provides a unique method and request for each stream that should be used to create subscriptions. Transaction stream requests have a Filters
field, and all stream requests have an Includes
field. Stream-specific options for these fields can be found on the dedicated page for that stream. In addition, all stream requests also require the Authorization header configured to authenticate the client. If it is missing or improperly provided, an error will be returned as the response.
Subscribing to Gateway Stream in Go using gRPC (ex: NewTxs stream):