0

I have a necessity where I want to verify the authenticity and integrity of the data that is returned by the Web3js library methods.mymethod().call() from the smart contract. Something we do in the client-server communication model, the authenticity and integrity of the message/data the client receive could be validated with the Rest API response (Header, Body, signature). Could the same be done on the response we receive from the web3js library?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

0

I have a necessity where I want to verify the authenticity and integrity

The question does not discuss why you want to do this and does not make any sense and feels xy problem.

However here is a solution

  • Run your own Ethereum node.

  • Ethereum node is guaranteed to have have a valid state, by Etherum block validation rules

  • Because you are running your own node, the JSON-RPC replies do not lie to yourself. Unless you are mad and then this is called Mad General Problem.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435