@dedot/chaintypes 0.64.0 → 0.66.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.64.0",
3
+ "version": "0.66.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": "976fd31eb84b6e942bb11ac23bbe4ad46eba4bd9",
22
+ "gitHead": "a8b5780dfc0b9384391d707e43e7779c9e1c275f",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -23,7 +23,7 @@ export interface VersionedWestendApi<Rv extends RpcVersion> extends GenericSubst
23
23
 
24
24
  /**
25
25
  * @name: WestendApi
26
- * @specVersion: 1018000
26
+ * @specVersion: 1018001
27
27
  **/
28
28
  export interface WestendApi {
29
29
  legacy: VersionedWestendApi<RpcLegacy>;
@@ -684,6 +684,13 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
684
684
  **/
685
685
  schedulingLookahead: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
686
686
 
687
+ /**
688
+ * Retrieve the maximum uncompressed code size.
689
+ *
690
+ * @callname: ParachainHost_validation_code_bomb_limit
691
+ **/
692
+ validationCodeBombLimit: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
693
+
687
694
  /**
688
695
  * Generic runtime api call
689
696
  **/
@@ -1823,6 +1823,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1823
1823
  **/
1824
1824
  RefcountOverOrUnderflow: GenericPalletError<Rv>;
1825
1825
 
1826
+ /**
1827
+ * Unsupported precompile address
1828
+ **/
1829
+ UnsupportedPrecompileAddress: GenericPalletError<Rv>;
1830
+
1826
1831
  /**
1827
1832
  * Generic pallet error
1828
1833
  **/
@@ -550,6 +550,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
550
550
  **/
551
551
  NewSession: GenericPalletEvent<Rv, 'Session', 'NewSession', { sessionIndex: number }>;
552
552
 
553
+ /**
554
+ * Validator has been disabled.
555
+ **/
556
+ ValidatorDisabled: GenericPalletEvent<Rv, 'Session', 'ValidatorDisabled', { validator: AccountId32 }>;
557
+
558
+ /**
559
+ * Validator has been re-enabled.
560
+ **/
561
+ ValidatorReenabled: GenericPalletEvent<Rv, 'Session', 'ValidatorReenabled', { validator: AccountId32 }>;
562
+
553
563
  /**
554
564
  * Generic pallet event
555
565
  **/
@@ -1079,6 +1089,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1079
1089
  **/
1080
1090
  DispatchedAs: GenericPalletEvent<Rv, 'Utility', 'DispatchedAs', { result: Result<[], DispatchError> }>;
1081
1091
 
1092
+ /**
1093
+ * Main call was dispatched.
1094
+ **/
1095
+ IfElseMainSuccess: GenericPalletEvent<Rv, 'Utility', 'IfElseMainSuccess', null>;
1096
+
1097
+ /**
1098
+ * The fallback call was dispatched.
1099
+ **/
1100
+ IfElseFallbackCalled: GenericPalletEvent<Rv, 'Utility', 'IfElseFallbackCalled', { mainError: DispatchError }>;
1101
+
1082
1102
  /**
1083
1103
  * Generic pallet event
1084
1104
  **/
@@ -23,7 +23,7 @@ export interface VersionedWestendAssetHubApi<Rv extends RpcVersion> extends Gene
23
23
 
24
24
  /**
25
25
  * @name: WestendAssetHubApi
26
- * @specVersion: 1017007
26
+ * @specVersion: 1018000
27
27
  **/
28
28
  export interface WestendAssetHubApi {
29
29
  legacy: VersionedWestendAssetHubApi<RpcLegacy>;
@@ -40,6 +40,7 @@ import type {
40
40
  PalletTransactionPaymentReleases,
41
41
  PalletCollatorSelectionCandidateInfo,
42
42
  AssetHubWestendRuntimeSessionKeys,
43
+ SpStakingOffenceOffenceSeverity,
43
44
  SpCoreCryptoKeyTypeId,
44
45
  SpConsensusAuraSr25519AppSr25519Public,
45
46
  SpConsensusSlotsSlot,
@@ -805,9 +806,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
805
806
  * disabled using binary search. It gets cleared when `on_session_ending` returns
806
807
  * a new set of identities.
807
808
  *
808
- * @param {Callback<Array<number>> =} callback
809
+ * @param {Callback<Array<[number, SpStakingOffenceOffenceSeverity]>> =} callback
809
810
  **/
810
- disabledValidators: GenericStorageQuery<Rv, () => Array<number>>;
811
+ disabledValidators: GenericStorageQuery<Rv, () => Array<[number, SpStakingOffenceOffenceSeverity]>>;
811
812
 
812
813
  /**
813
814
  * The next session keys for a validator.
@@ -1930,14 +1931,15 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1930
1931
  /**
1931
1932
  * Map a Ethereum address to its original `AccountId32`.
1932
1933
  *
1933
- * Stores the last 12 byte for addresses that were originally an `AccountId32` instead
1934
- * of an `H160`. Register your `AccountId32` using [`Pallet::map_account`] in order to
1934
+ * When deriving a `H160` from an `AccountId32` we use a hash function. In order to
1935
+ * reconstruct the original account we need to store the reverse mapping here.
1936
+ * Register your `AccountId32` using [`Pallet::map_account`] in order to
1935
1937
  * use it with this pallet.
1936
1938
  *
1937
1939
  * @param {H160} arg
1938
- * @param {Callback<FixedBytes<12> | undefined> =} callback
1940
+ * @param {Callback<AccountId32 | undefined> =} callback
1939
1941
  **/
1940
- addressSuffix: GenericStorageQuery<Rv, (arg: H160) => FixedBytes<12> | undefined, H160>;
1942
+ originalAccount: GenericStorageQuery<Rv, (arg: H160) => AccountId32 | undefined, H160>;
1941
1943
 
1942
1944
  /**
1943
1945
  * Generic pallet storage query
@@ -610,17 +610,19 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
610
610
  **/
611
611
  dryRunApi: {
612
612
  /**
613
- * Dry run call.
613
+ * Dry run call V2.
614
614
  *
615
615
  * @callname: DryRunApi_dry_run_call
616
616
  * @param {AssetHubWestendRuntimeOriginCaller} origin
617
617
  * @param {AssetHubWestendRuntimeRuntimeCallLike} call
618
+ * @param {number} result_xcms_version
618
619
  **/
619
620
  dryRunCall: GenericRuntimeApiMethod<
620
621
  Rv,
621
622
  (
622
623
  origin: AssetHubWestendRuntimeOriginCaller,
623
624
  call: AssetHubWestendRuntimeRuntimeCallLike,
625
+ resultXcmsVersion: number,
624
626
  ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
625
627
  >;
626
628
 
@@ -2097,6 +2097,78 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2097
2097
  >
2098
2098
  >;
2099
2099
 
2100
+ /**
2101
+ * Dispatch a fallback call in the event the main call fails to execute.
2102
+ * May be called from any origin except `None`.
2103
+ *
2104
+ * This function first attempts to dispatch the `main` call.
2105
+ * If the `main` call fails, the `fallback` is attemted.
2106
+ * if the fallback is successfully dispatched, the weights of both calls
2107
+ * are accumulated and an event containing the main call error is deposited.
2108
+ *
2109
+ * In the event of a fallback failure the whole call fails
2110
+ * with the weights returned.
2111
+ *
2112
+ * - `main`: The main call to be dispatched. This is the primary action to execute.
2113
+ * - `fallback`: The fallback call to be dispatched in case the `main` call fails.
2114
+ *
2115
+ * ## Dispatch Logic
2116
+ * - If the origin is `root`, both the main and fallback calls are executed without
2117
+ * applying any origin filters.
2118
+ * - If the origin is not `root`, the origin filter is applied to both the `main` and
2119
+ * `fallback` calls.
2120
+ *
2121
+ * ## Use Case
2122
+ * - Some use cases might involve submitting a `batch` type call in either main, fallback
2123
+ * or both.
2124
+ *
2125
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} main
2126
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} fallback
2127
+ **/
2128
+ ifElse: GenericTxCall<
2129
+ Rv,
2130
+ (
2131
+ main: AssetHubWestendRuntimeRuntimeCallLike,
2132
+ fallback: AssetHubWestendRuntimeRuntimeCallLike,
2133
+ ) => ChainSubmittableExtrinsic<
2134
+ Rv,
2135
+ {
2136
+ pallet: 'Utility';
2137
+ palletCall: {
2138
+ name: 'IfElse';
2139
+ params: { main: AssetHubWestendRuntimeRuntimeCallLike; fallback: AssetHubWestendRuntimeRuntimeCallLike };
2140
+ };
2141
+ }
2142
+ >
2143
+ >;
2144
+
2145
+ /**
2146
+ * Dispatches a function call with a provided origin.
2147
+ *
2148
+ * Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.
2149
+ *
2150
+ * The dispatch origin for this call must be _Root_.
2151
+ *
2152
+ * @param {AssetHubWestendRuntimeOriginCaller} asOrigin
2153
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} call
2154
+ **/
2155
+ dispatchAsFallible: GenericTxCall<
2156
+ Rv,
2157
+ (
2158
+ asOrigin: AssetHubWestendRuntimeOriginCaller,
2159
+ call: AssetHubWestendRuntimeRuntimeCallLike,
2160
+ ) => ChainSubmittableExtrinsic<
2161
+ Rv,
2162
+ {
2163
+ pallet: 'Utility';
2164
+ palletCall: {
2165
+ name: 'DispatchAsFallible';
2166
+ params: { asOrigin: AssetHubWestendRuntimeOriginCaller; call: AssetHubWestendRuntimeRuntimeCallLike };
2167
+ };
2168
+ }
2169
+ >
2170
+ >;
2171
+
2100
2172
  /**
2101
2173
  * Generic pallet tx call
2102
2174
  **/
@@ -16,6 +16,7 @@ import type {
16
16
  MultiAddress,
17
17
  MultiAddressLike,
18
18
  AccountId32Like,
19
+ Perbill,
19
20
  Era,
20
21
  Header,
21
22
  UncheckedExtrinsic,
@@ -520,7 +521,15 @@ export type PalletSessionEvent =
520
521
  * New session has happened. Note that the argument is the session index, not the
521
522
  * block number as the type might suggest.
522
523
  **/
523
- { name: 'NewSession'; data: { sessionIndex: number } };
524
+ | { name: 'NewSession'; data: { sessionIndex: number } }
525
+ /**
526
+ * Validator has been disabled.
527
+ **/
528
+ | { name: 'ValidatorDisabled'; data: { validator: AccountId32 } }
529
+ /**
530
+ * Validator has been re-enabled.
531
+ **/
532
+ | { name: 'ValidatorReenabled'; data: { validator: AccountId32 } };
524
533
 
525
534
  /**
526
535
  * The `Event` enum of this pallet
@@ -1275,7 +1284,15 @@ export type PalletUtilityEvent =
1275
1284
  /**
1276
1285
  * A call was dispatched.
1277
1286
  **/
1278
- | { name: 'DispatchedAs'; data: { result: Result<[], DispatchError> } };
1287
+ | { name: 'DispatchedAs'; data: { result: Result<[], DispatchError> } }
1288
+ /**
1289
+ * Main call was dispatched.
1290
+ **/
1291
+ | { name: 'IfElseMainSuccess' }
1292
+ /**
1293
+ * The fallback call was dispatched.
1294
+ **/
1295
+ | { name: 'IfElseFallbackCalled'; data: { mainError: DispatchError } };
1279
1296
 
1280
1297
  /**
1281
1298
  * The `Event` enum of this pallet
@@ -3586,6 +3603,8 @@ export type AssetHubWestendRuntimeSessionKeys = { aura: SpConsensusAuraSr25519Ap
3586
3603
 
3587
3604
  export type SpConsensusAuraSr25519AppSr25519Public = FixedBytes<32>;
3588
3605
 
3606
+ export type SpStakingOffenceOffenceSeverity = Perbill;
3607
+
3589
3608
  export type SpCoreCryptoKeyTypeId = FixedBytes<4>;
3590
3609
 
3591
3610
  /**
@@ -5136,7 +5155,44 @@ export type PalletUtilityCall =
5136
5155
  *
5137
5156
  * The dispatch origin for this call must be _Root_.
5138
5157
  **/
5139
- | { name: 'WithWeight'; params: { call: AssetHubWestendRuntimeRuntimeCall; weight: SpWeightsWeightV2Weight } };
5158
+ | { name: 'WithWeight'; params: { call: AssetHubWestendRuntimeRuntimeCall; weight: SpWeightsWeightV2Weight } }
5159
+ /**
5160
+ * Dispatch a fallback call in the event the main call fails to execute.
5161
+ * May be called from any origin except `None`.
5162
+ *
5163
+ * This function first attempts to dispatch the `main` call.
5164
+ * If the `main` call fails, the `fallback` is attemted.
5165
+ * if the fallback is successfully dispatched, the weights of both calls
5166
+ * are accumulated and an event containing the main call error is deposited.
5167
+ *
5168
+ * In the event of a fallback failure the whole call fails
5169
+ * with the weights returned.
5170
+ *
5171
+ * - `main`: The main call to be dispatched. This is the primary action to execute.
5172
+ * - `fallback`: The fallback call to be dispatched in case the `main` call fails.
5173
+ *
5174
+ * ## Dispatch Logic
5175
+ * - If the origin is `root`, both the main and fallback calls are executed without
5176
+ * applying any origin filters.
5177
+ * - If the origin is not `root`, the origin filter is applied to both the `main` and
5178
+ * `fallback` calls.
5179
+ *
5180
+ * ## Use Case
5181
+ * - Some use cases might involve submitting a `batch` type call in either main, fallback
5182
+ * or both.
5183
+ **/
5184
+ | { name: 'IfElse'; params: { main: AssetHubWestendRuntimeRuntimeCall; fallback: AssetHubWestendRuntimeRuntimeCall } }
5185
+ /**
5186
+ * Dispatches a function call with a provided origin.
5187
+ *
5188
+ * Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.
5189
+ *
5190
+ * The dispatch origin for this call must be _Root_.
5191
+ **/
5192
+ | {
5193
+ name: 'DispatchAsFallible';
5194
+ params: { asOrigin: AssetHubWestendRuntimeOriginCaller; call: AssetHubWestendRuntimeRuntimeCall };
5195
+ };
5140
5196
 
5141
5197
  export type PalletUtilityCallLike =
5142
5198
  /**
@@ -5228,7 +5284,47 @@ export type PalletUtilityCallLike =
5228
5284
  *
5229
5285
  * The dispatch origin for this call must be _Root_.
5230
5286
  **/
5231
- | { name: 'WithWeight'; params: { call: AssetHubWestendRuntimeRuntimeCallLike; weight: SpWeightsWeightV2Weight } };
5287
+ | { name: 'WithWeight'; params: { call: AssetHubWestendRuntimeRuntimeCallLike; weight: SpWeightsWeightV2Weight } }
5288
+ /**
5289
+ * Dispatch a fallback call in the event the main call fails to execute.
5290
+ * May be called from any origin except `None`.
5291
+ *
5292
+ * This function first attempts to dispatch the `main` call.
5293
+ * If the `main` call fails, the `fallback` is attemted.
5294
+ * if the fallback is successfully dispatched, the weights of both calls
5295
+ * are accumulated and an event containing the main call error is deposited.
5296
+ *
5297
+ * In the event of a fallback failure the whole call fails
5298
+ * with the weights returned.
5299
+ *
5300
+ * - `main`: The main call to be dispatched. This is the primary action to execute.
5301
+ * - `fallback`: The fallback call to be dispatched in case the `main` call fails.
5302
+ *
5303
+ * ## Dispatch Logic
5304
+ * - If the origin is `root`, both the main and fallback calls are executed without
5305
+ * applying any origin filters.
5306
+ * - If the origin is not `root`, the origin filter is applied to both the `main` and
5307
+ * `fallback` calls.
5308
+ *
5309
+ * ## Use Case
5310
+ * - Some use cases might involve submitting a `batch` type call in either main, fallback
5311
+ * or both.
5312
+ **/
5313
+ | {
5314
+ name: 'IfElse';
5315
+ params: { main: AssetHubWestendRuntimeRuntimeCallLike; fallback: AssetHubWestendRuntimeRuntimeCallLike };
5316
+ }
5317
+ /**
5318
+ * Dispatches a function call with a provided origin.
5319
+ *
5320
+ * Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.
5321
+ *
5322
+ * The dispatch origin for this call must be _Root_.
5323
+ **/
5324
+ | {
5325
+ name: 'DispatchAsFallible';
5326
+ params: { asOrigin: AssetHubWestendRuntimeOriginCaller; call: AssetHubWestendRuntimeRuntimeCallLike };
5327
+ };
5232
5328
 
5233
5329
  export type AssetHubWestendRuntimeRuntimeCall =
5234
5330
  | { pallet: 'System'; palletCall: FrameSystemCall }
@@ -13696,7 +13792,11 @@ export type PalletReviveError =
13696
13792
  /**
13697
13793
  * The refcount of a code either over or underflowed.
13698
13794
  **/
13699
- | 'RefcountOverOrUnderflow';
13795
+ | 'RefcountOverOrUnderflow'
13796
+ /**
13797
+ * Unsupported precompile address
13798
+ **/
13799
+ | 'UnsupportedPrecompileAddress';
13700
13800
 
13701
13801
  export type PalletAssetRewardsPoolStakerInfo = { amount: bigint; rewards: bigint; rewardPerTokenPaid: bigint };
13702
13802
 
@@ -14016,7 +14116,7 @@ export type PalletReviveEvmApiDebugRpcTypesCallTrace = {
14016
14116
  revertReason?: string | undefined;
14017
14117
  calls: Array<PalletReviveEvmApiDebugRpcTypesCallTrace>;
14018
14118
  logs: Array<PalletReviveEvmApiDebugRpcTypesCallLog>;
14019
- value: U256;
14119
+ value?: U256 | undefined;
14020
14120
  callType: PalletReviveEvmApiDebugRpcTypesCallType;
14021
14121
  };
14022
14122