nimiqclient.models.block.MicroBlock¶
- class nimiqclient.models.block.MicroBlock(number, batch, type, bodyHash, epoch, extraData, hash, parentHash, size, version, network, timestamp, producer, stateHash, historyHash, seed, forkProofs=None, justification=None, equivocationProofs=None, transactions=[])[source]¶
Bases:
BlockBlock 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.
producer (BlockProducer) – Producer 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.
forkProof (dict) – Fork proof of the block.
justification (BlockJustification) – Justification of the block
equivocationProofs (List of EquivocationProof) – Equivocation proofs of the block
transactions (list of (Transaction or str)) – List of transactions. Either represented by the transaction hash or a Transaction object.
Methods
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