Represents a proposer in the blockchain context. A proposer is an entity that proposes new blocks, identified by a public key and an optional system status.
Constructs a new Proposer instance.
Proposer
Indicates if the proposer is a system-level proposer.
Optional
Optional public key if the proposer is not a system entity.
Indicates if the proposer is a system-level entity (without a public key).
Public key of the proposer, defined if the proposer is not a system entity.
Retrieves the public key of the proposer. Throws an error if the proposer is a system entity without a public key.
The public key of the proposer.
Will throw an error if the proposer is a system proposer.
Retrieves the public key of the proposer, if available.
The public key if defined; otherwise, undefined.
undefined
Checks if the proposer is a system-level entity.
true if the proposer is a system entity, otherwise false.
true
false
Serializes the proposer instance to JSON. System proposers are represented as '00'; otherwise, the public key is serialized.
A JSON string representing the proposer.
Static
Deserializes a JSON string to create a Proposer instance.
A new Proposer instance.
Creates a Proposer instance from a string representation.
A string representing the proposer. '00' indicates a system proposer.
Generated using TypeDoc
Represents a proposer in the blockchain context. A proposer is an entity that proposes new blocks, identified by a public key and an optional system status.