Consensus

Consensus

class Consensus(**kwargs)

Implements the consensus api endpoints.

deployment_flags(**kwargs) → List[pystratis.api.consensus.responsemodels.deploymentflagsmodel.DeploymentFlagsModel]

Get the active deployment flags.

Parameters:**kwargs – Extra keyword arguments.
Returns:A list of active deployment flags..
Return type:List[DeploymentFlagsModel]
Raises:APIError – Error thrown by node API. See message for details.
get_best_blockhash(**kwargs) → pystratis.core.types.uint256.uint256

Gets the best block hash.

Parameters:**kwargs – Extra keyword arguments.
Returns:The block hash.
Return type:uint256
Raises:APIError – Error thrown by node API. See message for details.
get_blockhash(height: int, **kwargs) → pystratis.core.types.uint256.uint256

Gets the block hash at the specified block

Parameters:
  • height (int) – The requested height for block hash retrieval.
  • **kwargs – Extra keyword arguments.
Returns:

The block hash.

Return type:

uint256

Raises:

APIError – Error thrown by node API. See message for details.

DeploymentFlagsModel

class DeploymentFlagsModel

A pydantic model representing deployment flags.