Constructors
constructor
- new Governor(__namedParameters: object): Governor
-
Parameters
-
__namedParameters: object
Methods
buildCreateProposalTx
- buildCreateProposalTx(options: ProposalOptions): Promise<CreateProposalTx & WithCreator>
-
Parameters
Returns Promise<CreateProposalTx & WithCreator>
buildVoteTx
- buildVoteTx(proposalId: number, selection: VoteOption): Promise<VoteTx & WithCreator>
-
Parameters
-
proposalId: number
-
selection: VoteOption
Returns Promise<VoteTx & WithCreator>
getElectionRuleById
- getElectionRuleById(electionRuleId: number): Promise<ElectionRule>
-
Parameters
Returns Promise<ElectionRule>
getElectionRules
- getElectionRules(electorateId: number): Promise<keyof ElectionRule[]>
-
Parameters
Returns Promise<keyof ElectionRule[]>
getElectorates
- getElectorates(skipFiltering?: boolean): Promise<keyof Electorate[]>
-
Parameters
-
Default value skipFiltering: boolean = false
Returns Promise<keyof Electorate[]>
getProposals
- getProposals(): Promise<keyof Proposal[]>
-
Returns Promise<keyof Proposal[]>
getVotes
- getVotes(): Promise<keyof Vote[]>
-
Returns Promise<keyof Vote[]>
Returns a list of electorates that contain the current governor as one of the electors