helium_py.api.blocks.Blocks¶
- class helium_py.api.blocks.Blocks(host=None, port=None, user_agent=None, base_path=None)[source]¶
Bases:
APIBlocks client class for Helium Blockchain API.
https://docs.helium.com/api/blockchain/blocks
- __init__(host=None, port=None, user_agent=None, base_path=None)¶
Allow for overriding API details at instantiation.
Methods
__init__([host, port, user_agent, base_path])Allow for overriding API details at instantiation.
all()Yield all block descriptions.
Return block descriptor for block with provided hash.
get_block_descriptor_for_height(height)Return block descriptor for block at height.
get_height(params)Return the current height of the blockchain.
Return stats for block production time.
Yield transactions for block with provided hash.
get_transactions_for_height(height)Yield transactions for block at height.
Attributes
base_pathReturn a client singleton per API.
hostportuser_agent- get_block_descriptor_for_hash(hash: str) dict[source]¶
Return block descriptor for block with provided hash.
- get_block_descriptor_for_height(height: int) dict[source]¶
Return block descriptor for block at height.