Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Latest commit

 

History

History
99 lines (57 loc) · 3.3 KB

README.md

File metadata and controls

99 lines (57 loc) · 3.3 KB

ethereumjs-block

Index

Classes

Interfaces

Type aliases

Functions


Type aliases

BufferLike

Ƭ BufferLike: Buffer | TransformableToBuffer | PrefixedHexString | number

Defined in types.ts:42

A Buffer, hex string prefixed with 0x, Number, or an object with a toBuffer method such as BN.


PrefixedHexString

Ƭ PrefixedHexString: string

Defined in types.ts:37

A hex string prefixed with 0x.


Functions

blockFromRpc

blockFromRpc(blockParams: any, uncles?: any[], chainOptions?: ChainOptions): Block

Defined in from-rpc.ts:14

Creates a new block object from Ethereum JSON RPC.

Parameters:

Name Type Description
blockParams any Ethereum JSON RPC of block (eth_getBlockByNumber)
Optional uncles any[] Optional list of Ethereum JSON RPC of uncles (eth_getUncleByBlockHashAndIndex)
Optional chainOptions ChainOptions An object describing the blockchain

Returns: Block


blockHeaderFromRpc

blockHeaderFromRpc(blockParams: any, chainOptions?: ChainOptions): BlockHeader

Defined in header-from-rpc.ts:11

Creates a new block header object from Ethereum JSON RPC.

Parameters:

Name Type Description
blockParams any Ethereum JSON RPC of block (eth_getBlockByNumber)
Optional chainOptions ChainOptions An object describing the blockchain

Returns: BlockHeader