Get Help

Connecting to a Shared Ethereum Node (JSON-RPC)

Blockdaemon allows developers to read data from the Ethereum network and send transactions without having to host and manage a node themselves. You can do that by utilizing the existing JSON-RPC API interface which a standard Blockdaemon node already implements.

To read data or send a transaction, you will send a POST request. The body of the POST will contain a JSON payload that contains the name of the JSON RPC method you wish to use and any additional parameters used by that method. For example, retrieving the current block number of the Ethereum network can be accomplished via this simple request:

curl -X POST --insecure -H "Content-Type: application/json" --data
'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],
"id":64}' [http://[NODE IP]*

The result will look something like this:

$ {"jsonrpc": "2.0","result": "0x657abc", "id":1}

*You can get your node URL + authorization token from the endpoint menu in your Blockdaemon node dashboard

The response will contain a JSON response payload that will be identical to what you would receive if running a local node. This allows developers to easily swap between our remote service and a local node.

  • On many systems curl is already installed out-of-the-box but if it’s not it can be installed on Linux, Windows, and OSX
  • We don’t allow all RPC methods because some are not suitable in a multi-user (shared) environment.

Useful links

Get ETH Node Access