@dedot/chaintypes 0.239.0 → 0.240.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.
@@ -874,14 +874,16 @@ export interface ChainTx<
874
874
  session: {
875
875
  /**
876
876
  * Sets the session key(s) of the function caller to `keys`.
877
+ *
877
878
  * Allows an account to set its session key prior to becoming a validator.
878
879
  * This doesn't take effect until the next session.
879
880
  *
880
- * The dispatch origin of this function must be signed.
881
- *
882
- * ## Complexity
883
- * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
884
- * fixed.
881
+ * - `origin`: The dispatch origin of this function must be signed.
882
+ * - `keys`: The new session keys to set. These are the public keys of all sessions keys
883
+ * setup in the runtime.
884
+ * - `proof`: The proof that `origin` has access to the private keys of `keys`. See
885
+ * [`impl_opaque_keys`](sp_runtime::impl_opaque_keys) for more information about the
886
+ * proof format.
885
887
  *
886
888
  * @param {PeopleWestendRuntimeSessionKeys} keys
887
889
  * @param {BytesLike} proof
@@ -912,10 +914,6 @@ export interface ChainTx<
912
914
  * means being a controller account) or directly convertible into a validator ID (which
913
915
  * usually means being a stash account).
914
916
  *
915
- * ## Complexity
916
- * - `O(1)` in number of key types. Actual cost depends on the number of length of
917
- * `T::Keys::key_ids()` which is fixed.
918
- *
919
917
  **/
920
918
  purgeKeys: GenericTxCall<
921
919
  () => ChainSubmittableExtrinsic<
@@ -2080,7 +2078,9 @@ export interface ChainTx<
2080
2078
  * Register approval for a dispatch to be made from a deterministic composite account if
2081
2079
  * approved by a total of `threshold - 1` of `other_signatories`.
2082
2080
  *
2083
- * If there are enough, then dispatch the call.
2081
+ * **If the approval threshold is met (including the sender's approval), this will
2082
+ * immediately execute the call.** This is the only way to execute a multisig call -
2083
+ * `approve_as_multi` will never trigger execution.
2084
2084
  *
2085
2085
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2086
2086
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
@@ -2096,8 +2096,9 @@ export interface ChainTx<
2096
2096
  * transaction index) of the first approval transaction.
2097
2097
  * - `call`: The call to be executed.
2098
2098
  *
2099
- * NOTE: Unless this is the final approval, you will generally want to use
2100
- * `approve_as_multi` instead, since it only requires a hash of the call.
2099
+ * NOTE: For intermediate approvals (not the final approval), you should generally use
2100
+ * `approve_as_multi` instead, since it only requires a hash of the call and is more
2101
+ * efficient.
2101
2102
  *
2102
2103
  * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
2103
2104
  * on success, result is `Ok` and the result from the interior call, if it was executed,
@@ -2152,6 +2153,13 @@ export interface ChainTx<
2152
2153
  * Register approval for a dispatch to be made from a deterministic composite account if
2153
2154
  * approved by a total of `threshold - 1` of `other_signatories`.
2154
2155
  *
2156
+ * **This function will NEVER execute the call, even if the approval threshold is
2157
+ * reached.** It only registers approval. To actually execute the call, `as_multi` must
2158
+ * be called with the full call data by any of the signatories.
2159
+ *
2160
+ * This function is more efficient than `as_multi` for intermediate approvals since it
2161
+ * only requires the call hash, not the full call data.
2162
+ *
2155
2163
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2156
2164
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
2157
2165
  * is cancelled.
@@ -2166,7 +2174,8 @@ export interface ChainTx<
2166
2174
  * transaction index) of the first approval transaction.
2167
2175
  * - `call_hash`: The hash of the call to be executed.
2168
2176
  *
2169
- * NOTE: If this is the final approval, you will want to use `as_multi` instead.
2177
+ * NOTE: To execute the call after approvals are gathered, any signatory must call
2178
+ * `as_multi` with the full call data. This function cannot execute the call.
2170
2179
  *
2171
2180
  * ## Complexity
2172
2181
  * - `O(S)`.
@@ -703,14 +703,16 @@ export type PalletCollatorSelectionCallLike =
703
703
  export type PalletSessionCall =
704
704
  /**
705
705
  * Sets the session key(s) of the function caller to `keys`.
706
+ *
706
707
  * Allows an account to set its session key prior to becoming a validator.
707
708
  * This doesn't take effect until the next session.
708
709
  *
709
- * The dispatch origin of this function must be signed.
710
- *
711
- * ## Complexity
712
- * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
713
- * fixed.
710
+ * - `origin`: The dispatch origin of this function must be signed.
711
+ * - `keys`: The new session keys to set. These are the public keys of all sessions keys
712
+ * setup in the runtime.
713
+ * - `proof`: The proof that `origin` has access to the private keys of `keys`. See
714
+ * [`impl_opaque_keys`](sp_runtime::impl_opaque_keys) for more information about the
715
+ * proof format.
714
716
  **/
715
717
  | { name: 'SetKeys'; params: { keys: PeopleWestendRuntimeSessionKeys; proof: Bytes } }
716
718
  /**
@@ -722,24 +724,22 @@ export type PalletSessionCall =
722
724
  * convertible to a validator ID using the chain's typical addressing system (this usually
723
725
  * means being a controller account) or directly convertible into a validator ID (which
724
726
  * usually means being a stash account).
725
- *
726
- * ## Complexity
727
- * - `O(1)` in number of key types. Actual cost depends on the number of length of
728
- * `T::Keys::key_ids()` which is fixed.
729
727
  **/
730
728
  | { name: 'PurgeKeys' };
731
729
 
732
730
  export type PalletSessionCallLike =
733
731
  /**
734
732
  * Sets the session key(s) of the function caller to `keys`.
733
+ *
735
734
  * Allows an account to set its session key prior to becoming a validator.
736
735
  * This doesn't take effect until the next session.
737
736
  *
738
- * The dispatch origin of this function must be signed.
739
- *
740
- * ## Complexity
741
- * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
742
- * fixed.
737
+ * - `origin`: The dispatch origin of this function must be signed.
738
+ * - `keys`: The new session keys to set. These are the public keys of all sessions keys
739
+ * setup in the runtime.
740
+ * - `proof`: The proof that `origin` has access to the private keys of `keys`. See
741
+ * [`impl_opaque_keys`](sp_runtime::impl_opaque_keys) for more information about the
742
+ * proof format.
743
743
  **/
744
744
  | { name: 'SetKeys'; params: { keys: PeopleWestendRuntimeSessionKeys; proof: BytesLike } }
745
745
  /**
@@ -751,10 +751,6 @@ export type PalletSessionCallLike =
751
751
  * convertible to a validator ID using the chain's typical addressing system (this usually
752
752
  * means being a controller account) or directly convertible into a validator ID (which
753
753
  * usually means being a stash account).
754
- *
755
- * ## Complexity
756
- * - `O(1)` in number of key types. Actual cost depends on the number of length of
757
- * `T::Keys::key_ids()` which is fixed.
758
754
  **/
759
755
  | { name: 'PurgeKeys' };
760
756
 
@@ -2647,7 +2643,9 @@ export type PalletMultisigCall =
2647
2643
  * Register approval for a dispatch to be made from a deterministic composite account if
2648
2644
  * approved by a total of `threshold - 1` of `other_signatories`.
2649
2645
  *
2650
- * If there are enough, then dispatch the call.
2646
+ * **If the approval threshold is met (including the sender's approval), this will
2647
+ * immediately execute the call.** This is the only way to execute a multisig call -
2648
+ * `approve_as_multi` will never trigger execution.
2651
2649
  *
2652
2650
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2653
2651
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
@@ -2663,8 +2661,9 @@ export type PalletMultisigCall =
2663
2661
  * transaction index) of the first approval transaction.
2664
2662
  * - `call`: The call to be executed.
2665
2663
  *
2666
- * NOTE: Unless this is the final approval, you will generally want to use
2667
- * `approve_as_multi` instead, since it only requires a hash of the call.
2664
+ * NOTE: For intermediate approvals (not the final approval), you should generally use
2665
+ * `approve_as_multi` instead, since it only requires a hash of the call and is more
2666
+ * efficient.
2668
2667
  *
2669
2668
  * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
2670
2669
  * on success, result is `Ok` and the result from the interior call, if it was executed,
@@ -2698,6 +2697,13 @@ export type PalletMultisigCall =
2698
2697
  * Register approval for a dispatch to be made from a deterministic composite account if
2699
2698
  * approved by a total of `threshold - 1` of `other_signatories`.
2700
2699
  *
2700
+ * **This function will NEVER execute the call, even if the approval threshold is
2701
+ * reached.** It only registers approval. To actually execute the call, `as_multi` must
2702
+ * be called with the full call data by any of the signatories.
2703
+ *
2704
+ * This function is more efficient than `as_multi` for intermediate approvals since it
2705
+ * only requires the call hash, not the full call data.
2706
+ *
2701
2707
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2702
2708
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
2703
2709
  * is cancelled.
@@ -2712,7 +2718,8 @@ export type PalletMultisigCall =
2712
2718
  * transaction index) of the first approval transaction.
2713
2719
  * - `call_hash`: The hash of the call to be executed.
2714
2720
  *
2715
- * NOTE: If this is the final approval, you will want to use `as_multi` instead.
2721
+ * NOTE: To execute the call after approvals are gathered, any signatory must call
2722
+ * `as_multi` with the full call data. This function cannot execute the call.
2716
2723
  *
2717
2724
  * ## Complexity
2718
2725
  * - `O(S)`.
@@ -2811,7 +2818,9 @@ export type PalletMultisigCallLike =
2811
2818
  * Register approval for a dispatch to be made from a deterministic composite account if
2812
2819
  * approved by a total of `threshold - 1` of `other_signatories`.
2813
2820
  *
2814
- * If there are enough, then dispatch the call.
2821
+ * **If the approval threshold is met (including the sender's approval), this will
2822
+ * immediately execute the call.** This is the only way to execute a multisig call -
2823
+ * `approve_as_multi` will never trigger execution.
2815
2824
  *
2816
2825
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2817
2826
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
@@ -2827,8 +2836,9 @@ export type PalletMultisigCallLike =
2827
2836
  * transaction index) of the first approval transaction.
2828
2837
  * - `call`: The call to be executed.
2829
2838
  *
2830
- * NOTE: Unless this is the final approval, you will generally want to use
2831
- * `approve_as_multi` instead, since it only requires a hash of the call.
2839
+ * NOTE: For intermediate approvals (not the final approval), you should generally use
2840
+ * `approve_as_multi` instead, since it only requires a hash of the call and is more
2841
+ * efficient.
2832
2842
  *
2833
2843
  * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
2834
2844
  * on success, result is `Ok` and the result from the interior call, if it was executed,
@@ -2862,6 +2872,13 @@ export type PalletMultisigCallLike =
2862
2872
  * Register approval for a dispatch to be made from a deterministic composite account if
2863
2873
  * approved by a total of `threshold - 1` of `other_signatories`.
2864
2874
  *
2875
+ * **This function will NEVER execute the call, even if the approval threshold is
2876
+ * reached.** It only registers approval. To actually execute the call, `as_multi` must
2877
+ * be called with the full call data by any of the signatories.
2878
+ *
2879
+ * This function is more efficient than `as_multi` for intermediate approvals since it
2880
+ * only requires the call hash, not the full call data.
2881
+ *
2865
2882
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
2866
2883
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
2867
2884
  * is cancelled.
@@ -2876,7 +2893,8 @@ export type PalletMultisigCallLike =
2876
2893
  * transaction index) of the first approval transaction.
2877
2894
  * - `call_hash`: The hash of the call to be executed.
2878
2895
  *
2879
- * NOTE: If this is the final approval, you will want to use `as_multi` instead.
2896
+ * NOTE: To execute the call after approvals are gathered, any signatory must call
2897
+ * `as_multi` with the full call data. This function cannot execute the call.
2880
2898
  *
2881
2899
  * ## Complexity
2882
2900
  * - `O(S)`.
@@ -5137,7 +5155,10 @@ export type FrameSystemLimitsWeightsPerClass = {
5137
5155
  reserved?: SpWeightsWeightV2Weight | undefined;
5138
5156
  };
5139
5157
 
5140
- export type FrameSystemLimitsBlockLength = { max: FrameSupportDispatchPerDispatchClassU32 };
5158
+ export type FrameSystemLimitsBlockLength = {
5159
+ max: FrameSupportDispatchPerDispatchClassU32;
5160
+ maxHeaderSize?: number | undefined;
5161
+ };
5141
5162
 
5142
5163
  export type FrameSupportDispatchPerDispatchClassU32 = { normal: number; operational: number; mandatory: number };
5143
5164
 
@@ -6080,6 +6101,21 @@ export type PalletMigrationsError =
6080
6101
  **/
6081
6102
  'Ongoing';
6082
6103
 
6104
+ export type PalletMigrationsMbmIsOngoing = 'Yes' | 'No' | 'Stuck';
6105
+
6106
+ export type PalletMigrationsMbmProgress = {
6107
+ currentMigration: number;
6108
+ totalMigrations: number;
6109
+ currentMigrationSteps: number;
6110
+ currentMigrationMaxSteps?: number | undefined;
6111
+ };
6112
+
6113
+ export type PalletMigrationsMbmStatus = {
6114
+ ongoing: PalletMigrationsMbmIsOngoing;
6115
+ progress?: PalletMigrationsMbmProgress | undefined;
6116
+ prefixes: Array<Bytes>;
6117
+ };
6118
+
6083
6119
  export type SpConsensusSlotsSlotDuration = bigint;
6084
6120
 
6085
6121
  export type SpRuntimeBlockLazyBlock = { header: Header; extrinsics: Array<SpRuntimeOpaqueExtrinsic> };
@@ -6128,6 +6164,8 @@ export type SpRuntimeTransactionValidityValidTransaction = {
6128
6164
  propagate: boolean;
6129
6165
  };
6130
6166
 
6167
+ export type SpSessionRuntimeApiOpaqueGeneratedSessionKeys = { keys: Bytes; proof: Bytes };
6168
+
6131
6169
  export type PalletTransactionPaymentRuntimeDispatchInfo = {
6132
6170
  weight: SpWeightsWeightV2Weight;
6133
6171
  class: FrameSupportDispatchDispatchClass;
@@ -6196,28 +6234,6 @@ export type CumulusPrimitivesCoreCollationInfo = {
6196
6234
 
6197
6235
  export type PolkadotParachainPrimitivesPrimitivesValidationCode = Bytes;
6198
6236
 
6199
- export type SpStatementStoreRuntimeApiStatementSource = 'Chain' | 'Network' | 'Local';
6200
-
6201
- export type SpStatementStoreStatement = {
6202
- proof?: SpStatementStoreProof | undefined;
6203
- decryptionKey?: FixedBytes<32> | undefined;
6204
- channel?: FixedBytes<32> | undefined;
6205
- priority?: number | undefined;
6206
- numTopics: number;
6207
- topics: FixedArray<FixedBytes<32>, 4>;
6208
- data?: Bytes | undefined;
6209
- };
6210
-
6211
- export type SpStatementStoreProof =
6212
- | { type: 'Sr25519'; value: { signature: FixedBytes<64>; signer: FixedBytes<32> } }
6213
- | { type: 'Ed25519'; value: { signature: FixedBytes<64>; signer: FixedBytes<32> } }
6214
- | { type: 'Secp256k1Ecdsa'; value: { signature: FixedBytes<65>; signer: FixedBytes<33> } }
6215
- | { type: 'OnChain'; value: { who: FixedBytes<32>; blockHash: FixedBytes<32>; eventIndex: bigint } };
6216
-
6217
- export type SpStatementStoreRuntimeApiValidStatement = { maxCount: number; maxSize: number };
6218
-
6219
- export type SpStatementStoreRuntimeApiInvalidStatement = 'BadProof' | 'NoProof' | 'InternalError';
6220
-
6221
6237
  export type PeopleWestendRuntimeRuntimeError =
6222
6238
  | { pallet: 'System'; palletError: FrameSystemError }
6223
6239
  | { pallet: 'ParachainSystem'; palletError: CumulusPalletParachainSystemError }
@@ -1,7 +1,14 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainViewFunctions, GenericViewFunction } from 'dedot/types';
4
- import type { PeopleWestendRuntimeRuntimeCallLike, PeopleWestendRuntimeProxyType } from './types.js';
4
+ import type { Bytes } from 'dedot/codecs';
5
+ import type {
6
+ PeopleWestendRuntimeRuntimeCallLike,
7
+ PeopleWestendRuntimeProxyType,
8
+ PalletMigrationsMbmIsOngoing,
9
+ PalletMigrationsMbmProgress,
10
+ PalletMigrationsMbmStatus,
11
+ } from './types.js';
5
12
 
6
13
  export interface ChainViewFunctions extends GenericChainViewFunctions {
7
14
  /**
@@ -28,6 +35,40 @@ export interface ChainViewFunctions extends GenericChainViewFunctions {
28
35
  (toCheck: PeopleWestendRuntimeProxyType, against: PeopleWestendRuntimeProxyType) => Promise<boolean>
29
36
  >;
30
37
 
38
+ /**
39
+ * Generic pallet view function
40
+ **/
41
+ [name: string]: GenericViewFunction;
42
+ };
43
+ /**
44
+ * Pallet `MultiBlockMigrations`'s view functions
45
+ **/
46
+ multiBlockMigrations: {
47
+ /**
48
+ * Returns the ongoing status of migrations.
49
+ **/
50
+ ongoingStatus: GenericViewFunction<() => Promise<PalletMigrationsMbmIsOngoing>>;
51
+
52
+ /**
53
+ * Returns progress information about the current migration, if any.
54
+ *
55
+ * This function provides detailed information about the current migration's progress,
56
+ * including the number of steps completed and the maximum allowed steps.
57
+ **/
58
+ progress: GenericViewFunction<() => Promise<PalletMigrationsMbmProgress | undefined>>;
59
+
60
+ /**
61
+ * Returns the storage prefixes affected by the current migration.
62
+ *
63
+ * Can be empty if the migration does not know or there are no prefixes.
64
+ **/
65
+ affectedPrefixes: GenericViewFunction<() => Promise<Array<Bytes>>>;
66
+
67
+ /**
68
+ * Returns the comprehensive status of multi-block migrations.
69
+ **/
70
+ status: GenericViewFunction<() => Promise<PalletMigrationsMbmStatus>>;
71
+
31
72
  /**
32
73
  * Generic pallet view function
33
74
  **/