1 | import type { BTreeMap, Compact, Enum, Option, Struct, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
2 | import type { ITuple } from '@polkadot/types-codec/types';
|
3 | import type { AccountId, Balance, BlockNumber, Moment, PerU16, Perbill } from '@polkadot/types/interfaces/runtime';
|
4 |
|
5 | export interface ActiveEraInfo extends Struct {
|
6 | readonly index: EraIndex;
|
7 | readonly start: Option<Moment>;
|
8 | }
|
9 |
|
10 | export interface CompactAssignments extends CompactAssignmentsWith16 {
|
11 | }
|
12 |
|
13 | export 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 |
|
32 | export interface CompactAssignmentsTo265 extends CompactAssignmentsWith16 {
|
33 | }
|
34 |
|
35 | export 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 |
|
54 | export 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 |
|
81 | export interface CompactScore extends ITuple<[ValidatorIndex, OffchainAccuracy]> {
|
82 | }
|
83 |
|
84 | export interface CompactScoreCompact extends ITuple<[ValidatorIndexCompact, OffchainAccuracyCompact]> {
|
85 | }
|
86 |
|
87 | export interface ElectionCompute extends Enum {
|
88 | readonly isOnChain: boolean;
|
89 | readonly isSigned: boolean;
|
90 | readonly isUnsigned: boolean;
|
91 | readonly type: 'OnChain' | 'Signed' | 'Unsigned';
|
92 | }
|
93 |
|
94 | export 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 |
|
103 | export 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 |
|
110 | export interface ElectionScore extends Vec<u128> {
|
111 | }
|
112 |
|
113 | export interface ElectionSize extends Struct {
|
114 | readonly validators: Compact<ValidatorIndex>;
|
115 | readonly nominators: Compact<NominatorIndex>;
|
116 | }
|
117 |
|
118 | export interface ElectionStatus extends Enum {
|
119 | readonly isClose: boolean;
|
120 | readonly isOpen: boolean;
|
121 | readonly asOpen: BlockNumber;
|
122 | readonly type: 'Close' | 'Open';
|
123 | }
|
124 |
|
125 | export interface EraIndex extends u32 {
|
126 | }
|
127 |
|
128 | export interface EraPoints extends Struct {
|
129 | readonly total: Points;
|
130 | readonly individual: Vec<Points>;
|
131 | }
|
132 |
|
133 | export interface EraRewardPoints extends Struct {
|
134 | readonly total: RewardPoint;
|
135 | readonly individual: BTreeMap<AccountId, RewardPoint>;
|
136 | }
|
137 |
|
138 | export interface EraRewards extends Struct {
|
139 | readonly total: u32;
|
140 | readonly rewards: Vec<u32>;
|
141 | }
|
142 |
|
143 | export interface Exposure extends Struct {
|
144 | readonly total: Compact<Balance>;
|
145 | readonly own: Compact<Balance>;
|
146 | readonly others: Vec<IndividualExposure>;
|
147 | }
|
148 |
|
149 | export interface ExtendedBalance extends u128 {
|
150 | }
|
151 |
|
152 | export 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 |
|
160 | export interface IndividualExposure extends Struct {
|
161 | readonly who: AccountId;
|
162 | readonly value: Compact<Balance>;
|
163 | }
|
164 |
|
165 | export interface KeyType extends AccountId {
|
166 | }
|
167 |
|
168 | export interface MomentOf extends Moment {
|
169 | }
|
170 |
|
171 | export interface Nominations extends Struct {
|
172 | readonly targets: Vec<AccountId>;
|
173 | readonly submittedIn: EraIndex;
|
174 | readonly suppressed: bool;
|
175 | }
|
176 |
|
177 | export interface NominatorIndex extends u32 {
|
178 | }
|
179 |
|
180 | export interface NominatorIndexCompact extends Compact<NominatorIndex> {
|
181 | }
|
182 |
|
183 | export interface OffchainAccuracy extends PerU16 {
|
184 | }
|
185 |
|
186 | export interface OffchainAccuracyCompact extends Compact<OffchainAccuracy> {
|
187 | }
|
188 |
|
189 | export interface PhragmenScore extends Vec<u128> {
|
190 | }
|
191 |
|
192 | export interface Points extends u32 {
|
193 | }
|
194 |
|
195 | export interface RawSolution extends RawSolutionWith16 {
|
196 | }
|
197 |
|
198 | export interface RawSolutionTo265 extends RawSolutionWith16 {
|
199 | }
|
200 |
|
201 | export interface RawSolutionWith16 extends Struct {
|
202 | readonly compact: CompactAssignmentsWith16;
|
203 | readonly score: ElectionScore;
|
204 | readonly round: u32;
|
205 | }
|
206 |
|
207 | export interface RawSolutionWith24 extends Struct {
|
208 | readonly compact: CompactAssignmentsWith24;
|
209 | readonly score: ElectionScore;
|
210 | readonly round: u32;
|
211 | }
|
212 |
|
213 | export interface ReadySolution extends Struct {
|
214 | readonly supports: SolutionSupports;
|
215 | readonly score: ElectionScore;
|
216 | readonly compute: ElectionCompute;
|
217 | }
|
218 |
|
219 | export 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 |
|
229 | export interface RewardPoint extends u32 {
|
230 | }
|
231 |
|
232 | export interface RoundSnapshot extends Struct {
|
233 | readonly voters: Vec<ITuple<[AccountId, VoteWeight, Vec<AccountId>]>>;
|
234 | readonly targets: Vec<AccountId>;
|
235 | }
|
236 |
|
237 | export interface SeatHolder extends Struct {
|
238 | readonly who: AccountId;
|
239 | readonly stake: Balance;
|
240 | readonly deposit: Balance;
|
241 | }
|
242 |
|
243 | export interface SignedSubmission extends Struct {
|
244 | readonly who: AccountId;
|
245 | readonly deposit: Balance;
|
246 | readonly solution: RawSolution;
|
247 | readonly reward: Balance;
|
248 | }
|
249 |
|
250 | export interface SignedSubmissionOf extends SignedSubmission {
|
251 | }
|
252 |
|
253 | export interface SignedSubmissionTo276 extends Struct {
|
254 | readonly who: AccountId;
|
255 | readonly deposit: Balance;
|
256 | readonly solution: RawSolution;
|
257 | }
|
258 |
|
259 | export interface SlashingSpans extends Struct {
|
260 | readonly spanIndex: SpanIndex;
|
261 | readonly lastStart: EraIndex;
|
262 | readonly lastNonzeroSlash: EraIndex;
|
263 | readonly prior: Vec<EraIndex>;
|
264 | }
|
265 |
|
266 | export interface SlashingSpansTo204 extends Struct {
|
267 | readonly spanIndex: SpanIndex;
|
268 | readonly lastStart: EraIndex;
|
269 | readonly prior: Vec<EraIndex>;
|
270 | }
|
271 |
|
272 | export interface SlashJournalEntry extends Struct {
|
273 | readonly who: AccountId;
|
274 | readonly amount: Balance;
|
275 | readonly ownSlash: Balance;
|
276 | }
|
277 |
|
278 | export interface SolutionOrSnapshotSize extends Struct {
|
279 | readonly voters: Compact<u32>;
|
280 | readonly targets: Compact<u32>;
|
281 | }
|
282 |
|
283 | export interface SolutionSupport extends Struct {
|
284 | readonly total: ExtendedBalance;
|
285 | readonly voters: Vec<ITuple<[AccountId, ExtendedBalance]>>;
|
286 | }
|
287 |
|
288 | export interface SolutionSupports extends Vec<ITuple<[AccountId, SolutionSupport]>> {
|
289 | }
|
290 |
|
291 | export interface SpanIndex extends u32 {
|
292 | }
|
293 |
|
294 | export interface SpanRecord extends Struct {
|
295 | readonly slashed: Balance;
|
296 | readonly paidOut: Balance;
|
297 | }
|
298 |
|
299 | export 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 |
|
307 | export 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 |
|
314 | export 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 |
|
322 | export interface SubmissionIndicesOf extends BTreeMap<ElectionScore, u32> {
|
323 | }
|
324 |
|
325 | export interface Supports extends SolutionSupports {
|
326 | }
|
327 |
|
328 | export 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 |
|
336 | export interface UnappliedSlashOther extends ITuple<[AccountId, Balance]> {
|
337 | }
|
338 |
|
339 | export interface UnlockChunk extends Struct {
|
340 | readonly value: Compact<Balance>;
|
341 | readonly era: Compact<BlockNumber>;
|
342 | }
|
343 |
|
344 | export interface ValidatorIndex extends u16 {
|
345 | }
|
346 |
|
347 | export interface ValidatorIndexCompact extends Compact<ValidatorIndex> {
|
348 | }
|
349 |
|
350 | export interface ValidatorPrefs extends ValidatorPrefsWithBlocked {
|
351 | }
|
352 |
|
353 | export interface ValidatorPrefsTo145 extends Struct {
|
354 | readonly unstakeThreshold: Compact<u32>;
|
355 | readonly validatorPayment: Compact<Balance>;
|
356 | }
|
357 |
|
358 | export interface ValidatorPrefsTo196 extends Struct {
|
359 | readonly validatorPayment: Compact<Balance>;
|
360 | }
|
361 |
|
362 | export interface ValidatorPrefsWithBlocked extends Struct {
|
363 | readonly commission: Compact<Perbill>;
|
364 | readonly blocked: bool;
|
365 | }
|
366 |
|
367 | export interface ValidatorPrefsWithCommission extends Struct {
|
368 | readonly commission: Compact<Perbill>;
|
369 | }
|
370 |
|
371 | export interface Voter extends Struct {
|
372 | readonly votes: Vec<AccountId>;
|
373 | readonly stake: Balance;
|
374 | readonly deposit: Balance;
|
375 | }
|
376 |
|
377 | export interface VoteWeight extends u64 {
|
378 | }
|
379 | export type PHANTOM_STAKING = 'staking';
|