# 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:
  - src/main/js/daemon/model/MoneroBlock.js, line 13

### Extends

- MoneroBlockHeader

### Methods

#### copy()

Overrides:
  - MoneroBlockHeader#copy
Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 80

#### getCumulativeDifficulty()

Overrides:
  - MoneroBlockHeader#getCumulativeDifficulty
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 127

#### getDepth()

Overrides:
  - MoneroBlockHeader#getDepth
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 109

#### getDifficulty()

Overrides:
  - MoneroBlockHeader#getDifficulty
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 118

#### getHash()

Overrides:
  - MoneroBlockHeader#getHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 44

#### getHeight() → {number}

Return the block's height which is the total number of blocks that have occurred before.

Overrides:
  - MoneroBlockHeader#getHeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 58

##### Returns:

the block's height

Type
  number

#### getHex()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 44

#### getLongTermWeight()

Overrides:
  - MoneroBlockHeader#getLongTermWeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 100

#### getMajorVersion()

Overrides:
  - MoneroBlockHeader#getMajorVersion
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 136

#### getMinerTx()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 53

#### getMinerTxHash()

Overrides:
  - MoneroBlockHeader#getMinerTxHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 163

#### getMinorVersion()

Overrides:
  - MoneroBlockHeader#getMinorVersion
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 145

#### getNonce()

Overrides:
  - MoneroBlockHeader#getNonce
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 154

#### getNumTxs()

Overrides:
  - MoneroBlockHeader#getNumTxs
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 172

#### getOrphanStatus()

Overrides:
  - MoneroBlockHeader#getOrphanStatus
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 181

#### getPowHash()

Overrides:
  - MoneroBlockHeader#getPowHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 208

#### getPrevHash()

Overrides:
  - MoneroBlockHeader#getPrevHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 190

#### getReward()

Overrides:
  - MoneroBlockHeader#getReward
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 199

#### getSize()

Overrides:
  - MoneroBlockHeader#getSize
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 82

#### getTimestamp()

Overrides:
  - MoneroBlockHeader#getTimestamp
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 73

#### getTxHashes()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 71

#### getTxs()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 62

#### getWeight()

Overrides:
  - MoneroBlockHeader#getWeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 91

#### merge()

Overrides:
  - MoneroBlockHeader#merge
Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 94

#### setCumulativeDifficulty()

Overrides:
  - MoneroBlockHeader#setCumulativeDifficulty
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 131

#### setDepth()

Overrides:
  - MoneroBlockHeader#setDepth
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 113

#### setDifficulty()

Overrides:
  - MoneroBlockHeader#setDifficulty
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 122

#### setHash()

Overrides:
  - MoneroBlockHeader#setHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 48

#### 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:
  - MoneroBlockHeader#setHeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 68

##### Returns:

a reference to this header for chaining

Type
  MoneroBlockHeader

#### setHex()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 48

#### setLongTermWeight()

Overrides:
  - MoneroBlockHeader#setLongTermWeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 104

#### setMajorVersion()

Overrides:
  - MoneroBlockHeader#setMajorVersion
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 140

#### setMinerTx()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 57

#### setMinerTxHash()

Overrides:
  - MoneroBlockHeader#setMinerTxHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 167

#### setMinorVersion()

Overrides:
  - MoneroBlockHeader#setMinorVersion
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 149

#### setNonce()

Overrides:
  - MoneroBlockHeader#setNonce
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 158

#### setNumTxs()

Overrides:
  - MoneroBlockHeader#setNumTxs
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 176

#### setOrphanStatus()

Overrides:
  - MoneroBlockHeader#setOrphanStatus
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 185

#### setPowHash()

Overrides:
  - MoneroBlockHeader#setPowHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 212

#### setPrevHash()

Overrides:
  - MoneroBlockHeader#setPrevHash
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 194

#### setReward()

Overrides:
  - MoneroBlockHeader#setReward
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 203

#### setSize()

Overrides:
  - MoneroBlockHeader#setSize
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 86

#### setTimestamp()

Overrides:
  - MoneroBlockHeader#setTimestamp
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 77

#### setTxHashes()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 75

#### setTxs()

Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 66

#### setWeight()

Overrides:
  - MoneroBlockHeader#setWeight
Source:
  - src/main/js/daemon/model/MoneroBlockHeader.js, line 95

#### toJson()

Overrides:
  - MoneroBlockHeader#toJson
Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 84

#### toString()

Overrides:
  - MoneroBlockHeader#toString
Source:
  - src/main/js/daemon/model/MoneroBlock.js, line 123