@dedot/chaintypes 0.62.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.62.0",
3
+ "version": "0.63.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@coongcrafts.io>",
6
6
  "main": "",
@@ -19,7 +19,7 @@
19
19
  "directory": "dist"
20
20
  },
21
21
  "license": "Apache-2.0",
22
- "gitHead": "66764e8f9ab8a8e289b80b64edd49c6765323564",
22
+ "gitHead": "71547dbbb53b1882770753c4d30013ea4fccb5e0",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -8,7 +8,7 @@ import type {
8
8
  SpWeightsRuntimeDbWeight,
9
9
  SpWeightsWeightV2Weight,
10
10
  FrameSupportPalletId,
11
- PalletReferendaTrackInfo,
11
+ PalletReferendaTrack,
12
12
  StagingXcmV5Junctions,
13
13
  } from './types';
14
14
 
@@ -216,10 +216,9 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
216
216
  * Number of eras to keep in history.
217
217
  *
218
218
  * Following information is kept for eras in `[current_era -
219
- * HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
220
- * `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
221
- * `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,
222
- * `ErasStakersOverview`.
219
+ * HistoryDepth, current_era]`: `ErasValidatorPrefs`, `ErasValidatorReward`,
220
+ * `ErasRewardPoints`, `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`,
221
+ * `ErasStakersPaged`, `ErasStakersOverview`.
223
222
  *
224
223
  * Must be more than the number of eras delayed by session.
225
224
  * I.e. active era must always be in history. I.e. `active_era >
@@ -269,6 +268,14 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
269
268
  **/
270
269
  maxExposurePageSize: number;
271
270
 
271
+ /**
272
+ * The absolute maximum of winner validators this pallet should return.
273
+ *
274
+ * As this pallet supports multi-block election, the set of winner validators *per
275
+ * election* is bounded by this type.
276
+ **/
277
+ maxValidatorSet: number;
278
+
272
279
  /**
273
280
  * The maximum number of `unlocking` chunks a [`StakingLedger`] can
274
281
  * have. Effectively determines how many unique eras a staker may be
@@ -283,6 +290,16 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
283
290
  **/
284
291
  maxUnlockingChunks: number;
285
292
 
293
+ /**
294
+ * Maximum number of invulnerable validators.
295
+ **/
296
+ maxInvulnerables: number;
297
+
298
+ /**
299
+ * Maximum number of disabled validators.
300
+ **/
301
+ maxDisabledValidators: number;
302
+
286
303
  /**
287
304
  * Generic pallet constant
288
305
  **/
@@ -690,12 +707,18 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
690
707
  signedDepositWeight: bigint;
691
708
 
692
709
  /**
693
- * The maximum number of winners that can be elected by this `ElectionProvider`
694
- * implementation.
710
+ * Maximum number of winners that an election supports.
695
711
  *
696
712
  * Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
697
713
  **/
698
714
  maxWinners: number;
715
+
716
+ /**
717
+ * Maximum number of voters that can support a winner in an election solution.
718
+ *
719
+ * This is needed to ensure election computation is bounded.
720
+ **/
721
+ maxBackersPerWinner: number;
699
722
  minerMaxLength: number;
700
723
  minerMaxWeight: SpWeightsWeightV2Weight;
701
724
  minerMaxVotesPerVoter: number;
@@ -863,11 +886,7 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
863
886
  * automatic referendum status changes. Explicit servicing instructions are unaffected.
864
887
  **/
865
888
  alarmInterval: number;
866
-
867
- /**
868
- * Information concerning the different referendum tracks.
869
- **/
870
- tracks: Array<[number, PalletReferendaTrackInfo]>;
889
+ tracks: Array<PalletReferendaTrack>;
871
890
 
872
891
  /**
873
892
  * Generic pallet constant
@@ -228,9 +228,9 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
228
228
  DuplicateIndex: GenericPalletError<Rv>;
229
229
 
230
230
  /**
231
- * Slash record index out of bounds.
231
+ * Slash record not found.
232
232
  **/
233
- InvalidSlashIndex: GenericPalletError<Rv>;
233
+ InvalidSlashRecord: GenericPalletError<Rv>;
234
234
 
235
235
  /**
236
236
  * Cannot have a validator or nominator role, with value less than the minimum defined by
@@ -264,11 +264,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
264
264
  **/
265
265
  InvalidNumberOfNominations: GenericPalletError<Rv>;
266
266
 
267
- /**
268
- * Items are not sorted and unique.
269
- **/
270
- NotSortedAndUnique: GenericPalletError<Rv>;
271
-
272
267
  /**
273
268
  * Rewards for this era have already been claimed for this validator.
274
269
  **/
@@ -356,6 +351,27 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
356
351
  **/
357
352
  VirtualStakerNotAllowed: GenericPalletError<Rv>;
358
353
 
354
+ /**
355
+ * Stash could not be reaped as other pallet might depend on it.
356
+ **/
357
+ CannotReapStash: GenericPalletError<Rv>;
358
+
359
+ /**
360
+ * The stake of this account is already migrated to `Fungible` holds.
361
+ **/
362
+ AlreadyMigrated: GenericPalletError<Rv>;
363
+
364
+ /**
365
+ * Era not yet started.
366
+ **/
367
+ EraNotStarted: GenericPalletError<Rv>;
368
+
369
+ /**
370
+ * Account is restricted from participation in staking. This may happen if the account is
371
+ * staking in another way already, such as via pool.
372
+ **/
373
+ Restricted: GenericPalletError<Rv>;
374
+
359
375
  /**
360
376
  * Generic pallet error
361
377
  **/
@@ -1239,6 +1255,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1239
1255
  **/
1240
1256
  NothingToSlash: GenericPalletError<Rv>;
1241
1257
 
1258
+ /**
1259
+ * The slash amount is too low to be applied.
1260
+ **/
1261
+ SlashTooLow: GenericPalletError<Rv>;
1262
+
1242
1263
  /**
1243
1264
  * The pool or member delegation has already migrated to delegate stake.
1244
1265
  **/
@@ -1254,6 +1275,12 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1254
1275
  **/
1255
1276
  NotSupported: GenericPalletError<Rv>;
1256
1277
 
1278
+ /**
1279
+ * Account is restricted from participation in pools. This may happen if the account is
1280
+ * staking in another way already.
1281
+ **/
1282
+ Restricted: GenericPalletError<Rv>;
1283
+
1257
1284
  /**
1258
1285
  * Generic pallet error
1259
1286
  **/
@@ -2055,6 +2082,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2055
2082
  **/
2056
2083
  SpotPriceHigherThanMaxAmount: GenericPalletError<Rv>;
2057
2084
 
2085
+ /**
2086
+ * The account doesn't have enough credits to purchase on-demand coretime.
2087
+ **/
2088
+ InsufficientCredits: GenericPalletError<Rv>;
2089
+
2058
2090
  /**
2059
2091
  * Generic pallet error
2060
2092
  **/
@@ -2197,6 +2229,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2197
2229
  **/
2198
2230
  ExceedsMaxMessageSize: GenericPalletError<Rv>;
2199
2231
 
2232
+ /**
2233
+ * A DMP message couldn't be sent because the destination is unreachable.
2234
+ **/
2235
+ Unroutable: GenericPalletError<Rv>;
2236
+
2200
2237
  /**
2201
2238
  * Could not schedule para cleanup.
2202
2239
  **/
@@ -1,7 +1,7 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainEvents, GenericPalletEvent, RpcVersion } from 'dedot/types';
4
- import type { DispatchError, AccountId32, H256, Perbill, FixedBytes, Bytes, Result, FixedU128 } from 'dedot/codecs';
4
+ import type { DispatchError, AccountId32, H256, Result, Perbill, FixedBytes, Bytes, FixedU128 } from 'dedot/codecs';
5
5
  import type {
6
6
  FrameSystemDispatchEventInfo,
7
7
  FrameSupportTokensMiscBalanceStatus,
@@ -19,6 +19,7 @@ import type {
19
19
  PalletNominationPoolsPoolState,
20
20
  PalletNominationPoolsCommissionChangeRate,
21
21
  PalletNominationPoolsCommissionClaimPermission,
22
+ PalletNominationPoolsClaimPermission,
22
23
  PalletConvictionVotingVoteAccountVote,
23
24
  FrameSupportPreimagesBounded,
24
25
  PalletConvictionVotingTally,
@@ -303,17 +304,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
303
304
  **/
304
305
  Slashed: GenericPalletEvent<Rv, 'Staking', 'Slashed', { staker: AccountId32; amount: bigint }>;
305
306
 
306
- /**
307
- * A slash for the given validator, for the given percentage of their stake, at the given
308
- * era as been reported.
309
- **/
310
- SlashReported: GenericPalletEvent<
311
- Rv,
312
- 'Staking',
313
- 'SlashReported',
314
- { validator: AccountId32; fraction: Perbill; slashEra: number }
315
- >;
316
-
317
307
  /**
318
308
  * An old slashing report from a prior era was discarded because it could
319
309
  * not be processed.
@@ -393,10 +383,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
393
383
  * Targets size limit reached.
394
384
  **/
395
385
  SnapshotTargetsSizeExceeded: GenericPalletEvent<Rv, 'Staking', 'SnapshotTargetsSizeExceeded', { size: number }>;
396
-
397
- /**
398
- * A new force era mode was set.
399
- **/
400
386
  ForceEra: GenericPalletEvent<Rv, 'Staking', 'ForceEra', { mode: PalletStakingForcing }>;
401
387
 
402
388
  /**
@@ -404,6 +390,66 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
404
390
  **/
405
391
  ControllerBatchDeprecated: GenericPalletEvent<Rv, 'Staking', 'ControllerBatchDeprecated', { failures: number }>;
406
392
 
393
+ /**
394
+ * Staking balance migrated from locks to holds, with any balance that could not be held
395
+ * is force withdrawn.
396
+ **/
397
+ CurrencyMigrated: GenericPalletEvent<
398
+ Rv,
399
+ 'Staking',
400
+ 'CurrencyMigrated',
401
+ { stash: AccountId32; forceWithdraw: bigint }
402
+ >;
403
+
404
+ /**
405
+ * A page from a multi-page election was fetched. A number of these are followed by
406
+ * `StakersElected`.
407
+ *
408
+ * `Ok(count)` indicates the give number of stashes were added.
409
+ * `Err(index)` indicates that the stashes after index were dropped.
410
+ * `Err(0)` indicates that an error happened but no stashes were dropped nor added.
411
+ *
412
+ * The error indicates that a number of validators were dropped due to excess size, but
413
+ * the overall election will continue.
414
+ **/
415
+ PagedElectionProceeded: GenericPalletEvent<
416
+ Rv,
417
+ 'Staking',
418
+ 'PagedElectionProceeded',
419
+ { page: number; result: Result<number, number> }
420
+ >;
421
+
422
+ /**
423
+ * An offence for the given validator, for the given percentage of their stake, at the
424
+ * given era as been reported.
425
+ **/
426
+ OffenceReported: GenericPalletEvent<
427
+ Rv,
428
+ 'Staking',
429
+ 'OffenceReported',
430
+ { offenceEra: number; validator: AccountId32; fraction: Perbill }
431
+ >;
432
+
433
+ /**
434
+ * An offence has been processed and the corresponding slash has been computed.
435
+ **/
436
+ SlashComputed: GenericPalletEvent<
437
+ Rv,
438
+ 'Staking',
439
+ 'SlashComputed',
440
+ { offenceEra: number; slashEra: number; offender: AccountId32; page: number }
441
+ >;
442
+
443
+ /**
444
+ * An unapplied slash has been cancelled.
445
+ **/
446
+ SlashCancelled: GenericPalletEvent<
447
+ Rv,
448
+ 'Staking',
449
+ 'SlashCancelled',
450
+ { slashEra: number; slashKey: [AccountId32, Perbill, number]; payout: bigint }
451
+ >;
452
+
407
453
  /**
408
454
  * Generic pallet event
409
455
  **/
@@ -471,6 +517,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
471
517
  **/
472
518
  NewSession: GenericPalletEvent<Rv, 'Session', 'NewSession', { sessionIndex: number }>;
473
519
 
520
+ /**
521
+ * Validator has been disabled.
522
+ **/
523
+ ValidatorDisabled: GenericPalletEvent<Rv, 'Session', 'ValidatorDisabled', { validator: AccountId32 }>;
524
+
525
+ /**
526
+ * Validator has been re-enabled.
527
+ **/
528
+ ValidatorReenabled: GenericPalletEvent<Rv, 'Session', 'ValidatorReenabled', { validator: AccountId32 }>;
529
+
474
530
  /**
475
531
  * Generic pallet event
476
532
  **/
@@ -540,6 +596,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
540
596
  **/
541
597
  DispatchedAs: GenericPalletEvent<Rv, 'Utility', 'DispatchedAs', { result: Result<[], DispatchError> }>;
542
598
 
599
+ /**
600
+ * Main call was dispatched.
601
+ **/
602
+ IfElseMainSuccess: GenericPalletEvent<Rv, 'Utility', 'IfElseMainSuccess', null>;
603
+
604
+ /**
605
+ * The fallback call was dispatched.
606
+ **/
607
+ IfElseFallbackCalled: GenericPalletEvent<Rv, 'Utility', 'IfElseFallbackCalled', { mainError: DispatchError }>;
608
+
543
609
  /**
544
610
  * Generic pallet event
545
611
  **/
@@ -1352,6 +1418,64 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1352
1418
  { poolId: number; amount: bigint }
1353
1419
  >;
1354
1420
 
1421
+ /**
1422
+ * A pool member's claim permission has been updated.
1423
+ **/
1424
+ MemberClaimPermissionUpdated: GenericPalletEvent<
1425
+ Rv,
1426
+ 'NominationPools',
1427
+ 'MemberClaimPermissionUpdated',
1428
+ { member: AccountId32; permission: PalletNominationPoolsClaimPermission }
1429
+ >;
1430
+
1431
+ /**
1432
+ * A pool's metadata was updated.
1433
+ **/
1434
+ MetadataUpdated: GenericPalletEvent<
1435
+ Rv,
1436
+ 'NominationPools',
1437
+ 'MetadataUpdated',
1438
+ { poolId: number; caller: AccountId32 }
1439
+ >;
1440
+
1441
+ /**
1442
+ * A pool's nominating account (or the pool's root account) has nominated a validator set
1443
+ * on behalf of the pool.
1444
+ **/
1445
+ PoolNominationMade: GenericPalletEvent<
1446
+ Rv,
1447
+ 'NominationPools',
1448
+ 'PoolNominationMade',
1449
+ { poolId: number; caller: AccountId32 }
1450
+ >;
1451
+
1452
+ /**
1453
+ * The pool is chilled i.e. no longer nominating.
1454
+ **/
1455
+ PoolNominatorChilled: GenericPalletEvent<
1456
+ Rv,
1457
+ 'NominationPools',
1458
+ 'PoolNominatorChilled',
1459
+ { poolId: number; caller: AccountId32 }
1460
+ >;
1461
+
1462
+ /**
1463
+ * Global parameters regulating nomination pools have been updated.
1464
+ **/
1465
+ GlobalParamsUpdated: GenericPalletEvent<
1466
+ Rv,
1467
+ 'NominationPools',
1468
+ 'GlobalParamsUpdated',
1469
+ {
1470
+ minJoinBond: bigint;
1471
+ minCreateBond: bigint;
1472
+ maxPools?: number | undefined;
1473
+ maxMembers?: number | undefined;
1474
+ maxMembersPerPool?: number | undefined;
1475
+ globalMaxCommission?: Perbill | undefined;
1476
+ }
1477
+ >;
1478
+
1355
1479
  /**
1356
1480
  * Generic pallet event
1357
1481
  **/
@@ -1414,7 +1538,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1414
1538
  Undelegated: GenericPalletEvent<Rv, 'ConvictionVoting', 'Undelegated', AccountId32>;
1415
1539
 
1416
1540
  /**
1417
- * An account that has voted
1541
+ * An account has voted
1418
1542
  **/
1419
1543
  Voted: GenericPalletEvent<
1420
1544
  Rv,
@@ -1424,7 +1548,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1424
1548
  >;
1425
1549
 
1426
1550
  /**
1427
- * A vote that been removed
1551
+ * A vote has been removed
1428
1552
  **/
1429
1553
  VoteRemoved: GenericPalletEvent<
1430
1554
  Rv,
@@ -1433,6 +1557,11 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1433
1557
  { who: AccountId32; vote: PalletConvictionVotingVoteAccountVote }
1434
1558
  >;
1435
1559
 
1560
+ /**
1561
+ * The lockup period of a conviction vote expired, and the funds have been unlocked.
1562
+ **/
1563
+ VoteUnlocked: GenericPalletEvent<Rv, 'ConvictionVoting', 'VoteUnlocked', { who: AccountId32; class: number }>;
1564
+
1436
1565
  /**
1437
1566
  * Generic pallet event
1438
1567
  **/
@@ -2230,6 +2359,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2230
2359
  **/
2231
2360
  SpotPriceSet: GenericPalletEvent<Rv, 'OnDemandAssignmentProvider', 'SpotPriceSet', { spotPrice: bigint }>;
2232
2361
 
2362
+ /**
2363
+ * An account was given credits.
2364
+ **/
2365
+ AccountCredited: GenericPalletEvent<
2366
+ Rv,
2367
+ 'OnDemandAssignmentProvider',
2368
+ 'AccountCredited',
2369
+ { who: AccountId32; amount: bigint }
2370
+ >;
2371
+
2233
2372
  /**
2234
2373
  * Generic pallet event
2235
2374
  **/
@@ -23,7 +23,7 @@ export interface VersionedWestendApi<Rv extends RpcVersion> extends GenericSubst
23
23
 
24
24
  /**
25
25
  * @name: WestendApi
26
- * @specVersion: 1017001
26
+ * @specVersion: 1018000
27
27
  **/
28
28
  export interface WestendApi {
29
29
  legacy: VersionedWestendApi<RpcLegacy>;
@@ -57,6 +57,7 @@ export type ChainJsonRpcApis<Rv extends RpcVersion> = Pick<
57
57
  | 'mmr_root'
58
58
  | 'mmr_verifyProof'
59
59
  | 'mmr_verifyProofStateless'
60
+ | 'offchain_localStorageClear'
60
61
  | 'offchain_localStorageGet'
61
62
  | 'offchain_localStorageSet'
62
63
  | 'payment_queryFeeDetails'