@dedot/chaintypes 0.0.1-next.f5bf4fc2.1 → 0.1.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.
Files changed (144) hide show
  1. package/README.md +3 -1
  2. package/aleph/consts.d.ts +94 -13
  3. package/aleph/errors.d.ts +251 -182
  4. package/aleph/events.d.ts +319 -102
  5. package/aleph/index.d.ts +16 -11
  6. package/aleph/json-rpc.d.ts +76 -0
  7. package/aleph/query.d.ts +261 -168
  8. package/aleph/runtime.d.ts +90 -39
  9. package/aleph/tx.d.ts +1822 -1052
  10. package/aleph/types.d.ts +458 -138
  11. package/astar/consts.d.ts +112 -116
  12. package/astar/errors.d.ts +342 -409
  13. package/astar/events.d.ts +449 -358
  14. package/astar/index.d.ts +16 -11
  15. package/astar/json-rpc.d.ts +131 -0
  16. package/astar/query.d.ts +459 -367
  17. package/astar/runtime.d.ts +591 -98
  18. package/astar/tx.d.ts +2485 -3430
  19. package/astar/types.d.ts +1530 -4436
  20. package/index.d.ts +3 -0
  21. package/index.ts +3 -0
  22. package/kusama/consts.d.ts +54 -115
  23. package/kusama/errors.d.ts +696 -682
  24. package/kusama/events.d.ts +592 -407
  25. package/kusama/index.d.ts +16 -11
  26. package/kusama/json-rpc.d.ts +103 -0
  27. package/kusama/query.d.ts +840 -538
  28. package/kusama/runtime.d.ts +136 -65
  29. package/kusama/tx.d.ts +4557 -3051
  30. package/kusama/types.d.ts +1437 -1161
  31. package/kusamaAssetHub/consts.d.ts +66 -20
  32. package/kusamaAssetHub/errors.d.ts +428 -308
  33. package/kusamaAssetHub/events.d.ts +497 -305
  34. package/kusamaAssetHub/index.d.ts +16 -11
  35. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  36. package/kusamaAssetHub/query.d.ts +376 -253
  37. package/kusamaAssetHub/runtime.d.ts +82 -41
  38. package/kusamaAssetHub/tx.d.ts +3264 -1955
  39. package/kusamaAssetHub/types.d.ts +1262 -726
  40. package/moonbeam/consts.d.ts +115 -170
  41. package/moonbeam/errors.d.ts +564 -787
  42. package/moonbeam/events.d.ts +583 -746
  43. package/moonbeam/index.d.ts +16 -11
  44. package/moonbeam/json-rpc.d.ts +137 -0
  45. package/moonbeam/query.d.ts +507 -607
  46. package/moonbeam/runtime.d.ts +132 -47
  47. package/moonbeam/tx.d.ts +3309 -3268
  48. package/moonbeam/types.d.ts +1484 -1375
  49. package/package.json +4 -14
  50. package/paseo/consts.d.ts +1331 -0
  51. package/paseo/errors.d.ts +2644 -0
  52. package/paseo/events.d.ts +2821 -0
  53. package/paseo/index.d.ts +27 -0
  54. package/paseo/json-rpc.d.ts +103 -0
  55. package/paseo/query.d.ts +3709 -0
  56. package/paseo/runtime.d.ts +1205 -0
  57. package/paseo/tx.d.ts +8024 -0
  58. package/paseo/types.d.ts +10194 -0
  59. package/polkadot/consts.d.ts +95 -50
  60. package/polkadot/errors.d.ts +619 -468
  61. package/polkadot/events.d.ts +582 -257
  62. package/polkadot/index.d.ts +16 -11
  63. package/polkadot/json-rpc.d.ts +103 -0
  64. package/polkadot/query.d.ts +770 -399
  65. package/polkadot/runtime.d.ts +136 -65
  66. package/polkadot/tx.d.ts +4268 -2368
  67. package/polkadot/types.d.ts +1570 -745
  68. package/polkadotAssetHub/consts.d.ts +154 -15
  69. package/polkadotAssetHub/errors.d.ts +615 -234
  70. package/polkadotAssetHub/events.d.ts +829 -270
  71. package/polkadotAssetHub/index.d.ts +16 -11
  72. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  73. package/polkadotAssetHub/query.d.ts +438 -243
  74. package/polkadotAssetHub/runtime.d.ts +147 -40
  75. package/polkadotAssetHub/tx.d.ts +3747 -1643
  76. package/polkadotAssetHub/types.d.ts +2096 -806
  77. package/rococo/consts.d.ts +51 -32
  78. package/rococo/errors.d.ts +549 -605
  79. package/rococo/events.d.ts +447 -238
  80. package/rococo/index.d.ts +16 -11
  81. package/rococo/json-rpc.d.ts +103 -0
  82. package/rococo/query.d.ts +724 -426
  83. package/rococo/runtime.d.ts +366 -144
  84. package/rococo/tx.d.ts +6850 -3079
  85. package/rococo/types.d.ts +5959 -1619
  86. package/rococoAssetHub/consts.d.ts +92 -7
  87. package/rococoAssetHub/errors.d.ts +381 -285
  88. package/rococoAssetHub/events.d.ts +461 -140
  89. package/rococoAssetHub/index.d.ts +16 -11
  90. package/rococoAssetHub/json-rpc.d.ts +89 -0
  91. package/rococoAssetHub/query.d.ts +487 -174
  92. package/rococoAssetHub/runtime.d.ts +235 -51
  93. package/rococoAssetHub/tx.d.ts +6005 -2163
  94. package/rococoAssetHub/types.d.ts +6683 -1003
  95. package/substrate/consts.d.ts +233 -52
  96. package/substrate/errors.d.ts +966 -781
  97. package/substrate/events.d.ts +1226 -381
  98. package/substrate/index.d.ts +16 -11
  99. package/substrate/json-rpc.d.ts +103 -0
  100. package/substrate/query.d.ts +1090 -460
  101. package/substrate/runtime.d.ts +274 -71
  102. package/substrate/tx.d.ts +12313 -4510
  103. package/substrate/types.d.ts +11036 -1432
  104. package/westend/consts.d.ts +1349 -0
  105. package/westend/errors.d.ts +2736 -0
  106. package/westend/events.d.ts +2906 -0
  107. package/westend/index.d.ts +27 -0
  108. package/westend/json-rpc.d.ts +103 -0
  109. package/westend/query.d.ts +3855 -0
  110. package/westend/runtime.d.ts +1437 -0
  111. package/westend/tx.d.ts +10248 -0
  112. package/westend/types.d.ts +14769 -0
  113. package/westendAssetHub/consts.d.ts +126 -7
  114. package/westendAssetHub/errors.d.ts +426 -285
  115. package/westendAssetHub/events.d.ts +498 -140
  116. package/westendAssetHub/index.d.ts +16 -11
  117. package/westendAssetHub/json-rpc.d.ts +89 -0
  118. package/westendAssetHub/query.d.ts +526 -174
  119. package/westendAssetHub/runtime.d.ts +245 -56
  120. package/westendAssetHub/tx.d.ts +6196 -2166
  121. package/westendAssetHub/types.d.ts +6913 -1002
  122. package/westendPeople/consts.d.ts +434 -0
  123. package/westendPeople/errors.d.ts +769 -0
  124. package/westendPeople/events.d.ts +1082 -0
  125. package/westendPeople/index.d.ts +27 -0
  126. package/westendPeople/json-rpc.d.ts +89 -0
  127. package/westendPeople/query.d.ts +1209 -0
  128. package/westendPeople/runtime.d.ts +636 -0
  129. package/westendPeople/tx.d.ts +2891 -0
  130. package/westendPeople/types.d.ts +4984 -0
  131. package/aleph/rpc.d.ts +0 -727
  132. package/astar/rpc.d.ts +0 -974
  133. package/kusama/rpc.d.ts +0 -904
  134. package/kusamaAssetHub/rpc.d.ts +0 -746
  135. package/moonbeam/rpc.d.ts +0 -1015
  136. package/packageInfo.d.ts +0 -4
  137. package/packageInfo.js +0 -2
  138. package/packageInfo.ts +0 -3
  139. package/polkadot/rpc.d.ts +0 -904
  140. package/polkadotAssetHub/rpc.d.ts +0 -746
  141. package/rococo/rpc.d.ts +0 -904
  142. package/rococoAssetHub/rpc.d.ts +0 -746
  143. package/substrate/rpc.d.ts +0 -894
  144. package/westendAssetHub/rpc.d.ts +0 -746
@@ -1,6 +1,6 @@
1
- // Generated by @dedot/codegen
1
+ // Generated by dedot cli
2
2
 
3
- import type { GenericRuntimeApis, GenericRuntimeApiMethod } from '@dedot/types';
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
4
  import type {
5
5
  H256,
6
6
  RuntimeVersion,
@@ -13,12 +13,13 @@ import type {
13
13
  BytesLike,
14
14
  AccountId32Like,
15
15
  AccountId32,
16
- } from '@dedot/codecs';
16
+ } from 'dedot/codecs';
17
17
  import type {
18
18
  SpConsensusSlotsSlotDuration,
19
19
  SpConsensusAuraSr25519AppSr25519Public,
20
20
  SpConsensusSlotsSlot,
21
21
  SpRuntimeBlock,
22
+ SpRuntimeExtrinsicInclusionMode,
22
23
  SpCoreOpaqueMetadata,
23
24
  SpRuntimeTransactionValidityTransactionValidityError,
24
25
  SpInherentsInherentData,
@@ -30,13 +31,22 @@ import type {
30
31
  PalletTransactionPaymentRuntimeDispatchInfo,
31
32
  PalletTransactionPaymentFeeDetails,
32
33
  SpWeightsWeightV2Weight,
33
- AssetHubWestendRuntimeRuntimeCallLike,
34
+ XcmVersionedAssetId,
35
+ XcmRuntimeApisFeesError,
36
+ XcmVersionedXcm,
34
37
  XcmVersionedAssets,
38
+ XcmVersionedLocation,
39
+ XcmRuntimeApisDryRunCallDryRunEffects,
40
+ XcmRuntimeApisDryRunError,
41
+ AssetHubWestendRuntimeOriginCaller,
42
+ AssetHubWestendRuntimeRuntimeCallLike,
43
+ XcmRuntimeApisDryRunXcmDryRunEffects,
44
+ XcmRuntimeApisConversionsError,
35
45
  AssetsCommonRuntimeApiFungiblesAccessError,
36
46
  CumulusPrimitivesCoreCollationInfo,
37
47
  } from './types';
38
48
 
39
- export interface RuntimeApis extends GenericRuntimeApis {
49
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
40
50
  /**
41
51
  * @runtimeapi: AuraApi - 0xdd718d5cc53262d4
42
52
  **/
@@ -48,19 +58,19 @@ export interface RuntimeApis extends GenericRuntimeApis {
48
58
  *
49
59
  * @callname: AuraApi_slot_duration
50
60
  **/
51
- slotDuration: GenericRuntimeApiMethod<() => Promise<SpConsensusSlotsSlotDuration>>;
61
+ slotDuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlotDuration>>;
52
62
 
53
63
  /**
54
64
  * Return the current set of authorities.
55
65
  *
56
66
  * @callname: AuraApi_authorities
57
67
  **/
58
- authorities: GenericRuntimeApiMethod<() => Promise<Array<SpConsensusAuraSr25519AppSr25519Public>>>;
68
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpConsensusAuraSr25519AppSr25519Public>>>;
59
69
 
60
70
  /**
61
71
  * Generic runtime api call
62
72
  **/
63
- [method: string]: GenericRuntimeApiMethod;
73
+ [method: string]: GenericRuntimeApiMethod<Rv>;
64
74
  };
65
75
  /**
66
76
  * @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
@@ -82,12 +92,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
82
92
  * @param {H256} included_hash
83
93
  * @param {SpConsensusSlotsSlot} slot
84
94
  **/
85
- canBuildUpon: GenericRuntimeApiMethod<(includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
95
+ canBuildUpon: GenericRuntimeApiMethod<Rv, (includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
86
96
 
87
97
  /**
88
98
  * Generic runtime api call
89
99
  **/
90
- [method: string]: GenericRuntimeApiMethod;
100
+ [method: string]: GenericRuntimeApiMethod<Rv>;
91
101
  };
92
102
  /**
93
103
  * @runtimeapi: Core - 0xdf6acb689907609b
@@ -98,7 +108,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
98
108
  *
99
109
  * @callname: Core_version
100
110
  **/
101
- version: GenericRuntimeApiMethod<() => Promise<RuntimeVersion>>;
111
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
102
112
 
103
113
  /**
104
114
  * Execute the given block.
@@ -106,20 +116,20 @@ export interface RuntimeApis extends GenericRuntimeApis {
106
116
  * @callname: Core_execute_block
107
117
  * @param {SpRuntimeBlock} block
108
118
  **/
109
- executeBlock: GenericRuntimeApiMethod<(block: SpRuntimeBlock) => Promise<[]>>;
119
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
110
120
 
111
121
  /**
112
- * Initialize a block with the given header.
122
+ * Initialize a block with the given header and return the runtime executive mode.
113
123
  *
114
124
  * @callname: Core_initialize_block
115
125
  * @param {Header} header
116
126
  **/
117
- initializeBlock: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
127
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
118
128
 
119
129
  /**
120
130
  * Generic runtime api call
121
131
  **/
122
- [method: string]: GenericRuntimeApiMethod;
132
+ [method: string]: GenericRuntimeApiMethod<Rv>;
123
133
  };
124
134
  /**
125
135
  * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
@@ -130,7 +140,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
130
140
  *
131
141
  * @callname: Metadata_metadata
132
142
  **/
133
- metadata: GenericRuntimeApiMethod<() => Promise<SpCoreOpaqueMetadata>>;
143
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
134
144
 
135
145
  /**
136
146
  * Returns the metadata at a given version.
@@ -141,7 +151,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
141
151
  * @callname: Metadata_metadata_at_version
142
152
  * @param {number} version
143
153
  **/
144
- metadataAtVersion: GenericRuntimeApiMethod<(version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
154
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
145
155
 
146
156
  /**
147
157
  * Returns the supported metadata versions.
@@ -150,12 +160,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
150
160
  *
151
161
  * @callname: Metadata_metadata_versions
152
162
  **/
153
- metadataVersions: GenericRuntimeApiMethod<() => Promise<Array<number>>>;
163
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
154
164
 
155
165
  /**
156
166
  * Generic runtime api call
157
167
  **/
158
- [method: string]: GenericRuntimeApiMethod;
168
+ [method: string]: GenericRuntimeApiMethod<Rv>;
159
169
  };
160
170
  /**
161
171
  * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
@@ -171,6 +181,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
171
181
  * @param {UncheckedExtrinsicLike} extrinsic
172
182
  **/
173
183
  applyExtrinsic: GenericRuntimeApiMethod<
184
+ Rv,
174
185
  (
175
186
  extrinsic: UncheckedExtrinsicLike,
176
187
  ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
@@ -181,7 +192,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
181
192
  *
182
193
  * @callname: BlockBuilder_finalize_block
183
194
  **/
184
- finalizeBlock: GenericRuntimeApiMethod<() => Promise<Header>>;
195
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
185
196
 
186
197
  /**
187
198
  * Generate inherent extrinsics. The inherent data will vary from chain to chain.
@@ -190,6 +201,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
190
201
  * @param {SpInherentsInherentData} inherent
191
202
  **/
192
203
  inherentExtrinsics: GenericRuntimeApiMethod<
204
+ Rv,
193
205
  (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
194
206
  >;
195
207
 
@@ -201,13 +213,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
201
213
  * @param {SpInherentsInherentData} data
202
214
  **/
203
215
  checkInherents: GenericRuntimeApiMethod<
216
+ Rv,
204
217
  (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
205
218
  >;
206
219
 
207
220
  /**
208
221
  * Generic runtime api call
209
222
  **/
210
- [method: string]: GenericRuntimeApiMethod;
223
+ [method: string]: GenericRuntimeApiMethod<Rv>;
211
224
  };
212
225
  /**
213
226
  * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
@@ -230,6 +243,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
230
243
  * @param {H256} block_hash
231
244
  **/
232
245
  validateTransaction: GenericRuntimeApiMethod<
246
+ Rv,
233
247
  (
234
248
  source: SpRuntimeTransactionValidityTransactionSource,
235
249
  tx: UncheckedExtrinsicLike,
@@ -242,7 +256,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
242
256
  /**
243
257
  * Generic runtime api call
244
258
  **/
245
- [method: string]: GenericRuntimeApiMethod;
259
+ [method: string]: GenericRuntimeApiMethod<Rv>;
246
260
  };
247
261
  /**
248
262
  * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
@@ -254,12 +268,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
254
268
  * @callname: OffchainWorkerApi_offchain_worker
255
269
  * @param {Header} header
256
270
  **/
257
- offchainWorker: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
271
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
258
272
 
259
273
  /**
260
274
  * Generic runtime api call
261
275
  **/
262
- [method: string]: GenericRuntimeApiMethod;
276
+ [method: string]: GenericRuntimeApiMethod<Rv>;
263
277
  };
264
278
  /**
265
279
  * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
@@ -277,7 +291,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
277
291
  * @callname: SessionKeys_generate_session_keys
278
292
  * @param {BytesLike | undefined} seed
279
293
  **/
280
- generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
294
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
281
295
 
282
296
  /**
283
297
  * Decode the given public session keys.
@@ -288,13 +302,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
288
302
  * @param {BytesLike} encoded
289
303
  **/
290
304
  decodeSessionKeys: GenericRuntimeApiMethod<
305
+ Rv,
291
306
  (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
292
307
  >;
293
308
 
294
309
  /**
295
310
  * Generic runtime api call
296
311
  **/
297
- [method: string]: GenericRuntimeApiMethod;
312
+ [method: string]: GenericRuntimeApiMethod<Rv>;
298
313
  };
299
314
  /**
300
315
  * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
@@ -306,12 +321,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
306
321
  * @callname: AccountNonceApi_account_nonce
307
322
  * @param {AccountId32Like} account
308
323
  **/
309
- accountNonce: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<number>>;
324
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
310
325
 
311
326
  /**
312
327
  * Generic runtime api call
313
328
  **/
314
- [method: string]: GenericRuntimeApiMethod;
329
+ [method: string]: GenericRuntimeApiMethod<Rv>;
315
330
  };
316
331
  /**
317
332
  * @runtimeapi: NftsApi - 0x899a250cbe84f250
@@ -323,14 +338,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
323
338
  * @param {number} collection
324
339
  * @param {number} item
325
340
  **/
326
- owner: GenericRuntimeApiMethod<(collection: number, item: number) => Promise<AccountId32 | undefined>>;
341
+ owner: GenericRuntimeApiMethod<Rv, (collection: number, item: number) => Promise<AccountId32 | undefined>>;
327
342
 
328
343
  /**
329
344
  *
330
345
  * @callname: NftsApi_collection_owner
331
346
  * @param {number} collection
332
347
  **/
333
- collectionOwner: GenericRuntimeApiMethod<(collection: number) => Promise<AccountId32 | undefined>>;
348
+ collectionOwner: GenericRuntimeApiMethod<Rv, (collection: number) => Promise<AccountId32 | undefined>>;
334
349
 
335
350
  /**
336
351
  *
@@ -340,6 +355,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
340
355
  * @param {BytesLike} key
341
356
  **/
342
357
  attribute: GenericRuntimeApiMethod<
358
+ Rv,
343
359
  (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
344
360
  >;
345
361
 
@@ -352,6 +368,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
352
368
  * @param {BytesLike} key
353
369
  **/
354
370
  customAttribute: GenericRuntimeApiMethod<
371
+ Rv,
355
372
  (account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
356
373
  >;
357
374
 
@@ -363,6 +380,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
363
380
  * @param {BytesLike} key
364
381
  **/
365
382
  systemAttribute: GenericRuntimeApiMethod<
383
+ Rv,
366
384
  (collection: number, item: number | undefined, key: BytesLike) => Promise<Bytes | undefined>
367
385
  >;
368
386
 
@@ -372,12 +390,15 @@ export interface RuntimeApis extends GenericRuntimeApis {
372
390
  * @param {number} collection
373
391
  * @param {BytesLike} key
374
392
  **/
375
- collectionAttribute: GenericRuntimeApiMethod<(collection: number, key: BytesLike) => Promise<Bytes | undefined>>;
393
+ collectionAttribute: GenericRuntimeApiMethod<
394
+ Rv,
395
+ (collection: number, key: BytesLike) => Promise<Bytes | undefined>
396
+ >;
376
397
 
377
398
  /**
378
399
  * Generic runtime api call
379
400
  **/
380
- [method: string]: GenericRuntimeApiMethod;
401
+ [method: string]: GenericRuntimeApiMethod<Rv>;
381
402
  };
382
403
  /**
383
404
  * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
@@ -396,6 +417,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
396
417
  * @param {boolean} include_fee
397
418
  **/
398
419
  quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
420
+ Rv,
399
421
  (
400
422
  asset1: StagingXcmV3MultilocationMultiLocation,
401
423
  asset2: StagingXcmV3MultilocationMultiLocation,
@@ -417,6 +439,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
417
439
  * @param {boolean} include_fee
418
440
  **/
419
441
  quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
442
+ Rv,
420
443
  (
421
444
  asset1: StagingXcmV3MultilocationMultiLocation,
422
445
  asset2: StagingXcmV3MultilocationMultiLocation,
@@ -433,6 +456,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
433
456
  * @param {StagingXcmV3MultilocationMultiLocation} asset2
434
457
  **/
435
458
  getReserves: GenericRuntimeApiMethod<
459
+ Rv,
436
460
  (
437
461
  asset1: StagingXcmV3MultilocationMultiLocation,
438
462
  asset2: StagingXcmV3MultilocationMultiLocation,
@@ -442,7 +466,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
442
466
  /**
443
467
  * Generic runtime api call
444
468
  **/
445
- [method: string]: GenericRuntimeApiMethod;
469
+ [method: string]: GenericRuntimeApiMethod<Rv>;
446
470
  };
447
471
  /**
448
472
  * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
@@ -455,6 +479,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
455
479
  * @param {number} len
456
480
  **/
457
481
  queryInfo: GenericRuntimeApiMethod<
482
+ Rv,
458
483
  (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
459
484
  >;
460
485
 
@@ -465,6 +490,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
465
490
  * @param {number} len
466
491
  **/
467
492
  queryFeeDetails: GenericRuntimeApiMethod<
493
+ Rv,
468
494
  (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
469
495
  >;
470
496
 
@@ -473,19 +499,156 @@ export interface RuntimeApis extends GenericRuntimeApis {
473
499
  * @callname: TransactionPaymentApi_query_weight_to_fee
474
500
  * @param {SpWeightsWeightV2Weight} weight
475
501
  **/
476
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
502
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
477
503
 
478
504
  /**
479
505
  *
480
506
  * @callname: TransactionPaymentApi_query_length_to_fee
481
507
  * @param {number} length
482
508
  **/
483
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
509
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
510
+
511
+ /**
512
+ * Generic runtime api call
513
+ **/
514
+ [method: string]: GenericRuntimeApiMethod<Rv>;
515
+ };
516
+ /**
517
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
518
+ **/
519
+ xcmPaymentApi: {
520
+ /**
521
+ * Returns a list of acceptable payment assets.
522
+ *
523
+ * # Arguments
524
+ *
525
+ * * `xcm_version`: Version.
526
+ *
527
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
528
+ * @param {number} xcm_version
529
+ **/
530
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
531
+ Rv,
532
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
533
+ >;
534
+
535
+ /**
536
+ * Returns a weight needed to execute a XCM.
537
+ *
538
+ * # Arguments
539
+ *
540
+ * * `message`: `VersionedXcm`.
541
+ *
542
+ * @callname: XcmPaymentApi_query_xcm_weight
543
+ * @param {XcmVersionedXcm} message
544
+ **/
545
+ queryXcmWeight: GenericRuntimeApiMethod<
546
+ Rv,
547
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
548
+ >;
549
+
550
+ /**
551
+ * Converts a weight into a fee for the specified `AssetId`.
552
+ *
553
+ * # Arguments
554
+ *
555
+ * * `weight`: convertible `Weight`.
556
+ * * `asset`: `VersionedAssetId`.
557
+ *
558
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
559
+ * @param {SpWeightsWeightV2Weight} weight
560
+ * @param {XcmVersionedAssetId} asset
561
+ **/
562
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
563
+ Rv,
564
+ (weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
565
+ >;
566
+
567
+ /**
568
+ * Get delivery fees for sending a specific `message` to a `destination`.
569
+ * These always come in a specific asset, defined by the chain.
570
+ *
571
+ * # Arguments
572
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
573
+ * size of the message.
574
+ * * `destination`: The destination to send the message to. Different destinations may use
575
+ * different senders that charge different fees.
576
+ *
577
+ * @callname: XcmPaymentApi_query_delivery_fees
578
+ * @param {XcmVersionedLocation} destination
579
+ * @param {XcmVersionedXcm} message
580
+ **/
581
+ queryDeliveryFees: GenericRuntimeApiMethod<
582
+ Rv,
583
+ (
584
+ destination: XcmVersionedLocation,
585
+ message: XcmVersionedXcm,
586
+ ) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
587
+ >;
588
+
589
+ /**
590
+ * Generic runtime api call
591
+ **/
592
+ [method: string]: GenericRuntimeApiMethod<Rv>;
593
+ };
594
+ /**
595
+ * @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
596
+ **/
597
+ dryRunApi: {
598
+ /**
599
+ * Dry run call.
600
+ *
601
+ * @callname: DryRunApi_dry_run_call
602
+ * @param {AssetHubWestendRuntimeOriginCaller} origin
603
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} call
604
+ **/
605
+ dryRunCall: GenericRuntimeApiMethod<
606
+ Rv,
607
+ (
608
+ origin: AssetHubWestendRuntimeOriginCaller,
609
+ call: AssetHubWestendRuntimeRuntimeCallLike,
610
+ ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
611
+ >;
612
+
613
+ /**
614
+ * Dry run XCM program
615
+ *
616
+ * @callname: DryRunApi_dry_run_xcm
617
+ * @param {XcmVersionedLocation} origin_location
618
+ * @param {XcmVersionedXcm} xcm
619
+ **/
620
+ dryRunXcm: GenericRuntimeApiMethod<
621
+ Rv,
622
+ (
623
+ originLocation: XcmVersionedLocation,
624
+ xcm: XcmVersionedXcm,
625
+ ) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
626
+ >;
627
+
628
+ /**
629
+ * Generic runtime api call
630
+ **/
631
+ [method: string]: GenericRuntimeApiMethod<Rv>;
632
+ };
633
+ /**
634
+ * @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
635
+ **/
636
+ locationToAccountApi: {
637
+ /**
638
+ * Converts `Location` to `AccountId`.
639
+ *
640
+ * @callname: LocationToAccountApi_convert_location
641
+ * @param {XcmVersionedLocation} location
642
+ **/
643
+ convertLocation: GenericRuntimeApiMethod<
644
+ Rv,
645
+ (location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
646
+ >;
484
647
 
485
648
  /**
486
649
  * Generic runtime api call
487
650
  **/
488
- [method: string]: GenericRuntimeApiMethod;
651
+ [method: string]: GenericRuntimeApiMethod<Rv>;
489
652
  };
490
653
  /**
491
654
  * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
@@ -499,6 +662,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
499
662
  * @param {number} len
500
663
  **/
501
664
  queryCallInfo: GenericRuntimeApiMethod<
665
+ Rv,
502
666
  (call: AssetHubWestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
503
667
  >;
504
668
 
@@ -510,6 +674,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
510
674
  * @param {number} len
511
675
  **/
512
676
  queryCallFeeDetails: GenericRuntimeApiMethod<
677
+ Rv,
513
678
  (call: AssetHubWestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
514
679
  >;
515
680
 
@@ -519,7 +684,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
519
684
  * @callname: TransactionPaymentCallApi_query_weight_to_fee
520
685
  * @param {SpWeightsWeightV2Weight} weight
521
686
  **/
522
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
687
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
523
688
 
524
689
  /**
525
690
  * Query the output of the current `LengthToFee` given some input.
@@ -527,12 +692,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
527
692
  * @callname: TransactionPaymentCallApi_query_length_to_fee
528
693
  * @param {number} length
529
694
  **/
530
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
695
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
531
696
 
532
697
  /**
533
698
  * Generic runtime api call
534
699
  **/
535
- [method: string]: GenericRuntimeApiMethod;
700
+ [method: string]: GenericRuntimeApiMethod<Rv>;
536
701
  };
537
702
  /**
538
703
  * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
@@ -545,13 +710,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
545
710
  * @param {AccountId32Like} account
546
711
  **/
547
712
  queryAccountBalances: GenericRuntimeApiMethod<
713
+ Rv,
548
714
  (account: AccountId32Like) => Promise<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>
549
715
  >;
550
716
 
551
717
  /**
552
718
  * Generic runtime api call
553
719
  **/
554
- [method: string]: GenericRuntimeApiMethod;
720
+ [method: string]: GenericRuntimeApiMethod<Rv>;
555
721
  };
556
722
  /**
557
723
  * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
@@ -566,44 +732,67 @@ export interface RuntimeApis extends GenericRuntimeApis {
566
732
  * @callname: CollectCollationInfo_collect_collation_info
567
733
  * @param {Header} header
568
734
  **/
569
- collectCollationInfo: GenericRuntimeApiMethod<(header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
735
+ collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
570
736
 
571
737
  /**
572
738
  * Generic runtime api call
573
739
  **/
574
- [method: string]: GenericRuntimeApiMethod;
740
+ [method: string]: GenericRuntimeApiMethod<Rv>;
575
741
  };
576
742
  /**
577
743
  * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
578
744
  **/
579
745
  genesisBuilder: {
580
746
  /**
581
- * Creates the default `GenesisConfig` and returns it as a JSON blob.
747
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
748
+ * storage.
749
+ *
750
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
751
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
752
+ * deserialization fails, an error is returned.
582
753
  *
583
- * This function instantiates the default `GenesisConfig` struct for the runtime and serializes it into a JSON
584
- * blob. It returns a `Vec<u8>` containing the JSON representation of the default `GenesisConfig`.
754
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
755
+ * defaults will be used.
585
756
  *
586
- * @callname: GenesisBuilder_create_default_config
757
+ * @callname: GenesisBuilder_build_state
758
+ * @param {BytesLike} json
587
759
  **/
588
- createDefaultConfig: GenericRuntimeApiMethod<() => Promise<Bytes>>;
760
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
589
761
 
590
762
  /**
591
- * Build `GenesisConfig` from a JSON blob not using any defaults and store it in the storage.
763
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
764
+ * `id`.
592
765
  *
593
- * This function deserializes the full `GenesisConfig` from the given JSON blob and puts it into the storage.
594
- * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
595
- * It is recommended to log any errors encountered during the process.
766
+ * If `id` is `None` the function returns JSON blob representation of the default
767
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
768
+ * `RuntimeGenesisConfig`.
596
769
  *
597
- * Please note that provided json blob must contain all `GenesisConfig` fields, no defaults will be used.
770
+ * Otherwise function returns a JSON representation of the built-in, named
771
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
772
+ * exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
773
+ * (potentially nested) key-value pairs that are intended for customizing the default
774
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
775
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
776
+ * be used in `build_state` method.
598
777
  *
599
- * @callname: GenesisBuilder_build_config
600
- * @param {BytesLike} json
778
+ * @callname: GenesisBuilder_get_preset
779
+ * @param {string | undefined} id
780
+ **/
781
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
782
+
783
+ /**
784
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
785
+ *
786
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
787
+ * no named presets are provided by the runtime the list is empty.
788
+ *
789
+ * @callname: GenesisBuilder_preset_names
601
790
  **/
602
- buildConfig: GenericRuntimeApiMethod<(json: BytesLike) => Promise<Result<[], string>>>;
791
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
603
792
 
604
793
  /**
605
794
  * Generic runtime api call
606
795
  **/
607
- [method: string]: GenericRuntimeApiMethod;
796
+ [method: string]: GenericRuntimeApiMethod<Rv>;
608
797
  };
609
798
  }