UNPKG

1.45 kBTypeScriptView Raw
1import type { GenericVote } from '@polkadot/types';
2import type { Compact, Enum, Struct, u32 } from '@polkadot/types-codec';
3import type { AccountId, Balance } from '@polkadot/types/interfaces/runtime';
4/** @name ApprovalFlag */
5export interface ApprovalFlag extends u32 {
6}
7/** @name DefunctVoter */
8export interface DefunctVoter extends Struct {
9 readonly who: AccountId;
10 readonly voteCount: Compact<u32>;
11 readonly candidateCount: Compact<u32>;
12}
13/** @name Renouncing */
14export interface Renouncing extends Enum {
15 readonly isMember: boolean;
16 readonly isRunnerUp: boolean;
17 readonly isCandidate: boolean;
18 readonly asCandidate: Compact<u32>;
19 readonly type: 'Member' | 'RunnerUp' | 'Candidate';
20}
21/** @name SetIndex */
22export interface SetIndex extends u32 {
23}
24/** @name Vote */
25export interface Vote extends GenericVote {
26}
27/** @name VoteIndex */
28export interface VoteIndex extends u32 {
29}
30/** @name VoterInfo */
31export interface VoterInfo extends Struct {
32 readonly lastActive: VoteIndex;
33 readonly lastWin: VoteIndex;
34 readonly pot: Balance;
35 readonly stake: Balance;
36}
37/** @name VoteThreshold */
38export interface VoteThreshold extends Enum {
39 readonly isSuperMajorityApprove: boolean;
40 readonly isSuperMajorityAgainst: boolean;
41 readonly isSimpleMajority: boolean;
42 readonly type: 'SuperMajorityApprove' | 'SuperMajorityAgainst' | 'SimpleMajority';
43}
44export type PHANTOM_ELECTIONS = 'elections';