Ethereum RPC proxy that verifies RPC responses against given trusted block hashes. Currently, most of the DAPPs and Wallets interact with Ethereum over RPC. Patronum can be used as a building block to build light clients that retrofit into the existing Ethereum infrastructure. This library mainly takes advantage of the eth_getProof
RPC to perform merkle inclusion proofs for RPC call verification.
import { VerifyingProvider, startServer } from 'patronum';
const provider = new VerifyingProvider(trustlessRPCURL, trustedBlockNumber, trustedBlockHash);
await startServer(provider, PORT);
import { VerifyingProvider } from 'patronum';
const provider = new VerifyingProvider(trustlessRPCURL, trustedBlockNumber, trustedBlockHash);
console.log(await provider.getBalance(address, blockTag));
console.log(await provider.call(tx));
The RPC URL provided to VerifyingProvider should support eth_getProof
and eth_createAccessList
. Infura doesn't support eth_createAccessList
.