UNPKG

@lodestar/prover

Version:

A Typescript implementation of the Ethereum Consensus light client

11 lines 747 B
import { getErrorResponseForRequestWithFailedVerification, getResponseForRequest, getVerificationFailedMessage, } from "../utils/json_rpc.js"; import { verifyBlock } from "../utils/verification.js"; export const eth_getBlockByHash = async ({ rpc, payload, logger, proofProvider, }) => { const result = await verifyBlock({ payload, proofProvider, logger, rpc }); if (result.valid) { return getResponseForRequest(payload, result.data); } logger.error("Request could not be verified.", { method: payload.method, params: JSON.stringify(payload.params) }); return getErrorResponseForRequestWithFailedVerification(payload, getVerificationFailedMessage("eth_getBlockByHash")); }; //# sourceMappingURL=eth_getBlockByHash.js.map