tuweni / org.apache.tuweni.eth / BlockHeader

BlockHeader

class BlockHeader (source)

An Ethereum block header.

Constructors

<init>

Creates a new block header.

BlockHeader(parentHash: Hash?, ommersHash: Hash!, coinbase: Address!, stateRoot: Hash!, transactionsRoot: Hash!, receiptsRoot: Hash!, logsBloom: Bytes!, difficulty: UInt256!, number: UInt256!, gasLimit: Gas!, gasUsed: Gas!, timestamp: Instant!, extraData: Bytes!, mixHash: Hash!, nonce: UInt64!)

Functions

equals

fun equals(other: Any?): Boolean

fromBytes

Deserialize a block header from RLP encoded bytes.

static fun fromBytes(encoded: Bytes!): BlockHeader!

getCoinbase

Provides the block's beneficiary's address.

fun getCoinbase(): Address!

getDifficulty

Provides the difficulty of the block.

fun getDifficulty(): UInt256!

getExtraData

Provides the extra data stored with the block.

fun getExtraData(): Bytes!

getGasLimit

Provides the gas limit of the block.

fun getGasLimit(): Gas!

getGasUsed

Provides the gas used for the block.

fun getGasUsed(): Gas!

getHash

Provides the hash of the block header.

fun getHash(): Hash!

getLogsBloom

Provides the bloom filter of the logs of the block.

fun getLogsBloom(): Bytes!

getMixHash

Provides the hash associated with computational work on the block.

fun getMixHash(): Hash!

getNonce

Provides the nonce of the block.

fun getNonce(): UInt64!

getNumber

Provides the number of the block.

fun getNumber(): UInt256!

getOmmersHash

Provides the ommer hash.

fun getOmmersHash(): Hash!

getParentHash

Provides the parent hash, or null if none was available.

fun getParentHash(): Hash?

getReceiptsRoot

Provides the hash associated with the transaction receipts tree.

fun getReceiptsRoot(): Hash!

getStateRoot

Provides the hash associated with the state tree.

fun getStateRoot(): Hash!

getTimestamp

Provides the timestamp of the block

fun getTimestamp(): Instant!

getTransactionsRoot

Provides the root hash of the transactions tree

fun getTransactionsRoot(): Hash!

hashCode

fun hashCode(): Int

readFrom

Deserialize a block header from an RLP input.

static fun readFrom(reader: RLPReader!): BlockHeader!

toBytes

Provides this block header as bytes.

fun toBytes(): Bytes!

toString

fun toString(): String