@dedot/chaintypes 0.156.0 → 0.158.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.
@@ -8,6 +8,7 @@ export type ChainJsonRpcApis<Rv extends RpcVersion> = Pick<
8
8
  | 'alephNode_emergencyFinalize'
9
9
  | 'alephNode_getBlockAuthor'
10
10
  | 'alephNode_ready'
11
+ | 'alephNode_unstable_validatorNetworkInfo'
11
12
  | 'author_hasKey'
12
13
  | 'author_hasSessionKeys'
13
14
  | 'author_insertKey'
@@ -16,6 +17,14 @@ export type ChainJsonRpcApis<Rv extends RpcVersion> = Pick<
16
17
  | 'author_rotateKeys'
17
18
  | 'author_submitAndWatchExtrinsic'
18
19
  | 'author_submitExtrinsic'
20
+ | 'chainHead_unstable_body'
21
+ | 'chainHead_unstable_call'
22
+ | 'chainHead_unstable_continue'
23
+ | 'chainHead_unstable_follow'
24
+ | 'chainHead_unstable_header'
25
+ | 'chainHead_unstable_stopOperation'
26
+ | 'chainHead_unstable_storage'
27
+ | 'chainHead_unstable_unpin'
19
28
  | 'chain_getBlock'
20
29
  | 'chain_getBlockHash'
21
30
  | 'chain_getFinalizedHead'
@@ -29,11 +38,10 @@ export type ChainJsonRpcApis<Rv extends RpcVersion> = Pick<
29
38
  | 'childstate_getStorageEntries'
30
39
  | 'childstate_getStorageHash'
31
40
  | 'childstate_getStorageSize'
32
- | 'health'
33
41
  | 'offchain_localStorageGet'
34
42
  | 'offchain_localStorageSet'
35
43
  | 'payment_queryFeeDetails'
36
- | 'payment_queryFeeInfo'
44
+ | 'payment_queryInfo'
37
45
  | 'rpc_methods'
38
46
  | 'state_call'
39
47
  | 'state_getChildReadProof'
@@ -67,7 +75,7 @@ export type ChainJsonRpcApis<Rv extends RpcVersion> = Pick<
67
75
  | 'system_removeReservedPeer'
68
76
  | 'system_reservedPeers'
69
77
  | 'system_resetLogFilter'
70
- | 'system_syncStat'
78
+ | 'system_syncState'
71
79
  | 'system_unstable_networkState'
72
80
  | 'system_version'
73
81
  | 'transaction_unstable_submitAndWatch'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.156.0",
3
+ "version": "0.158.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": "1f748a88bc27cbd4e7b40da9c6485157100af09f",
28
+ "gitHead": "a7b33a3101f7bf42e597ac0678afe7e012e70c4b",
29
29
  "module": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "exports": {
@@ -301,6 +301,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
301
301
  **/
302
302
  maxExposurePageSize: number;
303
303
 
304
+ /**
305
+ * The absolute maximum of winner validators this pallet should return.
306
+ **/
307
+ maxValidatorSet: number;
308
+
304
309
  /**
305
310
  * The maximum number of `unlocking` chunks a [`StakingLedger`] can
306
311
  * have. Effectively determines how many unique eras a staker may be
@@ -342,6 +347,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
342
347
  * Pallet `Session`'s constants
343
348
  **/
344
349
  session: {
350
+ /**
351
+ * The amount to be held when setting keys.
352
+ **/
353
+ keyDeposit: bigint;
354
+
345
355
  /**
346
356
  * Generic pallet constant
347
357
  **/
@@ -781,12 +791,18 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
781
791
  signedDepositWeight: bigint;
782
792
 
783
793
  /**
784
- * The maximum number of winners that can be elected by this `ElectionProvider`
785
- * implementation.
794
+ * Maximum number of winners that an election supports.
786
795
  *
787
796
  * Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
788
797
  **/
789
798
  maxWinners: number;
799
+
800
+ /**
801
+ * Maximum number of voters that can support a winner in an election solution.
802
+ *
803
+ * This is needed to ensure election computation is bounded.
804
+ **/
805
+ maxBackersPerWinner: number;
790
806
  minerMaxLength: number;
791
807
  minerMaxWeight: SpWeightsWeightV2Weight;
792
808
  minerMaxVotesPerVoter: number;
@@ -848,6 +864,14 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
848
864
  **/
849
865
  bagThresholds: Array<bigint>;
850
866
 
867
+ /**
868
+ * Maximum number of accounts that may be re-bagged automatically in `on_idle`.
869
+ *
870
+ * A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables
871
+ * the feature.
872
+ **/
873
+ maxAutoRebagPerBlock: number;
874
+
851
875
  /**
852
876
  * Generic pallet constant
853
877
  **/
@@ -1220,12 +1244,27 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
1220
1244
  * Pallet `XcmPallet`'s constants
1221
1245
  **/
1222
1246
  xcmPallet: {
1247
+ /**
1248
+ * This chain's Universal Location.
1249
+ **/
1250
+ universalLocation: StagingXcmV5Junctions;
1251
+
1223
1252
  /**
1224
1253
  * The latest supported version that we advertise. Generally just set it to
1225
1254
  * `pallet_xcm::CurrentXcmVersion`.
1226
1255
  **/
1227
1256
  advertisedXcmVersion: number;
1228
1257
 
1258
+ /**
1259
+ * The maximum number of local XCM locks that a single account may have.
1260
+ **/
1261
+ maxLockers: number;
1262
+
1263
+ /**
1264
+ * The maximum number of consumers a single remote lock may have.
1265
+ **/
1266
+ maxRemoteLockConsumers: number;
1267
+
1229
1268
  /**
1230
1269
  * Generic pallet constant
1231
1270
  **/
@@ -1066,6 +1066,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1066
1066
  **/
1067
1067
  TooManyQueued: GenericPalletError<Rv>;
1068
1068
 
1069
+ /**
1070
+ * User is not the proposer of the bounty.
1071
+ **/
1072
+ NotProposer: GenericPalletError<Rv>;
1073
+
1069
1074
  /**
1070
1075
  * Generic pallet error
1071
1076
  **/
@@ -1188,6 +1193,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1188
1193
  **/
1189
1194
  List: GenericPalletError<Rv>;
1190
1195
 
1196
+ /**
1197
+ * Could not update a node, because the pallet is locked.
1198
+ **/
1199
+ Locked: GenericPalletError<Rv>;
1200
+
1191
1201
  /**
1192
1202
  * Generic pallet error
1193
1203
  **/
@@ -1726,6 +1736,21 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1726
1736
  **/
1727
1737
  InvalidCode: GenericPalletError<Rv>;
1728
1738
 
1739
+ /**
1740
+ * No upgrade authorized.
1741
+ **/
1742
+ NothingAuthorized: GenericPalletError<Rv>;
1743
+
1744
+ /**
1745
+ * The submitted code is not authorized.
1746
+ **/
1747
+ Unauthorized: GenericPalletError<Rv>;
1748
+
1749
+ /**
1750
+ * Invalid block number.
1751
+ **/
1752
+ InvalidBlockNumber: GenericPalletError<Rv>;
1753
+
1729
1754
  /**
1730
1755
  * Generic pallet error
1731
1756
  **/
@@ -2444,6 +2469,8 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2444
2469
 
2445
2470
  /**
2446
2471
  * Too many locations authorized to alias origin.
2472
+ *
2473
+ * @deprecated Use `LocalExecutionIncompleteWithError` instead (since 20.0.0)
2447
2474
  **/
2448
2475
  TooManyAuthorizedAliases: GenericPalletError<Rv>;
2449
2476
 
@@ -2457,6 +2484,12 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2457
2484
  **/
2458
2485
  AliasNotFound: GenericPalletError<Rv>;
2459
2486
 
2487
+ /**
2488
+ * Local XCM execution incomplete with the actual XCM error and the index of the
2489
+ * instruction that caused the error.
2490
+ **/
2491
+ LocalExecutionIncompleteWithError: GenericPalletError<Rv>;
2492
+
2460
2493
  /**
2461
2494
  * Generic pallet error
2462
2495
  **/
@@ -15,6 +15,7 @@ import type {
15
15
  import type {
16
16
  FrameSystemDispatchEventInfo,
17
17
  FrameSupportTokensMiscBalanceStatus,
18
+ PalletBalancesUnexpectedKind,
18
19
  PalletStakingRewardDestination,
19
20
  PalletStakingValidatorPrefs,
20
21
  PalletStakingForcing,
@@ -400,6 +401,11 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
400
401
  **/
401
402
  TotalIssuanceForced: GenericPalletEvent<Rv, 'Balances', 'TotalIssuanceForced', { old: bigint; new: bigint }>;
402
403
 
404
+ /**
405
+ * An unexpected/defensive event was triggered.
406
+ **/
407
+ Unexpected: GenericPalletEvent<Rv, 'Balances', 'Unexpected', PalletBalancesUnexpectedKind>;
408
+
403
409
  /**
404
410
  * Generic pallet event
405
411
  **/
@@ -588,6 +594,25 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
588
594
  **/
589
595
  [prop: string]: GenericPalletEvent<Rv>;
590
596
  };
597
+ /**
598
+ * Pallet `Historical`'s events
599
+ **/
600
+ historical: {
601
+ /**
602
+ * The merkle root of the validators of the said session were stored
603
+ **/
604
+ RootStored: GenericPalletEvent<Rv, 'Historical', 'RootStored', { index: number }>;
605
+
606
+ /**
607
+ * The merkle roots of up to this session index were pruned
608
+ **/
609
+ RootsPruned: GenericPalletEvent<Rv, 'Historical', 'RootsPruned', { upTo: number }>;
610
+
611
+ /**
612
+ * Generic pallet event
613
+ **/
614
+ [prop: string]: GenericPalletEvent<Rv>;
615
+ };
591
616
  /**
592
617
  * Pallet `Session`'s events
593
618
  **/
@@ -598,6 +623,12 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
598
623
  **/
599
624
  NewSession: GenericPalletEvent<Rv, 'Session', 'NewSession', { sessionIndex: number }>;
600
625
 
626
+ /**
627
+ * The `NewSession` event in the current block also implies a new validator set to be
628
+ * queued.
629
+ **/
630
+ NewQueued: GenericPalletEvent<Rv, 'Session', 'NewQueued', null>;
631
+
601
632
  /**
602
633
  * Validator has been disabled.
603
634
  **/
@@ -1160,6 +1191,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1160
1191
  * Pallet `Vesting`'s events
1161
1192
  **/
1162
1193
  vesting: {
1194
+ /**
1195
+ * A vesting schedule has been created.
1196
+ **/
1197
+ VestingCreated: GenericPalletEvent<
1198
+ Rv,
1199
+ 'Vesting',
1200
+ 'VestingCreated',
1201
+ { account: AccountId32; scheduleIndex: number }
1202
+ >;
1203
+
1163
1204
  /**
1164
1205
  * The amount vested has been updated. This could indicate a change in funds available.
1165
1206
  * The balance given is the amount which is left unvested (and thus locked).
@@ -1251,6 +1292,21 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1251
1292
  }
1252
1293
  >;
1253
1294
 
1295
+ /**
1296
+ * A pure proxy was killed by its spawner.
1297
+ **/
1298
+ PureKilled: GenericPalletEvent<
1299
+ Rv,
1300
+ 'Proxy',
1301
+ 'PureKilled',
1302
+ {
1303
+ pure: AccountId32;
1304
+ spawner: AccountId32;
1305
+ proxyType: PolkadotRuntimeConstantsProxyProxyType;
1306
+ disambiguationIndex: number;
1307
+ }
1308
+ >;
1309
+
1254
1310
  /**
1255
1311
  * An announcement was placed to make a call in the future.
1256
1312
  **/
@@ -1430,6 +1486,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1430
1486
  **/
1431
1487
  CuratorAccepted: GenericPalletEvent<Rv, 'Bounties', 'CuratorAccepted', { bountyId: number; curator: AccountId32 }>;
1432
1488
 
1489
+ /**
1490
+ * A bounty deposit has been poked.
1491
+ **/
1492
+ DepositPoked: GenericPalletEvent<
1493
+ Rv,
1494
+ 'Bounties',
1495
+ 'DepositPoked',
1496
+ { bountyId: number; proposer: AccountId32; oldDeposit: bigint; newDeposit: bigint }
1497
+ >;
1498
+
1433
1499
  /**
1434
1500
  * Generic pallet event
1435
1501
  **/
@@ -2032,6 +2098,46 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2032
2098
  [PolkadotParachainPrimitivesPrimitivesValidationCodeHash, PolkadotParachainPrimitivesPrimitivesId]
2033
2099
  >;
2034
2100
 
2101
+ /**
2102
+ * The upgrade cooldown was removed.
2103
+ **/
2104
+ UpgradeCooldownRemoved: GenericPalletEvent<
2105
+ Rv,
2106
+ 'Paras',
2107
+ 'UpgradeCooldownRemoved',
2108
+ {
2109
+ /**
2110
+ * The parachain for which the cooldown got removed.
2111
+ **/
2112
+ paraId: PolkadotParachainPrimitivesPrimitivesId;
2113
+ }
2114
+ >;
2115
+
2116
+ /**
2117
+ * A new code hash has been authorized for a Para.
2118
+ **/
2119
+ CodeAuthorized: GenericPalletEvent<
2120
+ Rv,
2121
+ 'Paras',
2122
+ 'CodeAuthorized',
2123
+ {
2124
+ /**
2125
+ * Para
2126
+ **/
2127
+ paraId: PolkadotParachainPrimitivesPrimitivesId;
2128
+
2129
+ /**
2130
+ * Authorized code hash.
2131
+ **/
2132
+ codeHash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash;
2133
+
2134
+ /**
2135
+ * Block at which authorization expires and will be removed.
2136
+ **/
2137
+ expireAt: number;
2138
+ }
2139
+ >;
2140
+
2035
2141
  /**
2036
2142
  * Generic pallet event
2037
2143
  **/
@@ -60,7 +60,7 @@ export interface VersionedPolkadotApi<Rv extends RpcVersion> extends GenericSubs
60
60
 
61
61
  /**
62
62
  * @name: PolkadotApi
63
- * @specVersion: 1006002
63
+ * @specVersion: 1007001
64
64
  **/
65
65
  export interface PolkadotApi {
66
66
  legacy: VersionedPolkadotApi<RpcLegacy>;
@@ -102,6 +102,7 @@ import type {
102
102
  PolkadotRuntimeParachainsParasParaLifecycle,
103
103
  PolkadotParachainPrimitivesPrimitivesHeadData,
104
104
  PolkadotRuntimeParachainsParasParaPastCodeMeta,
105
+ PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry,
105
106
  PolkadotPrimitivesV8UpgradeGoAhead,
106
107
  PolkadotPrimitivesV8UpgradeRestriction,
107
108
  PolkadotRuntimeParachainsParasParaGenesisArgs,
@@ -367,6 +368,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
367
368
  *
368
369
  * @param {H256} arg
369
370
  * @param {Callback<PalletPreimageOldRequestStatus | undefined> =} callback
371
+ *
372
+ * @deprecated RequestStatusFor
370
373
  **/
371
374
  statusFor: GenericStorageQuery<Rv, (arg: H256) => PalletPreimageOldRequestStatus | undefined, H256>;
372
375
 
@@ -2001,6 +2004,24 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2001
2004
  **/
2002
2005
  listBags: GenericStorageQuery<Rv, (arg: bigint) => PalletBagsListListBag | undefined, bigint>;
2003
2006
 
2007
+ /**
2008
+ * Pointer that remembers the next node that will be auto-rebagged.
2009
+ * When `None`, the next scan will start from the list head again.
2010
+ *
2011
+ * @param {Callback<AccountId32 | undefined> =} callback
2012
+ **/
2013
+ nextNodeAutoRebagged: GenericStorageQuery<Rv, () => AccountId32 | undefined>;
2014
+
2015
+ /**
2016
+ * Lock all updates to this pallet.
2017
+ *
2018
+ * If any nodes needs updating, removal or addition due to a temporary lock, the
2019
+ * [`Call::rebag`] can be used.
2020
+ *
2021
+ * @param {Callback<[] | undefined> =} callback
2022
+ **/
2023
+ lock: GenericStorageQuery<Rv, () => [] | undefined>;
2024
+
2004
2025
  /**
2005
2026
  * Generic pallet storage query
2006
2027
  **/
@@ -2656,6 +2677,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2656
2677
  PolkadotParachainPrimitivesPrimitivesId
2657
2678
  >;
2658
2679
 
2680
+ /**
2681
+ * The code hash authorizations for a para which will expire `expire_at` `BlockNumberFor<T>`.
2682
+ *
2683
+ * @param {PolkadotParachainPrimitivesPrimitivesId} arg
2684
+ * @param {Callback<PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry | undefined> =} callback
2685
+ **/
2686
+ authorizedCodeHash: GenericStorageQuery<
2687
+ Rv,
2688
+ (
2689
+ arg: PolkadotParachainPrimitivesPrimitivesId,
2690
+ ) => PolkadotRuntimeParachainsParasAuthorizedCodeHashAndExpiry | undefined,
2691
+ PolkadotParachainPrimitivesPrimitivesId
2692
+ >;
2693
+
2659
2694
  /**
2660
2695
  * This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade
2661
2696
  * procedure.