RPC examples
Public URL: https://rpc.nvcchain.online
curl
curl -sS -H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' \
https://rpc.nvcchain.online
curl -sS -H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"nvc_getConsensusInfo","params":[]}' \
https://rpc.nvcchain.online
JavaScript
const res = await fetch('https://rpc.nvcchain.online', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'eth_chainId', params: [] }),
});
const { result } = await res.json(); // "0x2bb237e1"
ethers
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://rpc.nvcchain.online', 733100001, { staticNetwork: true });
const network = await provider.getNetwork();