@dedot/chaintypes 0.175.0 → 0.177.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.
@@ -1,6 +1,7 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainViewFunctions, GenericViewFunction, RpcVersion } from 'dedot/types';
4
+ import type { AccountId32Like } from 'dedot/codecs';
4
5
  import type { AssetHubPolkadotRuntimeRuntimeCallLike, AssetHubPolkadotRuntimeProxyType } from './types.js';
5
6
 
6
7
  export interface ChainViewFunctions<Rv extends RpcVersion> extends GenericChainViewFunctions<Rv> {
@@ -30,6 +31,49 @@ export interface ChainViewFunctions<Rv extends RpcVersion> extends GenericChainV
30
31
  (toCheck: AssetHubPolkadotRuntimeProxyType, against: AssetHubPolkadotRuntimeProxyType) => Promise<boolean>
31
32
  >;
32
33
 
34
+ /**
35
+ * Generic pallet view function
36
+ **/
37
+ [name: string]: GenericViewFunction<Rv>;
38
+ };
39
+ /**
40
+ * Pallet `VoterList`'s view functions
41
+ **/
42
+ voterList: {
43
+ /**
44
+ * Get the current `score` of a given account.
45
+ *
46
+ * Returns `(current, real_score)`, the former being the current score that this pallet is
47
+ * aware of, which may or may not be up to date, and the latter being the real score, as
48
+ * provided by
49
+ *
50
+ * If the two differ, it means this node is eligible for [`Call::rebag`].
51
+ *
52
+ * @param {AccountId32Like} who
53
+ **/
54
+ scores: GenericViewFunction<Rv, (who: AccountId32Like) => Promise<[bigint | undefined, bigint | undefined]>>;
55
+
56
+ /**
57
+ * Generic pallet view function
58
+ **/
59
+ [name: string]: GenericViewFunction<Rv>;
60
+ };
61
+ /**
62
+ * Pallet `MultiBlockElectionSigned`'s view functions
63
+ **/
64
+ multiBlockElectionSigned: {
65
+ /**
66
+ * Get the deposit amount that will be held for a solution of `pages`.
67
+ *
68
+ * This allows an offchain application to know what [`Config::DepositPerPage`] and
69
+ * [`Config::DepositBase`] are doing under the hood. It also takes into account if `who` is
70
+ * [`Invulnerables`] or not.
71
+ *
72
+ * @param {AccountId32Like} who
73
+ * @param {number} pages
74
+ **/
75
+ depositFor: GenericViewFunction<Rv, (who: AccountId32Like, pages: number) => Promise<bigint>>;
76
+
33
77
  /**
34
78
  * Generic pallet view function
35
79
  **/
@@ -58,7 +58,7 @@ export interface VersionedPolkadotPeopleApi<Rv extends RpcVersion> extends Gener
58
58
 
59
59
  /**
60
60
  * @name: PolkadotPeopleApi
61
- * @specVersion: 1007001
61
+ * @specVersion: 2000000
62
62
  **/
63
63
  export interface PolkadotPeopleApi {
64
64
  legacy: VersionedPolkadotPeopleApi<RpcLegacy>;
@@ -27,6 +27,8 @@ import type {
27
27
  SpRuntimeTransactionValidityValidTransaction,
28
28
  SpRuntimeTransactionValidityTransactionSource,
29
29
  SpCoreCryptoKeyTypeId,
30
+ FrameSupportViewFunctionsViewFunctionDispatchError,
31
+ FrameSupportViewFunctionsViewFunctionId,
30
32
  PalletTransactionPaymentRuntimeDispatchInfo,
31
33
  PalletTransactionPaymentFeeDetails,
32
34
  SpWeightsWeightV2Weight,
@@ -330,6 +332,30 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
330
332
  **/
331
333
  [method: string]: GenericRuntimeApiMethod<Rv>;
332
334
  };
335
+ /**
336
+ * @runtimeapi: RuntimeViewFunction - 0xccd9de6396c899ca
337
+ **/
338
+ runtimeViewFunction: {
339
+ /**
340
+ * Execute a view function query.
341
+ *
342
+ * @callname: RuntimeViewFunction_execute_view_function
343
+ * @param {FrameSupportViewFunctionsViewFunctionId} query_id
344
+ * @param {BytesLike} input
345
+ **/
346
+ executeViewFunction: GenericRuntimeApiMethod<
347
+ Rv,
348
+ (
349
+ queryId: FrameSupportViewFunctionsViewFunctionId,
350
+ input: BytesLike,
351
+ ) => Promise<Result<Bytes, FrameSupportViewFunctionsViewFunctionDispatchError>>
352
+ >;
353
+
354
+ /**
355
+ * Generic runtime api call
356
+ **/
357
+ [method: string]: GenericRuntimeApiMethod<Rv>;
358
+ };
333
359
  /**
334
360
  * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
335
361
  **/
@@ -6037,6 +6037,13 @@ export type SpRuntimeTransactionValidityValidTransaction = {
6037
6037
  propagate: boolean;
6038
6038
  };
6039
6039
 
6040
+ export type FrameSupportViewFunctionsViewFunctionId = { prefix: FixedBytes<16>; suffix: FixedBytes<16> };
6041
+
6042
+ export type FrameSupportViewFunctionsViewFunctionDispatchError =
6043
+ | { type: 'NotImplemented' }
6044
+ | { type: 'NotFound'; value: FrameSupportViewFunctionsViewFunctionId }
6045
+ | { type: 'Codec' };
6046
+
6040
6047
  export type PalletTransactionPaymentRuntimeDispatchInfo = {
6041
6048
  weight: SpWeightsWeightV2Weight;
6042
6049
  class: FrameSupportDispatchDispatchClass;