c14efbca1dcf314c73cc294cbbf1bd63e3906b20d35442943eb92f52e383fc38
Contract interface exposed by this module
Contract: election
Init:
Parameter:
{
"admin_account": "<AccountAddress>",
"candidates": [
{
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
}
],
"decryption_deadline": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"delegation_string": "<String>",
"election_description": "<String>",
"election_end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"election_manifest": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"election_parameters": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"election_start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"eligible_voters": {
"data": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"parameters": {
"end_time": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"start_time": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
}
},
"guardians": [
"<AccountAddress>"
]
}
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
Methods:
- "postDecryptionProofResponseShare"
Parameter:
[
"<UInt8>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "postDecryptionShare"
Parameter:
[
"<UInt8>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "postElectionResult"
Parameter:
[
"<UInt64>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "postEncryptedTally"
Parameter:
[
"<UInt8>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "registerGuardianEncryptedShare"
Parameter:
[
"<UInt8>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "registerGuardianPublicKey"
Parameter:
[
"<UInt8>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "registerGuardianStatus"
Parameter:
{
"Enum": [
{
"KeyVerificationFailed": [
[
"<AccountAddress>"
]
]
},
{
"SharesVerificationFailed": [
[
"<AccountAddress>"
]
]
},
{
"VerificationSuccessful": []
}
]
}
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "registerVotes"
Parameter:
"<String with lowercase hex>"
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "resetFinalizationPhase"
Parameter:
[
[
"<AccountAddress>"
],
"<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
]
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
- "viewConfig"
Return value:
{
"admin_account": "<AccountAddress>",
"candidates": [
{
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
}
],
"decryption_deadline": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"delegation_string": "<String>",
"election_description": "<String>",
"election_end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"election_manifest": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"election_parameters": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"election_start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"eligible_voters": {
"data": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"parameters": {
"end_time": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"start_time": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>"
}
},
"guardian_accounts": [
"<AccountAddress>"
]
}
- "viewElectionResult"
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
Return value:
{
"Enum": [
{
"None": []
},
{
"Some": [
[
{
"candidate": {
"hash": "<String of size 64 containing lowercase hex characters.>",
"url": "<String>"
},
"cummulative_votes": "<UInt64>"
}
]
]
}
]
}
- "viewEncryptedTally"
Error:
{
"Enum": [
{
"ParseParams": []
},
{
"Unauthorized": []
},
{
"Malformed": []
},
{
"IncorrectElectionPhase": []
},
{
"DuplicateEntry": []
},
{
"GuardianExcluded": []
}
]
}
Return value:
{
"Enum": [
{
"None": []
},
{
"Some": [
[
"<UInt8>"
]
]
}
]
}
- "viewGuardiansState"
Return value:
[
[
"<AccountAddress>",
{
"decryption_share": {
"Enum": [
{
"None": []
},
{
"Some": [
[
"<UInt8>"
]
]
}
]
},
"decryption_share_proof": {
"Enum": [
{
"None": []
},
{
"Some": [
[
"<UInt8>"
]
]
}
]
},
"encrypted_share": {
"Enum": [
{
"None": []
},
{
"Some": [
[
"<UInt8>"
]
]
}
]
},
"excluded": "<Bool>",
"index": "<UInt32>",
"public_key": {
"Enum": [
{
"None": []
},
{
"Some": [
[
"<UInt8>"
]
]
}
]
},
"status": {
"Enum": [
{
"None": []
},
{
"Some": [
{
"Enum": [
{
"KeyVerificationFailed": [
[
"<AccountAddress>"
]
]
},
{
"SharesVerificationFailed": [
[
"<AccountAddress>"
]
]
},
{
"VerificationSuccessful": []
}
]
}
]
}
]
}
}
]
]