How to Connect to Cosmos
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 Connect to Cosmos Rest API via cURL
- How to connect to Cosmos Tendermint RPC via cURL
- How to connect to Cosmos Tendermint Rest via cURL
- How to connect to Cosmos via WebSocket
- How to connect to Cosmos via GRPC
How to access Your Blockdaemon Cosmos Credentials
Once you have purchased your Blockdaemon Cosmos infrastructure, you can access your credentials:
- Log into the Blockdaemon app.
- In the Blockchain Access menu, click Nodes.
- Click the Cosmos node.
- 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'
- 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 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.
CHow 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.
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.
Updated about 2 months ago