Class: MoneroBlock

MoneroBlock(state, txType)

Models a Monero block in the blockchain.

Constructor

new MoneroBlock(state, txType)

Construct the model.
Parameters:
Name Type Description
state MoneroBlock | MoneroBlockHeader | object is existing state to initialize from (optional)
txType MoneroBlock.DeserializationType informs the tx deserialization type (MoneroTx, MoneroTxWallet, MoneroTxQuery)
Source:

Extends

Methods

copy()

Overrides:
Source:

getCumulativeDifficulty()

Overrides:
Source:

getDepth()

Overrides:
Source:

getDifficulty()

Overrides:
Source:

getHash()

Overrides:
Source:

getHeight() → {number}

Return the block's height which is the total number of blocks that have occurred before.
Overrides:
Source:
Returns:
the block's height
Type
number

getHex()

Source:

getLongTermWeight()

Overrides:
Source:

getMajorVersion()

Overrides:
Source:

getMinerTx()

Source:

getMinerTxHash()

Overrides:
Source:

getMinorVersion()

Overrides:
Source:

getNonce()

Overrides:
Source:

getNumTxs()

Overrides:
Source:

getOrphanStatus()

Overrides:
Source:

getPowHash()

Overrides:
Source:

getPrevHash()

Overrides:
Source:

getReward()

Overrides:
Source:

getSize()

Overrides:
Source:

getTimestamp()

Overrides:
Source:

getTxHashes()

Source:

getTxs()

Source:

getWeight()

Overrides:
Source:

merge()

Overrides:
Source:

setCumulativeDifficulty()

Overrides:
Source:

setDepth()

Overrides:
Source:

setDifficulty()

Overrides:
Source:

setHash()

Overrides:
Source:

setHeight(height) → {MoneroBlockHeader}

Set the block's height which is the total number of blocks that have occurred before.
Parameters:
Name Type Description
height number is the block's height to set
Overrides:
Source:
Returns:
a reference to this header for chaining
Type
MoneroBlockHeader

setHex()

Source:

setLongTermWeight()

Overrides:
Source:

setMajorVersion()

Overrides:
Source:

setMinerTx()

Source:

setMinerTxHash()

Overrides:
Source:

setMinorVersion()

Overrides:
Source:

setNonce()

Overrides:
Source:

setNumTxs()

Overrides:
Source:

setOrphanStatus()

Overrides:
Source:

setPowHash()

Overrides:
Source:

setPrevHash()

Overrides:
Source:

setReward()

Overrides:
Source:

setSize()

Overrides:
Source:

setTimestamp()

Overrides:
Source:

setTxHashes()

Source:

setTxs()

Source:

setWeight()

Overrides:
Source:

toJson()

Overrides:
Source:

toString()

Overrides:
Source: