UNPKG

@lodestar/prover

Version:

A Typescript implementation of the Ethereum Consensus light client

12 lines 829 B
import { getErrorResponseForRequestWithFailedVerification, getResponseForRequest, getVerificationFailedMessage, } from "../utils/json_rpc.js"; import { verifyAccount } from "../utils/verification.js"; export const eth_getTransactionCount = async ({ rpc, payload, logger, proofProvider }) => { const { params: [address, block], } = payload; const result = await verifyAccount({ proofProvider, logger, rpc, address, block }); if (result.valid) { return getResponseForRequest(payload, result.data.nonce); } logger.error("Request could not be verified.", { method: payload.method, params: JSON.stringify(payload.params) }); return getErrorResponseForRequestWithFailedVerification(payload, getVerificationFailedMessage("eth_getTransactionCount")); }; //# sourceMappingURL=eth_getTransactionCount.js.map