Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
coordinator.phase1_contribution_handler._Phase1State Class Reference

Public Member Functions

def __init__ (self, int num_valid_contributions)
 
None on_valid_contribution (self)
 
str to_json (self)
 

Static Public Member Functions

_Phase1State new ()
 
_Phase1State from_json (str state_json)
 

Public Attributes

 num_valid_contributions
 

Detailed Description

Internal persisted state model for this handler.

Definition at line 69 of file phase1_contribution_handler.py.

Constructor & Destructor Documentation

◆ __init__()

def coordinator.phase1_contribution_handler._Phase1State.__init__ (   self,
int  num_valid_contributions 
)

Definition at line 74 of file phase1_contribution_handler.py.

74  def __init__(self, num_valid_contributions: int):
75  self.num_valid_contributions = num_valid_contributions
76 

Member Function Documentation

◆ from_json()

_Phase1State coordinator.phase1_contribution_handler._Phase1State.from_json ( str  state_json)
static

Definition at line 88 of file phase1_contribution_handler.py.

88  def from_json(state_json: str) -> _Phase1State:
89  return _Phase1State._from_json_dict(json.loads(state_json))
90 

◆ new()

_Phase1State coordinator.phase1_contribution_handler._Phase1State.new ( )
static

Definition at line 78 of file phase1_contribution_handler.py.

78  def new() -> _Phase1State:
79  return _Phase1State(0)
80 

◆ on_valid_contribution()

None coordinator.phase1_contribution_handler._Phase1State.on_valid_contribution (   self)

Definition at line 81 of file phase1_contribution_handler.py.

81  def on_valid_contribution(self) -> None:
82  self.num_valid_contributions = self.num_valid_contributions + 1
83 

◆ to_json()

str coordinator.phase1_contribution_handler._Phase1State.to_json (   self)

Definition at line 84 of file phase1_contribution_handler.py.

84  def to_json(self) -> str:
85  return json.dumps(self._to_json_dict())
86 
Here is the call graph for this function:

Member Data Documentation

◆ num_valid_contributions

coordinator.phase1_contribution_handler._Phase1State.num_valid_contributions

Definition at line 75 of file phase1_contribution_handler.py.


The documentation for this class was generated from the following file: