nimiqclient.models.block.Block¶
- class nimiqclient.models.block.Block(number, batch, type, bodyHash, epoch, extraData, hash, parentHash, size, version, network, timestamp, seed, stateHash, historyHash)[source]¶
Bases:
objectBlock returned by the server.
- Parameters:
number (int) – Height of the block.
batch (int) – Batch number of the block.
type (BlockType) – The block type associated with the block.
bodyHash (str) – Hash of the block body.
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.
Methods
Get the specific block type from the dictionary data.
- static get_block(data)[source]¶
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