nimiqclient.models.block.MacroBlock

class nimiqclient.models.block.MacroBlock(number, batch, type, bodyHash, epoch, extraData, hash, parentHash, size, version, network, timestamp, seed, stateHash, historyHash, isElectionBlock, parentElectionHash, interlink, slots=None, lostRewardSet=None, disabledSet=None, justification=None, transactions=[])[source]

Bases: Block

Block returned by the server.

Parameters:
  • number (int) – Height of the block.

  • batch (int) – Batch number of the block.

  • type (BlockType) – The BlockType associated with the block.

  • bodyHash (str) – Hash of the body of the block.

  • epoch (int) – Epoch number of the block.

  • extraData (str) – Extra data of the block.

  • hash (str) – Hash of the block.

  • parentHash (str) – Hash of the parent of the block.

  • size (int) – Size of the block

  • version (int) – Version of the block

  • network (int) – Network ID of the block

  • timestamp (int) – Timestamp of the block.

  • seed (BlockSeed) – Seeds for the block.

  • stateHash (str) – Hash of the state of the block.

  • historyHash (str) – Hash of the history of the block.

  • isElectionBlock (bool) – Indicates whether the block is an election macro block.

  • parentElectionHash (str) – Parent election hash of the macro block.

  • interlink (str) – The block interlink.

  • slots (list) – Slots for the block

  • lostRewardSet (list) – Set of lost rewards of the block.

  • disabledRewardSet (list) – Set of disabled rewards of the block.

  • justification (BlockJustification) – Justification of the block

  • transactions (list of(Transaction or str)) – List of transactions. Either represented by the transaction hash or a Transaction object.

Methods

get_block

Get the specific block type from the dictionary data.

static get_block(data)

Get the specific block type from the dictionary data.

Parameters:

data (dict) – The dictionary containing the data.

Returns:

Block object.

Return type:

Block or MicroBlock or MacroBlock