Skip to main content

Getting Started

Json-RPC Relay allows you to use tools based on ethereum's JSON-RPC API to tap into the Hedera ecosystem. This documentation goes through the steps of setting up Arkhia's Json-RPC Relay thorugh popular ethereum based tools as well as direct API calls.

All examples below have been tested and verified using the available Json-Rpc release by Arkhia.


You will need:

  • Arkhia JSON_RPC_URL
  • Arkhia API_KEY

Both the URL and API KEY can be retrieved from the Arkhia Dashboard after you Create a Project.

Don't have an account yet with Arkhia? Signup.

Go to the Services section in project details to get the necessary information Screenshot

import Web3 from 'web3';const HTTP_PROVIDER_URL_MAINNET = '<JSON_RPC_URL>/<YOUR_API_KEY>';const HTTP_PROVIDER_URL_TESTNET = '<JSON_RPC_URL>/<YOUR_API_KEY>';const web3Provider = new Web3(new Web3.providers.HttpProvider(HTTP_PROVIDER_URL_MAINNET), {    keepalive: true,    headers: [{ name: 'Access-Control-Allow-Origin', value: '*' }],    withCredentials: false});const getLiveness = async () => {        .then(() => console.log(`-> web3 provider is connected`))        .catch(e => console.log('-> web3 provider error: ' + e));}async function main() {    await getLiveness();}