@dedot/chaintypes 0.27.0 → 0.28.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.27.0",
3
+ "version": "0.28.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": "534d55e4f26f857653e0bdfb9b742c1ecdd3aeb0",
22
+ "gitHead": "797cdf4e73e582401dd259c1326e757dd5443a6d",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }
@@ -501,6 +501,15 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
501
501
  **/
502
502
  [name: string]: any;
503
503
  };
504
+ /**
505
+ * Pallet `Parameters`'s constants
506
+ **/
507
+ parameters: {
508
+ /**
509
+ * Generic pallet constant
510
+ **/
511
+ [name: string]: any;
512
+ };
504
513
  /**
505
514
  * Pallet `Claims`'s constants
506
515
  **/
@@ -25,6 +25,8 @@ import type {
25
25
  PalletConvictionVotingTally,
26
26
  FrameSupportDispatchPostDispatchInfo,
27
27
  SpRuntimeDispatchErrorWithPostInfo,
28
+ PolkadotRuntimeRuntimeParametersKey,
29
+ PolkadotRuntimeRuntimeParametersValue,
28
30
  PolkadotRuntimeProxyType,
29
31
  PalletMultisigTimepoint,
30
32
  PalletElectionProviderMultiPhaseElectionCompute,
@@ -1057,6 +1059,42 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1057
1059
  **/
1058
1060
  [prop: string]: GenericPalletEvent<Rv>;
1059
1061
  };
1062
+ /**
1063
+ * Pallet `Parameters`'s events
1064
+ **/
1065
+ parameters: {
1066
+ /**
1067
+ * A Parameter was set.
1068
+ *
1069
+ * Is also emitted when the value was not changed.
1070
+ **/
1071
+ Updated: GenericPalletEvent<
1072
+ Rv,
1073
+ 'Parameters',
1074
+ 'Updated',
1075
+ {
1076
+ /**
1077
+ * The key that was updated.
1078
+ **/
1079
+ key: PolkadotRuntimeRuntimeParametersKey;
1080
+
1081
+ /**
1082
+ * The old value before this call.
1083
+ **/
1084
+ oldValue?: PolkadotRuntimeRuntimeParametersValue | undefined;
1085
+
1086
+ /**
1087
+ * The new value after this call.
1088
+ **/
1089
+ newValue?: PolkadotRuntimeRuntimeParametersValue | undefined;
1090
+ }
1091
+ >;
1092
+
1093
+ /**
1094
+ * Generic pallet event
1095
+ **/
1096
+ [prop: string]: GenericPalletEvent<Rv>;
1097
+ };
1060
1098
  /**
1061
1099
  * Pallet `Claims`'s events
1062
1100
  **/
@@ -23,7 +23,7 @@ export interface VersionedPolkadotApi<Rv extends RpcVersion> extends GenericSubs
23
23
 
24
24
  /**
25
25
  * @name: PolkadotApi
26
- * @specVersion: 1003000
26
+ * @specVersion: 1003003
27
27
  **/
28
28
  export interface PolkadotApi {
29
29
  legacy: VersionedPolkadotApi<RpcLegacy>;
@@ -62,6 +62,8 @@ import type {
62
62
  PalletTreasurySpendStatus,
63
63
  PalletConvictionVotingVoteVoting,
64
64
  PalletReferendaReferendumInfo,
65
+ PolkadotRuntimeRuntimeParametersValue,
66
+ PolkadotRuntimeRuntimeParametersKey,
65
67
  PolkadotRuntimeCommonClaimsStatementKind,
66
68
  PalletVestingVestingInfo,
67
69
  PalletVestingReleases,
@@ -1571,6 +1573,27 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1571
1573
  **/
1572
1574
  [storage: string]: GenericStorageQuery<Rv>;
1573
1575
  };
1576
+ /**
1577
+ * Pallet `Parameters`'s storage queries
1578
+ **/
1579
+ parameters: {
1580
+ /**
1581
+ * Stored parameters.
1582
+ *
1583
+ * @param {PolkadotRuntimeRuntimeParametersKey} arg
1584
+ * @param {Callback<PolkadotRuntimeRuntimeParametersValue | undefined> =} callback
1585
+ **/
1586
+ parameters: GenericStorageQuery<
1587
+ Rv,
1588
+ (arg: PolkadotRuntimeRuntimeParametersKey) => PolkadotRuntimeRuntimeParametersValue | undefined,
1589
+ PolkadotRuntimeRuntimeParametersKey
1590
+ >;
1591
+
1592
+ /**
1593
+ * Generic pallet storage query
1594
+ **/
1595
+ [storage: string]: GenericStorageQuery<Rv>;
1596
+ };
1574
1597
  /**
1575
1598
  * Pallet `Claims`'s storage queries
1576
1599
  **/
@@ -16,6 +16,7 @@ import type {
16
16
  AccountId32,
17
17
  } from 'dedot/codecs';
18
18
  import type {
19
+ RelayCommonApisInflationInfo,
19
20
  SpRuntimeBlock,
20
21
  SpRuntimeExtrinsicInclusionMode,
21
22
  SpCoreOpaqueMetadata,
@@ -87,6 +88,25 @@ import type {
87
88
  } from './types';
88
89
 
89
90
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
91
+ /**
92
+ * @runtimeapi: Inflation - 0xc51ff1fa3f5d0cca
93
+ **/
94
+ inflation: {
95
+ /**
96
+ * Return the current estimates of the inflation amount.
97
+ *
98
+ * This is marked as experimental in light of RFC#89. Nonetheless, its usage is highly
99
+ * recommended over trying to read-storage, or re-create the onchain logic.
100
+ *
101
+ * @callname: Inflation_experimental_inflation_prediction_info
102
+ **/
103
+ experimentalInflationPredictionInfo: GenericRuntimeApiMethod<Rv, () => Promise<RelayCommonApisInflationInfo>>;
104
+
105
+ /**
106
+ * Generic runtime api call
107
+ **/
108
+ [method: string]: GenericRuntimeApiMethod<Rv>;
109
+ };
90
110
  /**
91
111
  * @runtimeapi: Core - 0xdf6acb689907609b
92
112
  **/
package/polkadot/tx.d.ts CHANGED
@@ -47,6 +47,7 @@ import type {
47
47
  FrameSupportPreimagesBounded,
48
48
  FrameSupportScheduleDispatchTime,
49
49
  SpWeightsWeightV2Weight,
50
+ PolkadotRuntimeRuntimeParameters,
50
51
  PolkadotRuntimeCommonClaimsEcdsaSignature,
51
52
  PolkadotRuntimeCommonClaimsStatementKind,
52
53
  PalletVestingVestingInfo,
@@ -3269,6 +3270,37 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3269
3270
  **/
3270
3271
  [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
3271
3272
  };
3273
+ /**
3274
+ * Pallet `Parameters`'s transaction calls
3275
+ **/
3276
+ parameters: {
3277
+ /**
3278
+ * Set the value of a parameter.
3279
+ *
3280
+ * The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
3281
+ * deleted by setting them to `None`.
3282
+ *
3283
+ * @param {PolkadotRuntimeRuntimeParameters} keyValue
3284
+ **/
3285
+ setParameter: GenericTxCall<
3286
+ Rv,
3287
+ (keyValue: PolkadotRuntimeRuntimeParameters) => ChainSubmittableExtrinsic<
3288
+ Rv,
3289
+ {
3290
+ pallet: 'Parameters';
3291
+ palletCall: {
3292
+ name: 'SetParameter';
3293
+ params: { keyValue: PolkadotRuntimeRuntimeParameters };
3294
+ };
3295
+ }
3296
+ >
3297
+ >;
3298
+
3299
+ /**
3300
+ * Generic pallet tx call
3301
+ **/
3302
+ [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
3303
+ };
3272
3304
  /**
3273
3305
  * Pallet `Claims`'s transaction calls
3274
3306
  **/
@@ -17,6 +17,7 @@ import type {
17
17
  MultiAddressLike,
18
18
  AccountId32Like,
19
19
  Percent,
20
+ Perquintill,
20
21
  EthereumAddress,
21
22
  EthereumAddressLike,
22
23
  PerU16,
@@ -69,6 +70,7 @@ export type PolkadotRuntimeRuntimeEvent =
69
70
  | { pallet: 'ConvictionVoting'; palletEvent: PalletConvictionVotingEvent }
70
71
  | { pallet: 'Referenda'; palletEvent: PalletReferendaEvent }
71
72
  | { pallet: 'Whitelist'; palletEvent: PalletWhitelistEvent }
73
+ | { pallet: 'Parameters'; palletEvent: PalletParametersEvent }
72
74
  | { pallet: 'Claims'; palletEvent: PolkadotRuntimeCommonClaimsPalletEvent }
73
75
  | { pallet: 'Vesting'; palletEvent: PalletVestingEvent }
74
76
  | { pallet: 'Utility'; palletEvent: PalletUtilityEvent }
@@ -1036,6 +1038,7 @@ export type PolkadotRuntimeRuntimeCall =
1036
1038
  | { pallet: 'ConvictionVoting'; palletCall: PalletConvictionVotingCall }
1037
1039
  | { pallet: 'Referenda'; palletCall: PalletReferendaCall }
1038
1040
  | { pallet: 'Whitelist'; palletCall: PalletWhitelistCall }
1041
+ | { pallet: 'Parameters'; palletCall: PalletParametersCall }
1039
1042
  | { pallet: 'Claims'; palletCall: PolkadotRuntimeCommonClaimsPalletCall }
1040
1043
  | { pallet: 'Vesting'; palletCall: PalletVestingCall }
1041
1044
  | { pallet: 'Utility'; palletCall: PalletUtilityCall }
@@ -1083,6 +1086,7 @@ export type PolkadotRuntimeRuntimeCallLike =
1083
1086
  | { pallet: 'ConvictionVoting'; palletCall: PalletConvictionVotingCallLike }
1084
1087
  | { pallet: 'Referenda'; palletCall: PalletReferendaCallLike }
1085
1088
  | { pallet: 'Whitelist'; palletCall: PalletWhitelistCallLike }
1089
+ | { pallet: 'Parameters'; palletCall: PalletParametersCallLike }
1086
1090
  | { pallet: 'Claims'; palletCall: PolkadotRuntimeCommonClaimsPalletCallLike }
1087
1091
  | { pallet: 'Vesting'; palletCall: PalletVestingCallLike }
1088
1092
  | { pallet: 'Utility'; palletCall: PalletUtilityCallLike }
@@ -3943,6 +3947,49 @@ export type PalletWhitelistCallLike =
3943
3947
  }
3944
3948
  | { name: 'DispatchWhitelistedCallWithPreimage'; params: { call: PolkadotRuntimeRuntimeCallLike } };
3945
3949
 
3950
+ /**
3951
+ * Contains a variant per dispatchable extrinsic that this pallet has.
3952
+ **/
3953
+ export type PalletParametersCall =
3954
+ /**
3955
+ * Set the value of a parameter.
3956
+ *
3957
+ * The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
3958
+ * deleted by setting them to `None`.
3959
+ **/
3960
+ { name: 'SetParameter'; params: { keyValue: PolkadotRuntimeRuntimeParameters } };
3961
+
3962
+ export type PalletParametersCallLike =
3963
+ /**
3964
+ * Set the value of a parameter.
3965
+ *
3966
+ * The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
3967
+ * deleted by setting them to `None`.
3968
+ **/
3969
+ { name: 'SetParameter'; params: { keyValue: PolkadotRuntimeRuntimeParameters } };
3970
+
3971
+ export type PolkadotRuntimeRuntimeParameters = {
3972
+ type: 'Inflation';
3973
+ value: PolkadotRuntimeDynamicParamsInflationParameters;
3974
+ };
3975
+
3976
+ export type PolkadotRuntimeDynamicParamsInflationParameters =
3977
+ | { type: 'MinInflation'; value: [PolkadotRuntimeDynamicParamsInflationMinInflation, Perquintill | undefined] }
3978
+ | { type: 'MaxInflation'; value: [PolkadotRuntimeDynamicParamsInflationMaxInflation, Perquintill | undefined] }
3979
+ | { type: 'IdealStake'; value: [PolkadotRuntimeDynamicParamsInflationIdealStake, Perquintill | undefined] }
3980
+ | { type: 'Falloff'; value: [PolkadotRuntimeDynamicParamsInflationFalloff, Perquintill | undefined] }
3981
+ | { type: 'UseAuctionSlots'; value: [PolkadotRuntimeDynamicParamsInflationUseAuctionSlots, boolean | undefined] };
3982
+
3983
+ export type PolkadotRuntimeDynamicParamsInflationMinInflation = {};
3984
+
3985
+ export type PolkadotRuntimeDynamicParamsInflationMaxInflation = {};
3986
+
3987
+ export type PolkadotRuntimeDynamicParamsInflationIdealStake = {};
3988
+
3989
+ export type PolkadotRuntimeDynamicParamsInflationFalloff = {};
3990
+
3991
+ export type PolkadotRuntimeDynamicParamsInflationUseAuctionSlots = {};
3992
+
3946
3993
  /**
3947
3994
  * Contains a variant per dispatchable extrinsic that this pallet has.
3948
3995
  **/
@@ -10379,6 +10426,59 @@ export type SpRuntimeDispatchErrorWithPostInfo = {
10379
10426
  error: DispatchError;
10380
10427
  };
10381
10428
 
10429
+ /**
10430
+ * The `Event` enum of this pallet
10431
+ **/
10432
+ export type PalletParametersEvent =
10433
+ /**
10434
+ * A Parameter was set.
10435
+ *
10436
+ * Is also emitted when the value was not changed.
10437
+ **/
10438
+ {
10439
+ name: 'Updated';
10440
+ data: {
10441
+ /**
10442
+ * The key that was updated.
10443
+ **/
10444
+ key: PolkadotRuntimeRuntimeParametersKey;
10445
+
10446
+ /**
10447
+ * The old value before this call.
10448
+ **/
10449
+ oldValue?: PolkadotRuntimeRuntimeParametersValue | undefined;
10450
+
10451
+ /**
10452
+ * The new value after this call.
10453
+ **/
10454
+ newValue?: PolkadotRuntimeRuntimeParametersValue | undefined;
10455
+ };
10456
+ };
10457
+
10458
+ export type PolkadotRuntimeRuntimeParametersKey = {
10459
+ type: 'Inflation';
10460
+ value: PolkadotRuntimeDynamicParamsInflationParametersKey;
10461
+ };
10462
+
10463
+ export type PolkadotRuntimeDynamicParamsInflationParametersKey =
10464
+ | { type: 'MinInflation'; value: PolkadotRuntimeDynamicParamsInflationMinInflation }
10465
+ | { type: 'MaxInflation'; value: PolkadotRuntimeDynamicParamsInflationMaxInflation }
10466
+ | { type: 'IdealStake'; value: PolkadotRuntimeDynamicParamsInflationIdealStake }
10467
+ | { type: 'Falloff'; value: PolkadotRuntimeDynamicParamsInflationFalloff }
10468
+ | { type: 'UseAuctionSlots'; value: PolkadotRuntimeDynamicParamsInflationUseAuctionSlots };
10469
+
10470
+ export type PolkadotRuntimeRuntimeParametersValue = {
10471
+ type: 'Inflation';
10472
+ value: PolkadotRuntimeDynamicParamsInflationParametersValue;
10473
+ };
10474
+
10475
+ export type PolkadotRuntimeDynamicParamsInflationParametersValue =
10476
+ | { type: 'MinInflation'; value: Perquintill }
10477
+ | { type: 'MaxInflation'; value: Perquintill }
10478
+ | { type: 'IdealStake'; value: Perquintill }
10479
+ | { type: 'Falloff'; value: Perquintill }
10480
+ | { type: 'UseAuctionSlots'; value: boolean };
10481
+
10382
10482
  /**
10383
10483
  * The `Event` enum of this pallet
10384
10484
  **/
@@ -14136,6 +14236,8 @@ export type FrameMetadataHashExtensionMode = 'Disabled' | 'Enabled';
14136
14236
 
14137
14237
  export type PolkadotRuntimeRuntime = {};
14138
14238
 
14239
+ export type RelayCommonApisInflationInfo = { inflation: Perquintill; nextMint: [bigint, bigint] };
14240
+
14139
14241
  export type SpRuntimeBlock = { header: Header; extrinsics: Array<UncheckedExtrinsic> };
14140
14242
 
14141
14243
  export type SpRuntimeExtrinsicInclusionMode = 'AllExtrinsics' | 'OnlyInherents';
@@ -23,7 +23,7 @@ export interface VersionedPolkadotAssetHubApi<Rv extends RpcVersion> extends Gen
23
23
 
24
24
  /**
25
25
  * @name: PolkadotAssetHubApi
26
- * @specVersion: 1003000
26
+ * @specVersion: 1003003
27
27
  **/
28
28
  export interface PolkadotAssetHubApi {
29
29
  legacy: VersionedPolkadotAssetHubApi<RpcLegacy>;