Home › Packages › governance

Package governance

This package contains 4 source unit(s) defining 4 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

registry-record-vote #sleela 3.0 (lib/governance/examples/registry-record-vote.sleela)

SLRegistryRecordModelVoteDocument class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
proposalIdString proposalId = "registry-record-model-2026-01"No description in source.
sourceDigestString sourceDigest = "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"No description in source.
voteMethodString voteMethod = "manual-paper"No description in source.
secrecyString secrecy = "secret"No description in source.

SLVoteBallot #sleela 3.0 (lib/governance/SLVoteBallot.sleela)

SLVoteBallot class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
anonymousBallotIdString anonymousBallotIdNo description in source.
choiceString choiceNo description in source.
statusString statusNo description in source.
receivedBeforeCloseboolean receivedBeforeCloseNo description in source.
witnessedByTwoTellersboolean witnessedByTwoTellersNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
recordvoid record(String anonymousId, String markedChoice)No description in source.
validForTallyboolean validForTally()No description in source.

SLVoteProposal #sleela 3.0 (lib/governance/SLVoteProposal.sleela)

SLVoteProposal class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
proposalIdString proposalIdNo description in source.
titleString titleNo description in source.
proposalTextString proposalTextNo description in source.
sourcePathString sourcePathNo description in source.
sourceDigestString sourceDigestNo description in source.
electorateString electorateNo description in source.
eligibilityRuleString eligibilityRuleNo description in source.
opensUtcString opensUtcNo description in source.
closesUtcString closesUtcNo description in source.
ballotMethodString ballotMethodNo description in source.
secrecyString secrecyNo description in source.
countingRuleString countingRuleNo description in source.
tieResultString tieResultNo description in source.
resultPublicationString resultPublicationNo description in source.
optionsSLList optionsNo description in source.
quorumMinimumint quorumMinimumNo description in source.
quorumParticipationPercentint quorumParticipationPercentNo description in source.
tellersRequiredint tellersRequiredNo description in source.
challengeHoursint challengeHoursNo description in source.
abstainCountsForQuorumboolean abstainCountsForQuorumNo description in source.
abstainInApprovalDenominatorboolean abstainInApprovalDenominatorNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String id, String proposalTitle, String frozenDigest)No description in source.
hasFrozenSourceboolean hasFrozenSource()No description in source.
hasWindowFieldsboolean hasWindowFields()No description in source.
hasElectorateboolean hasElectorate()No description in source.
manualSecretProfileboolean manualSecretProfile()No description in source.

SLVoteTally #sleela 3.0 (lib/governance/SLVoteTally.sleela)

SLVoteTally class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
eligibleCountlong eligibleCountNo description in source.
approveCountlong approveCountNo description in source.
rejectCountlong rejectCountNo description in source.
abstainCountlong abstainCountNo description in source.
invalidCountlong invalidCountNo description in source.
validBallotCountlong validBallotCountNo description in source.
quorumRequiredlong quorumRequiredNo description in source.
quorumMetboolean quorumMetNo description in source.
certifiedboolean certifiedNo description in source.
adoptedboolean adoptedNo description in source.
methodString methodNo description in source.
certificateReferenceString certificateReferenceNo description in source.
challengeStateString challengeStateNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
resetvoid reset()No description in source.
calculateQuorumvoid calculateQuorum(long absoluteMinimum, int participationPercent,No description in source.
strictMajorityPassesboolean strictMajorityPasses()No description in source.
twoThirdsPassesboolean twoThirdsPasses()No description in source.
certifyvoid certify(String reference)No description in source.