You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I realised that I would have to RegisterInterfaces for all expected message types, which is acceptable for the default messages, but gets rather complex when modules are out of date like https://github.com/tendermint/liquidity, which does not support v47.
Then I noticed that the REST equivalent endpoint has everything that I need, and now I'm asking why does this work out of the box and gRPC requires unpacking/decoding, etc. (I'm sure i'm using it wrong, but I have to ask...)
Using /cosmos/tx/v1beta1/txs/44C8DAA0621CC441F2714A65025FD6410BE6351904C05FB46294B93F4C1E1D1E here is a snippet with messages from the full output:
I did also attempt the RPC abciQuery endpoint, but messages don't seem to be included (reasonable since lower level).
TL;DR can I get the same output of the REST endpoint without dealing with unpacking messages?
To answer my question a bit, I think the Why of gRPC is this way is to enable functionality for interacting with applications, but for my use case, I just want to query the message in it's intended format.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It is well documented that the REST endpoint is now a front for the GRPC service (using gRPC-gateway).
This is also exposed in grpcurl:
$ grpcurl cosmoshub-grpc.lavenderfive.com:443 describe cosmos.tx.v1beta1.Service
Now I am particularly interested in querying this endpoint with Go, for which there is also another documentation.
But I realised that I would have to
RegisterInterfaces
for all expected message types, which is acceptable for the default messages, but gets rather complex when modules are out of date like https://github.com/tendermint/liquidity, which does not support v47.Then I noticed that the REST equivalent endpoint has everything that I need, and now I'm asking why does this work out of the box and gRPC requires unpacking/decoding, etc. (I'm sure i'm using it wrong, but I have to ask...)
Using
/cosmos/tx/v1beta1/txs/44C8DAA0621CC441F2714A65025FD6410BE6351904C05FB46294B93F4C1E1D1E
here is a snippet with messages from the full output:I did also attempt the RPC abciQuery endpoint, but messages don't seem to be included (reasonable since lower level).
TL;DR can I get the same output of the REST endpoint without dealing with unpacking messages?
To answer my question a bit, I think the Why of gRPC is this way is to enable functionality for interacting with applications, but for my use case, I just want to query the message in it's intended format.
Beta Was this translation helpful? Give feedback.
All reactions