Skip to content

blockFromRpc

blockFromRpc(blockParams, options, uncles): Block

Creates a new block object from Ethereum JSON RPC.

Parameters

blockParams: JsonRpcBlock

Ethereum JSON RPC of block (eth_getBlockByNumber)

options: BlockOptions

An object describing the blockchain

uncles: any[] = []

Optional list of Ethereum JSON RPC of uncles (eth_getUncleByBlockHashAndIndex)

Returns

Block

Defined in

from-rpc.ts:39