We're now supporting Polygon zkEVM!
Learn more here.

Contents

eth_submitWork RPC Method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. nonce - string - The nonce found
  2. hash - string - The header's pow-hash
  3. digest - string - The mix digest

Returns:

  1. result - It returns true if the provided solution is valid otherwise false

Code Examples:

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
  ],
  "id": 1
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
Ready to get started? Create a free account