Interacting with gRPC
Interacting with the gRPC Server
As described on the Network page. A gRPC endpoint is availble on the public Osmosis nodes so that you can start playing and intreacting with it right away.
Enabling gRPC on a node
If you are running your own node. It's also possible to enable them by editing ~/.osmosisd/config/app.toml
:
grpc.enable = true|false
field defines if the gRPC server should be enabled. Defaults totrue
.grpc.address = {string}
field defines the address (really, the port, since the host should be kept at0.0.0.0
) the server should bind to. Defaults to0.0.0.0:9090
.
Grpc endpoints
An overview of all available gRPC endpoints shipped with Osmosis is available in the Osmosis Protobuf documentation. There is also a Cosmos SDK is Protobuf documentation.
You can send requests to the gRPC server using a gRPC client such as grpcurl or from Buf Studio.
Since the code generation library largely depends on your own tech stack, we will only present three alternatives:
Frontend SDK Libraries & Utilities
Generating docs
brew install protobuf
brew install protoc-gen-go-grpc