@dedot/chaintypes 0.122.0 → 0.131.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.
Files changed (53) hide show
  1. package/astar/consts.d.ts +0 -9
  2. package/astar/index.d.ts +1 -1
  3. package/astar/query.d.ts +0 -15
  4. package/hydration/consts.d.ts +29 -0
  5. package/hydration/errors.d.ts +172 -10
  6. package/hydration/events.d.ts +105 -0
  7. package/hydration/index.d.ts +1 -1
  8. package/hydration/json-rpc.d.ts +1 -0
  9. package/hydration/query.d.ts +50 -0
  10. package/hydration/tx.d.ts +408 -0
  11. package/hydration/types.d.ts +695 -12
  12. package/kusama/consts.d.ts +27 -7
  13. package/kusama/errors.d.ts +51 -4
  14. package/kusama/events.d.ts +212 -4
  15. package/kusama/index.d.ts +1 -1
  16. package/kusama/query.d.ts +44 -19
  17. package/kusama/runtime.d.ts +22 -0
  18. package/kusama/tx.d.ts +377 -25
  19. package/kusama/types.d.ts +638 -80
  20. package/kusama-asset-hub/consts.d.ts +98 -2
  21. package/kusama-asset-hub/errors.d.ts +314 -12
  22. package/kusama-asset-hub/events.d.ts +157 -3
  23. package/kusama-asset-hub/index.d.ts +1 -1
  24. package/kusama-asset-hub/query.d.ts +113 -6
  25. package/kusama-asset-hub/runtime.d.ts +217 -1
  26. package/kusama-asset-hub/tx.d.ts +581 -1
  27. package/kusama-asset-hub/types.d.ts +1086 -26
  28. package/moonbeam/index.d.ts +1 -1
  29. package/package.json +2 -2
  30. package/polkadot/consts.d.ts +23 -5
  31. package/polkadot/errors.d.ts +51 -4
  32. package/polkadot/events.d.ts +207 -4
  33. package/polkadot/index.d.ts +1 -1
  34. package/polkadot/query.d.ts +44 -19
  35. package/polkadot/runtime.d.ts +22 -0
  36. package/polkadot/tx.d.ts +376 -24
  37. package/polkadot/types.d.ts +630 -78
  38. package/westend/consts.d.ts +28 -9
  39. package/westend/errors.d.ts +21 -37
  40. package/westend/events.d.ts +25 -49
  41. package/westend/index.d.ts +1 -1
  42. package/westend/query.d.ts +40 -70
  43. package/westend/runtime.d.ts +7 -0
  44. package/westend/tx.d.ts +77 -124
  45. package/westend/types.d.ts +228 -328
  46. package/westend-asset-hub/consts.d.ts +41 -14
  47. package/westend-asset-hub/errors.d.ts +12 -96
  48. package/westend-asset-hub/events.d.ts +29 -81
  49. package/westend-asset-hub/index.d.ts +1 -1
  50. package/westend-asset-hub/query.d.ts +61 -125
  51. package/westend-asset-hub/runtime.d.ts +47 -1
  52. package/westend-asset-hub/tx.d.ts +97 -549
  53. package/westend-asset-hub/types.d.ts +489 -958
@@ -324,6 +324,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
324
324
  * Pallet `Session`'s constants
325
325
  **/
326
326
  session: {
327
+ /**
328
+ * The amount to be held when setting keys.
329
+ **/
330
+ keyDeposit: bigint;
331
+
327
332
  /**
328
333
  * Generic pallet constant
329
334
  **/
@@ -768,6 +773,14 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
768
773
  **/
769
774
  bagThresholds: Array<bigint>;
770
775
 
776
+ /**
777
+ * Maximum number of accounts that may be re-bagged automatically in `on_idle`.
778
+ *
779
+ * A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables
780
+ * the feature.
781
+ **/
782
+ maxAutoRebagPerBlock: number;
783
+
771
784
  /**
772
785
  * Generic pallet constant
773
786
  **/
@@ -1299,12 +1312,27 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
1299
1312
  * Pallet `XcmPallet`'s constants
1300
1313
  **/
1301
1314
  xcmPallet: {
1315
+ /**
1316
+ * This chain's Universal Location.
1317
+ **/
1318
+ universalLocation: StagingXcmV5Junctions;
1319
+
1302
1320
  /**
1303
1321
  * The latest supported version that we advertise. Generally just set it to
1304
1322
  * `pallet_xcm::CurrentXcmVersion`.
1305
1323
  **/
1306
1324
  advertisedXcmVersion: number;
1307
1325
 
1326
+ /**
1327
+ * The maximum number of local XCM locks that a single account may have.
1328
+ **/
1329
+ maxLockers: number;
1330
+
1331
+ /**
1332
+ * The maximum number of consumers a single remote lock may have.
1333
+ **/
1334
+ maxRemoteLockConsumers: number;
1335
+
1308
1336
  /**
1309
1337
  * Generic pallet constant
1310
1338
  **/
@@ -1446,13 +1474,4 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
1446
1474
  **/
1447
1475
  [name: string]: any;
1448
1476
  };
1449
- /**
1450
- * Pallet `RcMigrator`'s constants
1451
- **/
1452
- rcMigrator: {
1453
- /**
1454
- * Generic pallet constant
1455
- **/
1456
- [name: string]: any;
1457
- };
1458
1477
  }
@@ -1865,6 +1865,21 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1865
1865
  **/
1866
1866
  InvalidCode: GenericPalletError<Rv>;
1867
1867
 
1868
+ /**
1869
+ * No upgrade authorized.
1870
+ **/
1871
+ NothingAuthorized: GenericPalletError<Rv>;
1872
+
1873
+ /**
1874
+ * The submitted code is not authorized.
1875
+ **/
1876
+ Unauthorized: GenericPalletError<Rv>;
1877
+
1878
+ /**
1879
+ * Invalid block number.
1880
+ **/
1881
+ InvalidBlockNumber: GenericPalletError<Rv>;
1882
+
1868
1883
  /**
1869
1884
  * Generic pallet error
1870
1885
  **/
@@ -2687,6 +2702,12 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2687
2702
  **/
2688
2703
  AliasNotFound: GenericPalletError<Rv>;
2689
2704
 
2705
+ /**
2706
+ * Local XCM execution incomplete with the actual XCM error and the index of the
2707
+ * instruction that caused the error.
2708
+ **/
2709
+ LocalExecutionIncompleteWithError: GenericPalletError<Rv>;
2710
+
2690
2711
  /**
2691
2712
  * Generic pallet error
2692
2713
  **/
@@ -2854,43 +2875,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2854
2875
  **/
2855
2876
  InvalidConfiguration: GenericPalletError<Rv>;
2856
2877
 
2857
- /**
2858
- * Generic pallet error
2859
- **/
2860
- [error: string]: GenericPalletError<Rv>;
2861
- };
2862
- /**
2863
- * Pallet `RcMigrator`'s errors
2864
- **/
2865
- rcMigrator: {
2866
- Unreachable: GenericPalletError<Rv>;
2867
- OutOfWeight: GenericPalletError<Rv>;
2868
-
2869
- /**
2870
- * Failed to send XCM message to AH.
2871
- **/
2872
- XcmError: GenericPalletError<Rv>;
2873
-
2874
- /**
2875
- * Failed to withdraw account from RC for migration to AH.
2876
- **/
2877
- FailedToWithdrawAccount: GenericPalletError<Rv>;
2878
-
2879
- /**
2880
- * Indicates that the specified block number is in the past.
2881
- **/
2882
- PastBlockNumber: GenericPalletError<Rv>;
2883
-
2884
- /**
2885
- * Balance accounting overflow.
2886
- **/
2887
- BalanceOverflow: GenericPalletError<Rv>;
2888
-
2889
- /**
2890
- * Balance accounting underflow.
2891
- **/
2892
- BalanceUnderflow: GenericPalletError<Rv>;
2893
-
2894
2878
  /**
2895
2879
  * Generic pallet error
2896
2880
  **/
@@ -51,7 +51,6 @@ import type {
51
51
  StagingXcmV5AssetAssets,
52
52
  PolkadotRuntimeParachainsInclusionAggregateMessageOrigin,
53
53
  FrameSupportMessagesProcessMessageError,
54
- PalletRcMigratorMigrationStage,
55
54
  } from './types.js';
56
55
 
57
56
  export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<Rv> {
@@ -2283,6 +2282,31 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2283
2282
  }
2284
2283
  >;
2285
2284
 
2285
+ /**
2286
+ * A new code hash has been authorized for a Para.
2287
+ **/
2288
+ CodeAuthorized: GenericPalletEvent<
2289
+ Rv,
2290
+ 'Paras',
2291
+ 'CodeAuthorized',
2292
+ {
2293
+ /**
2294
+ * Para
2295
+ **/
2296
+ paraId: PolkadotParachainPrimitivesPrimitivesId;
2297
+
2298
+ /**
2299
+ * Authorized code hash.
2300
+ **/
2301
+ codeHash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash;
2302
+
2303
+ /**
2304
+ * Block at which authorization expires and will be removed.
2305
+ **/
2306
+ expireAt: number;
2307
+ }
2308
+ >;
2309
+
2286
2310
  /**
2287
2311
  * Generic pallet event
2288
2312
  **/
@@ -3472,54 +3496,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
3472
3496
  { who: AccountId32; identity: bigint; subs: bigint }
3473
3497
  >;
3474
3498
 
3475
- /**
3476
- * Generic pallet event
3477
- **/
3478
- [prop: string]: GenericPalletEvent<Rv>;
3479
- };
3480
- /**
3481
- * Pallet `RcMigrator`'s events
3482
- **/
3483
- rcMigrator: {
3484
- /**
3485
- * A stage transition has occurred.
3486
- **/
3487
- StageTransition: GenericPalletEvent<
3488
- Rv,
3489
- 'RcMigrator',
3490
- 'StageTransition',
3491
- {
3492
- /**
3493
- * The old stage before the transition.
3494
- **/
3495
- old: PalletRcMigratorMigrationStage;
3496
-
3497
- /**
3498
- * The new stage after the transition.
3499
- **/
3500
- new: PalletRcMigratorMigrationStage;
3501
- }
3502
- >;
3503
-
3504
- /**
3505
- * The Asset Hub Migration started and is active until `AssetHubMigrationFinished` is
3506
- * emitted.
3507
- *
3508
- * This event is equivalent to `StageTransition { new: Initializing, .. }` but is easier
3509
- * to understand. The activation is immediate and affects all events happening
3510
- * afterwards.
3511
- **/
3512
- AssetHubMigrationStarted: GenericPalletEvent<Rv, 'RcMigrator', 'AssetHubMigrationStarted', null>;
3513
-
3514
- /**
3515
- * The Asset Hub Migration finished.
3516
- *
3517
- * This event is equivalent to `StageTransition { new: MigrationDone, .. }` but is easier
3518
- * to understand. The finishing is immediate and affects all events happening
3519
- * afterwards.
3520
- **/
3521
- AssetHubMigrationFinished: GenericPalletEvent<Rv, 'RcMigrator', 'AssetHubMigrationFinished', null>;
3522
-
3523
3499
  /**
3524
3500
  * Generic pallet event
3525
3501
  **/
@@ -23,7 +23,7 @@ export interface VersionedWestendApi<Rv extends RpcVersion> extends GenericSubst
23
23
 
24
24
  /**
25
25
  * @name: WestendApi
26
- * @specVersion: 1018011
26
+ * @specVersion: 1018013
27
27
  **/
28
28
  export interface WestendApi {
29
29
  legacy: VersionedWestendApi<RpcLegacy>;
@@ -107,6 +107,7 @@ import type {
107
107
  PolkadotRuntimeParachainsParasParaLifecycle,
108
108
  PolkadotParachainPrimitivesPrimitivesHeadData,
109
109
  PolkadotRuntimeParachainsParasParaPastCodeMeta,
110
+ PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry,
110
111
  PolkadotPrimitivesV8UpgradeGoAhead,
111
112
  PolkadotPrimitivesV8UpgradeRestriction,
112
113
  PolkadotRuntimeParachainsParasParaGenesisArgs,
@@ -122,7 +123,7 @@ import type {
122
123
  PolkadotPrimitivesV8ExecutorParams,
123
124
  PolkadotPrimitivesV8DisputeState,
124
125
  PolkadotCorePrimitivesCandidateHash,
125
- PolkadotPrimitivesV8SlashingPendingSlashes,
126
+ PolkadotPrimitivesVstagingPendingSlashes,
126
127
  PolkadotRuntimeParachainsOnDemandTypesCoreAffinityCount,
127
128
  PolkadotRuntimeParachainsOnDemandTypesQueueStatusType,
128
129
  BinaryHeapEnqueuedOrder,
@@ -133,7 +134,7 @@ import type {
133
134
  PolkadotRuntimeCommonAssignedSlotsParachainTemporarySlot,
134
135
  PalletStakingAsyncRcClientValidatorSetReport,
135
136
  PalletStakingAsyncAhClientOperatingMode,
136
- PalletStakingAsyncRcClientOffence,
137
+ PalletStakingAsyncAhClientBufferedOffence,
137
138
  PalletMigrationsMigrationCursor,
138
139
  PalletXcmQueryStatus,
139
140
  XcmVersionedLocation,
@@ -148,9 +149,6 @@ import type {
148
149
  PolkadotRuntimeCommonImplsVersionedLocatableAsset,
149
150
  SpConsensusBeefyEcdsaCryptoPublic,
150
151
  SpConsensusBeefyMmrBeefyAuthoritySet,
151
- PalletRcMigratorMigrationStage,
152
- PalletRcMigratorAccountsAccountState,
153
- PalletRcMigratorAccountsMigratedBalances,
154
152
  } from './types.js';
155
153
 
156
154
  export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage<Rv> {
@@ -1858,6 +1856,14 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1858
1856
  **/
1859
1857
  listBags: GenericStorageQuery<Rv, (arg: bigint) => PalletBagsListListBag | undefined, bigint>;
1860
1858
 
1859
+ /**
1860
+ * Pointer that remembers the next node that will be auto-rebagged.
1861
+ * When `None`, the next scan will start from the list head again.
1862
+ *
1863
+ * @param {Callback<AccountId32 | undefined> =} callback
1864
+ **/
1865
+ nextNodeAutoRebagged: GenericStorageQuery<Rv, () => AccountId32 | undefined>;
1866
+
1861
1867
  /**
1862
1868
  * Lock all updates to this pallet.
1863
1869
  *
@@ -2696,6 +2702,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2696
2702
  PolkadotParachainPrimitivesPrimitivesId
2697
2703
  >;
2698
2704
 
2705
+ /**
2706
+ * The code hash authorizations for a para which will expire `expire_at` `BlockNumberFor<T>`.
2707
+ *
2708
+ * @param {PolkadotParachainPrimitivesPrimitivesId} arg
2709
+ * @param {Callback<PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry | undefined> =} callback
2710
+ **/
2711
+ authorizedCodeHash: GenericStorageQuery<
2712
+ Rv,
2713
+ (
2714
+ arg: PolkadotParachainPrimitivesPrimitivesId,
2715
+ ) => PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry | undefined,
2716
+ PolkadotParachainPrimitivesPrimitivesId
2717
+ >;
2718
+
2699
2719
  /**
2700
2720
  * This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade
2701
2721
  * procedure.
@@ -3219,11 +3239,11 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3219
3239
  * Validators pending dispute slashes.
3220
3240
  *
3221
3241
  * @param {[number, PolkadotCorePrimitivesCandidateHash]} arg
3222
- * @param {Callback<PolkadotPrimitivesV8SlashingPendingSlashes | undefined> =} callback
3242
+ * @param {Callback<PolkadotPrimitivesVstagingPendingSlashes | undefined> =} callback
3223
3243
  **/
3224
3244
  unappliedSlashes: GenericStorageQuery<
3225
3245
  Rv,
3226
- (arg: [number, PolkadotCorePrimitivesCandidateHash]) => PolkadotPrimitivesV8SlashingPendingSlashes | undefined,
3246
+ (arg: [number, PolkadotCorePrimitivesCandidateHash]) => PolkadotPrimitivesVstagingPendingSlashes | undefined,
3227
3247
  [number, PolkadotCorePrimitivesCandidateHash]
3228
3248
  >;
3229
3249
 
@@ -3662,19 +3682,23 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3662
3682
  validatorSetAppliedAt: GenericStorageQuery<Rv, () => number | undefined>;
3663
3683
 
3664
3684
  /**
3665
- * Stores offences that have been received while the pallet is in [`OperatingMode::Buffered`]
3666
- * mode.
3685
+ * Offences collected while in [`OperatingMode::Buffered`] mode.
3686
+ *
3687
+ * These are temporarily stored and sent once the pallet switches to [`OperatingMode::Active`].
3688
+ * For each offender, only the highest `slash_fraction` is kept.
3667
3689
  *
3668
- * These offences are collected and buffered for later processing when the pallet transitions
3669
- * to [`OperatingMode::Active`]. This allows the system to defer slashing or reporting logic
3670
- * until communication with the counterpart pallet on AssetHub is fully established.
3690
+ * Internally stores as a nested BTreeMap:
3691
+ * `session_index -> (offender -> (reporter, slash_fraction))`.
3671
3692
  *
3672
- * This storage is only used in `Buffered` mode; in `Active` mode, offences are immediately
3673
- * sent, and in `Passive` mode, they are delegated to the [`Config::Fallback`] implementation.
3693
+ * Note: While the [`rc_client::Offence`] type includes a list of reporters, in practice there
3694
+ * is only one. In this pallet, we assume this is the case and store only the first reporter.
3674
3695
  *
3675
- * @param {Callback<Array<[number, Array<PalletStakingAsyncRcClientOffence>]>> =} callback
3696
+ * @param {Callback<Array<[number, Array<[AccountId32, PalletStakingAsyncAhClientBufferedOffence]>]>> =} callback
3676
3697
  **/
3677
- bufferedOffences: GenericStorageQuery<Rv, () => Array<[number, Array<PalletStakingAsyncRcClientOffence>]>>;
3698
+ bufferedOffences: GenericStorageQuery<
3699
+ Rv,
3700
+ () => Array<[number, Array<[AccountId32, PalletStakingAsyncAhClientBufferedOffence]>]>
3701
+ >;
3678
3702
 
3679
3703
  /**
3680
3704
  * Generic pallet storage query
@@ -4049,60 +4073,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
4049
4073
  **/
4050
4074
  beefyNextAuthorities: GenericStorageQuery<Rv, () => SpConsensusBeefyMmrBeefyAuthoritySet>;
4051
4075
 
4052
- /**
4053
- * Generic pallet storage query
4054
- **/
4055
- [storage: string]: GenericStorageQuery<Rv>;
4056
- };
4057
- /**
4058
- * Pallet `RcMigrator`'s storage queries
4059
- **/
4060
- rcMigrator: {
4061
- /**
4062
- * The Relay Chain migration state.
4063
- *
4064
- * @param {Callback<PalletRcMigratorMigrationStage> =} callback
4065
- **/
4066
- rcMigrationStage: GenericStorageQuery<Rv, () => PalletRcMigratorMigrationStage>;
4067
-
4068
- /**
4069
- * Helper storage item to obtain and store the known accounts that should be kept partially or
4070
- * fully on Relay Chain.
4071
- *
4072
- * @param {AccountId32Like} arg
4073
- * @param {Callback<PalletRcMigratorAccountsAccountState | undefined> =} callback
4074
- **/
4075
- rcAccounts: GenericStorageQuery<
4076
- Rv,
4077
- (arg: AccountId32Like) => PalletRcMigratorAccountsAccountState | undefined,
4078
- AccountId32
4079
- >;
4080
-
4081
- /**
4082
- * Helper storage item to store the total balance that should be kept on Relay Chain.
4083
- *
4084
- * @param {Callback<PalletRcMigratorAccountsMigratedBalances> =} callback
4085
- **/
4086
- rcMigratedBalance: GenericStorageQuery<Rv, () => PalletRcMigratorAccountsMigratedBalances>;
4087
-
4088
- /**
4089
- * The total number of XCM data messages sent to the Asset Hub and the number of XCM messages
4090
- * the Asset Hub has confirmed as processed.
4091
- *
4092
- * The difference between these two numbers are the messages that are "in-flight". We aim to
4093
- * keep this number low to not accidentally overload the asset hub.
4094
- *
4095
- * @param {Callback<[number, number]> =} callback
4096
- **/
4097
- dmpDataMessageCounts: GenericStorageQuery<Rv, () => [number, number]>;
4098
-
4099
- /**
4100
- *
4101
- * @param {H256} arg
4102
- * @param {Callback<StagingXcmV5Xcm | undefined> =} callback
4103
- **/
4104
- dmpMessagesFailed: GenericStorageQuery<Rv, (arg: H256) => StagingXcmV5Xcm | undefined, H256>;
4105
-
4106
4076
  /**
4107
4077
  * Generic pallet storage query
4108
4078
  **/
@@ -691,6 +691,13 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
691
691
  **/
692
692
  schedulingLookahead: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
693
693
 
694
+ /**
695
+ * Retrieve paraids at relay parent
696
+ *
697
+ * @callname: ParachainHost_para_ids
698
+ **/
699
+ paraIds: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotParachainPrimitivesPrimitivesId>>>;
700
+
694
701
  /**
695
702
  * Generic runtime api call
696
703
  **/