@dedot/chaintypes 0.118.0 → 0.120.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.
@@ -23,7 +23,7 @@ export interface VersionedHydrationApi<Rv extends RpcVersion> extends GenericSub
23
23
 
24
24
  /**
25
25
  * @name: HydrationApi
26
- * @specVersion: 314
26
+ * @specVersion: 315
27
27
  **/
28
28
  export interface HydrationApi {
29
29
  legacy: VersionedHydrationApi<RpcLegacy>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.118.0",
3
+ "version": "0.120.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@dedot.dev>",
6
6
  "homepage": "https://dedot.dev",
@@ -25,7 +25,7 @@
25
25
  "directory": "dist"
26
26
  },
27
27
  "license": "Apache-2.0",
28
- "gitHead": "831e8b4394acd49c1539e60809fead3e8af66719",
28
+ "gitHead": "86bfd1d9e960b96833e1f77110da94f438cfeb44",
29
29
  "module": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "exports": {
@@ -96,6 +96,31 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
96
96
  **/
97
97
  [name: string]: any;
98
98
  };
99
+ /**
100
+ * Pallet `MultiBlockMigrations`'s constants
101
+ **/
102
+ multiBlockMigrations: {
103
+ /**
104
+ * The maximal length of an encoded cursor.
105
+ *
106
+ * A good default needs to selected such that no migration will ever have a cursor with MEL
107
+ * above this limit. This is statically checked in `integrity_test`.
108
+ **/
109
+ cursorMaxLen: number;
110
+
111
+ /**
112
+ * The maximal length of an encoded identifier.
113
+ *
114
+ * A good default needs to selected such that no migration will ever have an identifier
115
+ * with MEL above this limit. This is statically checked in `integrity_test`.
116
+ **/
117
+ identifierMaxLen: number;
118
+
119
+ /**
120
+ * Generic pallet constant
121
+ **/
122
+ [name: string]: any;
123
+ };
99
124
  /**
100
125
  * Pallet `Balances`'s constants
101
126
  **/
@@ -436,6 +461,12 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
436
461
  **/
437
462
  byteDeposit: bigint;
438
463
 
464
+ /**
465
+ * The amount held on deposit per registered username. This value should change only in
466
+ * runtime upgrades with proper migration of existing deposits.
467
+ **/
468
+ usernameDeposit: bigint;
469
+
439
470
  /**
440
471
  * The amount held on deposit for a registered subaccount. This should account for the fact
441
472
  * that one storage item's value will increase by the size of an account ID, and there will
@@ -459,6 +490,12 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
459
490
  **/
460
491
  pendingUsernameExpiration: number;
461
492
 
493
+ /**
494
+ * The number of blocks that must pass to enable the permanent deletion of a username by
495
+ * its respective authority.
496
+ **/
497
+ usernameGracePeriod: number;
498
+
462
499
  /**
463
500
  * The maximum length of a suffix.
464
501
  **/
@@ -111,6 +111,20 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
111
111
  **/
112
112
  [error: string]: GenericPalletError<Rv>;
113
113
  };
114
+ /**
115
+ * Pallet `MultiBlockMigrations`'s errors
116
+ **/
117
+ multiBlockMigrations: {
118
+ /**
119
+ * The operation cannot complete since some MBMs are ongoing.
120
+ **/
121
+ Ongoing: GenericPalletError<Rv>;
122
+
123
+ /**
124
+ * Generic pallet error
125
+ **/
126
+ [error: string]: GenericPalletError<Rv>;
127
+ };
114
128
  /**
115
129
  * Pallet `Balances`'s errors
116
130
  **/
@@ -810,6 +824,27 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
810
824
  **/
811
825
  NotExpired: GenericPalletError<Rv>;
812
826
 
827
+ /**
828
+ * The username cannot be removed because it's still in the grace period.
829
+ **/
830
+ TooEarly: GenericPalletError<Rv>;
831
+
832
+ /**
833
+ * The username cannot be removed because it is not unbinding.
834
+ **/
835
+ NotUnbinding: GenericPalletError<Rv>;
836
+
837
+ /**
838
+ * The username cannot be unbound because it is already unbinding.
839
+ **/
840
+ AlreadyUnbinding: GenericPalletError<Rv>;
841
+
842
+ /**
843
+ * The action cannot be performed because of insufficient privileges (e.g. authority
844
+ * trying to unbind a username provided by the system).
845
+ **/
846
+ InsufficientPrivileges: GenericPalletError<Rv>;
847
+
813
848
  /**
814
849
  * Generic pallet error
815
850
  **/
@@ -1,17 +1,18 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainEvents, GenericPalletEvent, RpcVersion } from 'dedot/types';
4
- import type { DispatchInfo, DispatchError, AccountId32, H256, FixedBytes, Result, Bytes } from 'dedot/codecs';
4
+ import type { DispatchError, AccountId32, H256, FixedBytes, Bytes, Result } from 'dedot/codecs';
5
5
  import type {
6
+ FrameSystemDispatchEventInfo,
6
7
  SpWeightsWeightV2Weight,
7
8
  FrameSupportTokensMiscBalanceStatus,
8
- StagingXcmV4TraitsOutcome,
9
- StagingXcmV4Location,
10
- StagingXcmV4Xcm,
11
- StagingXcmV4Response,
9
+ StagingXcmV5TraitsOutcome,
10
+ StagingXcmV5Location,
11
+ StagingXcmV5Xcm,
12
+ StagingXcmV5Response,
12
13
  XcmVersionedAssets,
13
- StagingXcmV4AssetAssets,
14
- XcmV3TraitsError,
14
+ StagingXcmV5AssetAssets,
15
+ XcmV5TraitsError,
15
16
  XcmVersionedLocation,
16
17
  CumulusPrimitivesCoreAggregateMessageOrigin,
17
18
  FrameSupportMessagesProcessMessageError,
@@ -27,7 +28,12 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
27
28
  /**
28
29
  * An extrinsic completed successfully.
29
30
  **/
30
- ExtrinsicSuccess: GenericPalletEvent<Rv, 'System', 'ExtrinsicSuccess', { dispatchInfo: DispatchInfo }>;
31
+ ExtrinsicSuccess: GenericPalletEvent<
32
+ Rv,
33
+ 'System',
34
+ 'ExtrinsicSuccess',
35
+ { dispatchInfo: FrameSystemDispatchEventInfo }
36
+ >;
31
37
 
32
38
  /**
33
39
  * An extrinsic failed.
@@ -36,7 +42,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
36
42
  Rv,
37
43
  'System',
38
44
  'ExtrinsicFailed',
39
- { dispatchError: DispatchError; dispatchInfo: DispatchInfo }
45
+ { dispatchError: DispatchError; dispatchInfo: FrameSystemDispatchEventInfo }
40
46
  >;
41
47
 
42
48
  /**
@@ -123,6 +129,141 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
123
129
  **/
124
130
  [prop: string]: GenericPalletEvent<Rv>;
125
131
  };
132
+ /**
133
+ * Pallet `MultiBlockMigrations`'s events
134
+ **/
135
+ multiBlockMigrations: {
136
+ /**
137
+ * A Runtime upgrade started.
138
+ *
139
+ * Its end is indicated by `UpgradeCompleted` or `UpgradeFailed`.
140
+ **/
141
+ UpgradeStarted: GenericPalletEvent<
142
+ Rv,
143
+ 'MultiBlockMigrations',
144
+ 'UpgradeStarted',
145
+ {
146
+ /**
147
+ * The number of migrations that this upgrade contains.
148
+ *
149
+ * This can be used to design a progress indicator in combination with counting the
150
+ * `MigrationCompleted` and `MigrationSkipped` events.
151
+ **/
152
+ migrations: number;
153
+ }
154
+ >;
155
+
156
+ /**
157
+ * The current runtime upgrade completed.
158
+ *
159
+ * This implies that all of its migrations completed successfully as well.
160
+ **/
161
+ UpgradeCompleted: GenericPalletEvent<Rv, 'MultiBlockMigrations', 'UpgradeCompleted', null>;
162
+
163
+ /**
164
+ * Runtime upgrade failed.
165
+ *
166
+ * This is very bad and will require governance intervention.
167
+ **/
168
+ UpgradeFailed: GenericPalletEvent<Rv, 'MultiBlockMigrations', 'UpgradeFailed', null>;
169
+
170
+ /**
171
+ * A migration was skipped since it was already executed in the past.
172
+ **/
173
+ MigrationSkipped: GenericPalletEvent<
174
+ Rv,
175
+ 'MultiBlockMigrations',
176
+ 'MigrationSkipped',
177
+ {
178
+ /**
179
+ * The index of the skipped migration within the [`Config::Migrations`] list.
180
+ **/
181
+ index: number;
182
+ }
183
+ >;
184
+
185
+ /**
186
+ * A migration progressed.
187
+ **/
188
+ MigrationAdvanced: GenericPalletEvent<
189
+ Rv,
190
+ 'MultiBlockMigrations',
191
+ 'MigrationAdvanced',
192
+ {
193
+ /**
194
+ * The index of the migration within the [`Config::Migrations`] list.
195
+ **/
196
+ index: number;
197
+
198
+ /**
199
+ * The number of blocks that this migration took so far.
200
+ **/
201
+ took: number;
202
+ }
203
+ >;
204
+
205
+ /**
206
+ * A Migration completed.
207
+ **/
208
+ MigrationCompleted: GenericPalletEvent<
209
+ Rv,
210
+ 'MultiBlockMigrations',
211
+ 'MigrationCompleted',
212
+ {
213
+ /**
214
+ * The index of the migration within the [`Config::Migrations`] list.
215
+ **/
216
+ index: number;
217
+
218
+ /**
219
+ * The number of blocks that this migration took so far.
220
+ **/
221
+ took: number;
222
+ }
223
+ >;
224
+
225
+ /**
226
+ * A Migration failed.
227
+ *
228
+ * This implies that the whole upgrade failed and governance intervention is required.
229
+ **/
230
+ MigrationFailed: GenericPalletEvent<
231
+ Rv,
232
+ 'MultiBlockMigrations',
233
+ 'MigrationFailed',
234
+ {
235
+ /**
236
+ * The index of the migration within the [`Config::Migrations`] list.
237
+ **/
238
+ index: number;
239
+
240
+ /**
241
+ * The number of blocks that this migration took so far.
242
+ **/
243
+ took: number;
244
+ }
245
+ >;
246
+
247
+ /**
248
+ * The set of historical migrations has been cleared.
249
+ **/
250
+ HistoricCleared: GenericPalletEvent<
251
+ Rv,
252
+ 'MultiBlockMigrations',
253
+ 'HistoricCleared',
254
+ {
255
+ /**
256
+ * Should be passed to `clear_historic` in a successive call.
257
+ **/
258
+ nextCursor?: Bytes | undefined;
259
+ }
260
+ >;
261
+
262
+ /**
263
+ * Generic pallet event
264
+ **/
265
+ [prop: string]: GenericPalletEvent<Rv>;
266
+ };
126
267
  /**
127
268
  * Pallet `Balances`'s events
128
269
  **/
@@ -395,7 +536,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
395
536
  /**
396
537
  * Execution of an XCM message was attempted.
397
538
  **/
398
- Attempted: GenericPalletEvent<Rv, 'PolkadotXcm', 'Attempted', { outcome: StagingXcmV4TraitsOutcome }>;
539
+ Attempted: GenericPalletEvent<Rv, 'PolkadotXcm', 'Attempted', { outcome: StagingXcmV5TraitsOutcome }>;
399
540
 
400
541
  /**
401
542
  * A XCM message was sent.
@@ -405,9 +546,9 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
405
546
  'PolkadotXcm',
406
547
  'Sent',
407
548
  {
408
- origin: StagingXcmV4Location;
409
- destination: StagingXcmV4Location;
410
- message: StagingXcmV4Xcm;
549
+ origin: StagingXcmV5Location;
550
+ destination: StagingXcmV5Location;
551
+ message: StagingXcmV5Xcm;
411
552
  messageId: FixedBytes<32>;
412
553
  }
413
554
  >;
@@ -421,7 +562,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
421
562
  Rv,
422
563
  'PolkadotXcm',
423
564
  'UnexpectedResponse',
424
- { origin: StagingXcmV4Location; queryId: bigint }
565
+ { origin: StagingXcmV5Location; queryId: bigint }
425
566
  >;
426
567
 
427
568
  /**
@@ -432,7 +573,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
432
573
  Rv,
433
574
  'PolkadotXcm',
434
575
  'ResponseReady',
435
- { queryId: bigint; response: StagingXcmV4Response }
576
+ { queryId: bigint; response: StagingXcmV5Response }
436
577
  >;
437
578
 
438
579
  /**
@@ -496,7 +637,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
496
637
  Rv,
497
638
  'PolkadotXcm',
498
639
  'InvalidResponder',
499
- { origin: StagingXcmV4Location; queryId: bigint; expectedLocation?: StagingXcmV4Location | undefined }
640
+ { origin: StagingXcmV5Location; queryId: bigint; expectedLocation?: StagingXcmV5Location | undefined }
500
641
  >;
501
642
 
502
643
  /**
@@ -512,7 +653,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
512
653
  Rv,
513
654
  'PolkadotXcm',
514
655
  'InvalidResponderVersion',
515
- { origin: StagingXcmV4Location; queryId: bigint }
656
+ { origin: StagingXcmV5Location; queryId: bigint }
516
657
  >;
517
658
 
518
659
  /**
@@ -527,7 +668,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
527
668
  Rv,
528
669
  'PolkadotXcm',
529
670
  'AssetsTrapped',
530
- { hash: H256; origin: StagingXcmV4Location; assets: XcmVersionedAssets }
671
+ { hash: H256; origin: StagingXcmV5Location; assets: XcmVersionedAssets }
531
672
  >;
532
673
 
533
674
  /**
@@ -539,7 +680,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
539
680
  Rv,
540
681
  'PolkadotXcm',
541
682
  'VersionChangeNotified',
542
- { destination: StagingXcmV4Location; result: number; cost: StagingXcmV4AssetAssets; messageId: FixedBytes<32> }
683
+ { destination: StagingXcmV5Location; result: number; cost: StagingXcmV5AssetAssets; messageId: FixedBytes<32> }
543
684
  >;
544
685
 
545
686
  /**
@@ -550,7 +691,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
550
691
  Rv,
551
692
  'PolkadotXcm',
552
693
  'SupportedVersionChanged',
553
- { location: StagingXcmV4Location; version: number }
694
+ { location: StagingXcmV5Location; version: number }
554
695
  >;
555
696
 
556
697
  /**
@@ -561,7 +702,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
561
702
  Rv,
562
703
  'PolkadotXcm',
563
704
  'NotifyTargetSendFail',
564
- { location: StagingXcmV4Location; queryId: bigint; error: XcmV3TraitsError }
705
+ { location: StagingXcmV5Location; queryId: bigint; error: XcmV5TraitsError }
565
706
  >;
566
707
 
567
708
  /**
@@ -588,7 +729,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
588
729
  Rv,
589
730
  'PolkadotXcm',
590
731
  'InvalidQuerierVersion',
591
- { origin: StagingXcmV4Location; queryId: bigint }
732
+ { origin: StagingXcmV5Location; queryId: bigint }
592
733
  >;
593
734
 
594
735
  /**
@@ -601,10 +742,10 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
601
742
  'PolkadotXcm',
602
743
  'InvalidQuerier',
603
744
  {
604
- origin: StagingXcmV4Location;
745
+ origin: StagingXcmV5Location;
605
746
  queryId: bigint;
606
- expectedQuerier: StagingXcmV4Location;
607
- maybeActualQuerier?: StagingXcmV4Location | undefined;
747
+ expectedQuerier: StagingXcmV5Location;
748
+ maybeActualQuerier?: StagingXcmV5Location | undefined;
608
749
  }
609
750
  >;
610
751
 
@@ -616,7 +757,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
616
757
  Rv,
617
758
  'PolkadotXcm',
618
759
  'VersionNotifyStarted',
619
- { destination: StagingXcmV4Location; cost: StagingXcmV4AssetAssets; messageId: FixedBytes<32> }
760
+ { destination: StagingXcmV5Location; cost: StagingXcmV5AssetAssets; messageId: FixedBytes<32> }
620
761
  >;
621
762
 
622
763
  /**
@@ -626,7 +767,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
626
767
  Rv,
627
768
  'PolkadotXcm',
628
769
  'VersionNotifyRequested',
629
- { destination: StagingXcmV4Location; cost: StagingXcmV4AssetAssets; messageId: FixedBytes<32> }
770
+ { destination: StagingXcmV5Location; cost: StagingXcmV5AssetAssets; messageId: FixedBytes<32> }
630
771
  >;
631
772
 
632
773
  /**
@@ -637,7 +778,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
637
778
  Rv,
638
779
  'PolkadotXcm',
639
780
  'VersionNotifyUnrequested',
640
- { destination: StagingXcmV4Location; cost: StagingXcmV4AssetAssets; messageId: FixedBytes<32> }
781
+ { destination: StagingXcmV5Location; cost: StagingXcmV5AssetAssets; messageId: FixedBytes<32> }
641
782
  >;
642
783
 
643
784
  /**
@@ -647,7 +788,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
647
788
  Rv,
648
789
  'PolkadotXcm',
649
790
  'FeesPaid',
650
- { paying: StagingXcmV4Location; fees: StagingXcmV4AssetAssets }
791
+ { paying: StagingXcmV5Location; fees: StagingXcmV5AssetAssets }
651
792
  >;
652
793
 
653
794
  /**
@@ -657,7 +798,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
657
798
  Rv,
658
799
  'PolkadotXcm',
659
800
  'AssetsClaimed',
660
- { hash: H256; origin: StagingXcmV4Location; assets: XcmVersionedAssets }
801
+ { hash: H256; origin: StagingXcmV5Location; assets: XcmVersionedAssets }
661
802
  >;
662
803
 
663
804
  /**
@@ -694,7 +835,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
694
835
  Rv,
695
836
  'CumulusXcm',
696
837
  'ExecutedDownward',
697
- [FixedBytes<32>, StagingXcmV4TraitsOutcome]
838
+ [FixedBytes<32>, StagingXcmV5TraitsOutcome]
698
839
  >;
699
840
 
700
841
  /**
@@ -1033,6 +1174,26 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1033
1174
  { sub: AccountId32; main: AccountId32; deposit: bigint }
1034
1175
  >;
1035
1176
 
1177
+ /**
1178
+ * An account's sub-identities were set (in bulk).
1179
+ **/
1180
+ SubIdentitiesSet: GenericPalletEvent<
1181
+ Rv,
1182
+ 'Identity',
1183
+ 'SubIdentitiesSet',
1184
+ { main: AccountId32; numberOfSubs: number; newDeposit: bigint }
1185
+ >;
1186
+
1187
+ /**
1188
+ * A given sub-account's associated name was changed by its super-identity.
1189
+ **/
1190
+ SubIdentityRenamed: GenericPalletEvent<
1191
+ Rv,
1192
+ 'Identity',
1193
+ 'SubIdentityRenamed',
1194
+ { sub: AccountId32; main: AccountId32 }
1195
+ >;
1196
+
1036
1197
  /**
1037
1198
  * A sub-identity was removed from an identity and the deposit freed.
1038
1199
  **/
@@ -1100,6 +1261,21 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1100
1261
  { who: AccountId32; username: Bytes }
1101
1262
  >;
1102
1263
 
1264
+ /**
1265
+ * A username has been unbound.
1266
+ **/
1267
+ UsernameUnbound: GenericPalletEvent<Rv, 'Identity', 'UsernameUnbound', { username: Bytes }>;
1268
+
1269
+ /**
1270
+ * A username has been removed.
1271
+ **/
1272
+ UsernameRemoved: GenericPalletEvent<Rv, 'Identity', 'UsernameRemoved', { username: Bytes }>;
1273
+
1274
+ /**
1275
+ * A username has been killed.
1276
+ **/
1277
+ UsernameKilled: GenericPalletEvent<Rv, 'Identity', 'UsernameKilled', { username: Bytes }>;
1278
+
1103
1279
  /**
1104
1280
  * Generic pallet event
1105
1281
  **/
@@ -23,7 +23,7 @@ export interface VersionedPaseoPeopleApi<Rv extends RpcVersion> extends GenericS
23
23
 
24
24
  /**
25
25
  * @name: PaseoPeopleApi
26
- * @specVersion: 1004003
26
+ * @specVersion: 1005001
27
27
  **/
28
28
  export interface PaseoPeopleApi {
29
29
  legacy: VersionedPaseoPeopleApi<RpcLegacy>;