I want to fetch blocks using golang from a blockchain which is built using cosmos-SDK.
Are there any docs which helps us to use golang client of cosmos-SDK ?
Its very annoying as i see no docs to acheive the same.
Any help will be appreciated.
I want to fetch blocks using golang from a blockchain which is built using cosmos-SDK.
Are there any docs which helps us to use golang client of cosmos-SDK ?
Its very annoying as i see no docs to acheive the same.
Any help will be appreciated.
Depending on whether you are using CometBFT or Tendermint as the consensus mechanism for your blockchain, you may need to use different libraries for interacting with RPC. Here is the code example that you can use:
Set your RPC address with 443 port or 26657 & your block height number. Also need to note that you can use Tendermint RPC & Cosmos SDK REST/LCD for it:
Tendermint RPC(link depends on version & can will be changed): https://docs.tendermint.com/v0.34/rpc/ Cosmos SDK REST/LCD: https://docs.cosmos.network/api