UNPKG

16.2 kBTypeScriptView Raw
1import type { BTreeMap, Compact, Enum, Option, Struct, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
2import type { ITuple } from '@polkadot/types-codec/types';
3import type { AccountId, Balance, BlockNumber, Moment, PerU16, Perbill } from '@polkadot/types/interfaces/runtime';
4/** @name ActiveEraInfo */
5export interface ActiveEraInfo extends Struct {
6 readonly index: EraIndex;
7 readonly start: Option<Moment>;
8}
9/** @name CompactAssignments */
10export interface CompactAssignments extends CompactAssignmentsWith16 {
11}
12/** @name CompactAssignmentsTo257 */
13export interface CompactAssignmentsTo257 extends Struct {
14 readonly votes1: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
15 readonly votes2: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
16 readonly votes3: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
17 readonly votes4: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
18 readonly votes5: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
19 readonly votes6: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
20 readonly votes7: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
21 readonly votes8: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
22 readonly votes9: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
23 readonly votes10: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
24 readonly votes11: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
25 readonly votes12: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
26 readonly votes13: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
27 readonly votes14: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
28 readonly votes15: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
29 readonly votes16: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
30}
31/** @name CompactAssignmentsTo265 */
32export interface CompactAssignmentsTo265 extends CompactAssignmentsWith16 {
33}
34/** @name CompactAssignmentsWith16 */
35export interface CompactAssignmentsWith16 extends Struct {
36 readonly votes1: Vec<ITuple<[NominatorIndexCompact, ValidatorIndexCompact]>>;
37 readonly votes2: Vec<ITuple<[NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact]>>;
38 readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
39 readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
40 readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
41 readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
42 readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
43 readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
44 readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
45 readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
46 readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
47 readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
48 readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
49 readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
50 readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
51 readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
52}
53/** @name CompactAssignmentsWith24 */
54export interface CompactAssignmentsWith24 extends Struct {
55 readonly votes1: Vec<ITuple<[NominatorIndexCompact, ValidatorIndexCompact]>>;
56 readonly votes2: Vec<ITuple<[NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact]>>;
57 readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
58 readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
59 readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
60 readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
61 readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
62 readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
63 readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
64 readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
65 readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
66 readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
67 readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
68 readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
69 readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
70 readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
71 readonly votes17: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
72 readonly votes18: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
73 readonly votes19: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
74 readonly votes20: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
75 readonly votes21: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
76 readonly votes22: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
77 readonly votes23: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
78 readonly votes24: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
79}
80/** @name CompactScore */
81export interface CompactScore extends ITuple<[ValidatorIndex, OffchainAccuracy]> {
82}
83/** @name CompactScoreCompact */
84export interface CompactScoreCompact extends ITuple<[ValidatorIndexCompact, OffchainAccuracyCompact]> {
85}
86/** @name ElectionCompute */
87export interface ElectionCompute extends Enum {
88 readonly isOnChain: boolean;
89 readonly isSigned: boolean;
90 readonly isUnsigned: boolean;
91 readonly type: 'OnChain' | 'Signed' | 'Unsigned';
92}
93/** @name ElectionPhase */
94export interface ElectionPhase extends Enum {
95 readonly isOff: boolean;
96 readonly isSigned: boolean;
97 readonly isUnsigned: boolean;
98 readonly asUnsigned: ITuple<[bool, BlockNumber]>;
99 readonly isEmergency: boolean;
100 readonly type: 'Off' | 'Signed' | 'Unsigned' | 'Emergency';
101}
102/** @name ElectionResult */
103export interface ElectionResult extends Struct {
104 readonly compute: ElectionCompute;
105 readonly slotStake: Balance;
106 readonly electedStashes: Vec<AccountId>;
107 readonly exposures: Vec<ITuple<[AccountId, Exposure]>>;
108}
109/** @name ElectionScore */
110export interface ElectionScore extends Vec<u128> {
111}
112/** @name ElectionSize */
113export interface ElectionSize extends Struct {
114 readonly validators: Compact<ValidatorIndex>;
115 readonly nominators: Compact<NominatorIndex>;
116}
117/** @name ElectionStatus */
118export interface ElectionStatus extends Enum {
119 readonly isClose: boolean;
120 readonly isOpen: boolean;
121 readonly asOpen: BlockNumber;
122 readonly type: 'Close' | 'Open';
123}
124/** @name EraIndex */
125export interface EraIndex extends u32 {
126}
127/** @name EraPoints */
128export interface EraPoints extends Struct {
129 readonly total: Points;
130 readonly individual: Vec<Points>;
131}
132/** @name EraRewardPoints */
133export interface EraRewardPoints extends Struct {
134 readonly total: RewardPoint;
135 readonly individual: BTreeMap<AccountId, RewardPoint>;
136}
137/** @name EraRewards */
138export interface EraRewards extends Struct {
139 readonly total: u32;
140 readonly rewards: Vec<u32>;
141}
142/** @name Exposure */
143export interface Exposure extends Struct {
144 readonly total: Compact<Balance>;
145 readonly own: Compact<Balance>;
146 readonly others: Vec<IndividualExposure>;
147}
148/** @name ExtendedBalance */
149export interface ExtendedBalance extends u128 {
150}
151/** @name Forcing */
152export interface Forcing extends Enum {
153 readonly isNotForcing: boolean;
154 readonly isForceNew: boolean;
155 readonly isForceNone: boolean;
156 readonly isForceAlways: boolean;
157 readonly type: 'NotForcing' | 'ForceNew' | 'ForceNone' | 'ForceAlways';
158}
159/** @name IndividualExposure */
160export interface IndividualExposure extends Struct {
161 readonly who: AccountId;
162 readonly value: Compact<Balance>;
163}
164/** @name KeyType */
165export interface KeyType extends AccountId {
166}
167/** @name MomentOf */
168export interface MomentOf extends Moment {
169}
170/** @name Nominations */
171export interface Nominations extends Struct {
172 readonly targets: Vec<AccountId>;
173 readonly submittedIn: EraIndex;
174 readonly suppressed: bool;
175}
176/** @name NominatorIndex */
177export interface NominatorIndex extends u32 {
178}
179/** @name NominatorIndexCompact */
180export interface NominatorIndexCompact extends Compact<NominatorIndex> {
181}
182/** @name OffchainAccuracy */
183export interface OffchainAccuracy extends PerU16 {
184}
185/** @name OffchainAccuracyCompact */
186export interface OffchainAccuracyCompact extends Compact<OffchainAccuracy> {
187}
188/** @name PhragmenScore */
189export interface PhragmenScore extends Vec<u128> {
190}
191/** @name Points */
192export interface Points extends u32 {
193}
194/** @name RawSolution */
195export interface RawSolution extends RawSolutionWith16 {
196}
197/** @name RawSolutionTo265 */
198export interface RawSolutionTo265 extends RawSolutionWith16 {
199}
200/** @name RawSolutionWith16 */
201export interface RawSolutionWith16 extends Struct {
202 readonly compact: CompactAssignmentsWith16;
203 readonly score: ElectionScore;
204 readonly round: u32;
205}
206/** @name RawSolutionWith24 */
207export interface RawSolutionWith24 extends Struct {
208 readonly compact: CompactAssignmentsWith24;
209 readonly score: ElectionScore;
210 readonly round: u32;
211}
212/** @name ReadySolution */
213export interface ReadySolution extends Struct {
214 readonly supports: SolutionSupports;
215 readonly score: ElectionScore;
216 readonly compute: ElectionCompute;
217}
218/** @name RewardDestination */
219export interface RewardDestination extends Enum {
220 readonly isStaked: boolean;
221 readonly isStash: boolean;
222 readonly isController: boolean;
223 readonly isAccount: boolean;
224 readonly asAccount: AccountId;
225 readonly isNone: boolean;
226 readonly type: 'Staked' | 'Stash' | 'Controller' | 'Account' | 'None';
227}
228/** @name RewardPoint */
229export interface RewardPoint extends u32 {
230}
231/** @name RoundSnapshot */
232export interface RoundSnapshot extends Struct {
233 readonly voters: Vec<ITuple<[AccountId, VoteWeight, Vec<AccountId>]>>;
234 readonly targets: Vec<AccountId>;
235}
236/** @name SeatHolder */
237export interface SeatHolder extends Struct {
238 readonly who: AccountId;
239 readonly stake: Balance;
240 readonly deposit: Balance;
241}
242/** @name SignedSubmission */
243export interface SignedSubmission extends Struct {
244 readonly who: AccountId;
245 readonly deposit: Balance;
246 readonly solution: RawSolution;
247 readonly reward: Balance;
248}
249/** @name SignedSubmissionOf */
250export interface SignedSubmissionOf extends SignedSubmission {
251}
252/** @name SignedSubmissionTo276 */
253export interface SignedSubmissionTo276 extends Struct {
254 readonly who: AccountId;
255 readonly deposit: Balance;
256 readonly solution: RawSolution;
257}
258/** @name SlashingSpans */
259export interface SlashingSpans extends Struct {
260 readonly spanIndex: SpanIndex;
261 readonly lastStart: EraIndex;
262 readonly lastNonzeroSlash: EraIndex;
263 readonly prior: Vec<EraIndex>;
264}
265/** @name SlashingSpansTo204 */
266export interface SlashingSpansTo204 extends Struct {
267 readonly spanIndex: SpanIndex;
268 readonly lastStart: EraIndex;
269 readonly prior: Vec<EraIndex>;
270}
271/** @name SlashJournalEntry */
272export interface SlashJournalEntry extends Struct {
273 readonly who: AccountId;
274 readonly amount: Balance;
275 readonly ownSlash: Balance;
276}
277/** @name SolutionOrSnapshotSize */
278export interface SolutionOrSnapshotSize extends Struct {
279 readonly voters: Compact<u32>;
280 readonly targets: Compact<u32>;
281}
282/** @name SolutionSupport */
283export interface SolutionSupport extends Struct {
284 readonly total: ExtendedBalance;
285 readonly voters: Vec<ITuple<[AccountId, ExtendedBalance]>>;
286}
287/** @name SolutionSupports */
288export interface SolutionSupports extends Vec<ITuple<[AccountId, SolutionSupport]>> {
289}
290/** @name SpanIndex */
291export interface SpanIndex extends u32 {
292}
293/** @name SpanRecord */
294export interface SpanRecord extends Struct {
295 readonly slashed: Balance;
296 readonly paidOut: Balance;
297}
298/** @name StakingLedger */
299export interface StakingLedger extends Struct {
300 readonly stash: AccountId;
301 readonly total: Compact<Balance>;
302 readonly active: Compact<Balance>;
303 readonly unlocking: Vec<UnlockChunk>;
304 readonly claimedRewards: Vec<EraIndex>;
305}
306/** @name StakingLedgerTo223 */
307export interface StakingLedgerTo223 extends Struct {
308 readonly stash: AccountId;
309 readonly total: Compact<Balance>;
310 readonly active: Compact<Balance>;
311 readonly unlocking: Vec<UnlockChunk>;
312}
313/** @name StakingLedgerTo240 */
314export interface StakingLedgerTo240 extends Struct {
315 readonly stash: AccountId;
316 readonly total: Compact<Balance>;
317 readonly active: Compact<Balance>;
318 readonly unlocking: Vec<UnlockChunk>;
319 readonly lastReward: Option<EraIndex>;
320}
321/** @name SubmissionIndicesOf */
322export interface SubmissionIndicesOf extends BTreeMap<ElectionScore, u32> {
323}
324/** @name Supports */
325export interface Supports extends SolutionSupports {
326}
327/** @name UnappliedSlash */
328export interface UnappliedSlash extends Struct {
329 readonly validator: AccountId;
330 readonly own: Balance;
331 readonly others: Vec<UnappliedSlashOther>;
332 readonly reporters: Vec<AccountId>;
333 readonly payout: Balance;
334}
335/** @name UnappliedSlashOther */
336export interface UnappliedSlashOther extends ITuple<[AccountId, Balance]> {
337}
338/** @name UnlockChunk */
339export interface UnlockChunk extends Struct {
340 readonly value: Compact<Balance>;
341 readonly era: Compact<BlockNumber>;
342}
343/** @name ValidatorIndex */
344export interface ValidatorIndex extends u16 {
345}
346/** @name ValidatorIndexCompact */
347export interface ValidatorIndexCompact extends Compact<ValidatorIndex> {
348}
349/** @name ValidatorPrefs */
350export interface ValidatorPrefs extends ValidatorPrefsWithBlocked {
351}
352/** @name ValidatorPrefsTo145 */
353export interface ValidatorPrefsTo145 extends Struct {
354 readonly unstakeThreshold: Compact<u32>;
355 readonly validatorPayment: Compact<Balance>;
356}
357/** @name ValidatorPrefsTo196 */
358export interface ValidatorPrefsTo196 extends Struct {
359 readonly validatorPayment: Compact<Balance>;
360}
361/** @name ValidatorPrefsWithBlocked */
362export interface ValidatorPrefsWithBlocked extends Struct {
363 readonly commission: Compact<Perbill>;
364 readonly blocked: bool;
365}
366/** @name ValidatorPrefsWithCommission */
367export interface ValidatorPrefsWithCommission extends Struct {
368 readonly commission: Compact<Perbill>;
369}
370/** @name Voter */
371export interface Voter extends Struct {
372 readonly votes: Vec<AccountId>;
373 readonly stake: Balance;
374 readonly deposit: Balance;
375}
376/** @name VoteWeight */
377export interface VoteWeight extends u64 {
378}
379export type PHANTOM_STAKING = 'staking';