How to Connect to Cosmos

Learn how easy it is to connect to the Cosmos blockchain with Blockdaemon.

It's easy to connect to your Cosmos infrastructure. If you haven't already configured any Cosmos infrastructure, visit the Cosmos marketplace page to learn more about Blockdaemon's Cosmos options. In this guide, you'll learn the following simple method of connection to your infrastructure:


How to access Your Blockdaemon Cosmos Credentials

Once you have purchased your Blockdaemon Cosmos infrastructure, you can access your credentials:

  1. Log into the Blockdaemon app.
  2. In the Blockchain Access menu, click Nodes.
  3. Click the Cosmos node.
  4. Click the Connect tab.

In the Connection Information area, you'll find the following:

  • Your Endpoint URL
  • Your Auth Token

How to Connect to Cosmos Rest API via cURL

curl -X GET -H 'Content-Type: application/json' 'https://YOUR_ENDPOINT_URL/cosmos_rest/node_info?auth=YOUR_AUTH_TOKEN'

How to connect to Cosmos Tendermint RPC via cURL

curl -X POST -H 'Content-Type: application/json' --data '{"method": "YOUR_RPC_METHOD", "params": [YOUR_PARAMS], "id": 1}' 'https://YOUR_ENDPOINT_URL/tendermint_rpc?auth=YOUR_AUTH_TOKEN'
  • Replace YOUR_RPC_METHOD with your chosen RPC method.
  • Replace YOUR_PARAMS with your chosen RPC parameters.
  • Replace YOUR_ENDPOINT_URL with the Endpoint URL found in the Blockdaemon App.
  • Replace YOUR_AUTH_TOKEN with the Auth Token found in the Blockdaemon App.

How to connect to Cosmos Tendermint Rest via cURL

curl -X POST -H 'Content-Type: application/json' 'https://YOUR_ENDPOINT_URL/tendermint_rest/status?auth=YOUR_AUTH_TOKEN'
  • Replace YOUR_ENDPOINT_URL with the Endpoint URL found in the Blockdaemon App.
  • Replace YOUR_AUTH_TOKEN with the Auth Token found in the Blockdaemon App.

How to connect to Cosmos via WebSocket

wscat -H "X-Auth-Token: YOUR_AUTH_TOKEN" -c wss://YOUR_ENDPOINT_URL/websocket
  • Replace YOUR_ENDPOINT_URL with the Endpoint URL found in the Blockdaemon App.
  • Replace YOUR_AUTH_TOKEN with the Auth Token found in the Blockdaemon App.

📘

Note:

wscat is a tool that can connect over websockets and may need to be installed. You can use your preferred tool of choice.


How to connect to Cosmos via GRPC

grpcurl -H "X-Auth-Token: YOUR_AUTH_TOKEN" YOUR_ENDPOINT_URL:443 list
  • Replace YOUR_AUTH_TOKEN with the Auth Token found in the Blockdaemon App.
  • Replace YOUR_ENDPOINT_URL with the Endpoint URL found in the Blockdaemon App.

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.