@dedot/chaintypes 0.0.1-alpha.100

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 (105) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -0
  3. package/aleph/consts.d.ts +676 -0
  4. package/aleph/errors.d.ts +1054 -0
  5. package/aleph/events.d.ts +1201 -0
  6. package/aleph/index.d.ts +27 -0
  7. package/aleph/json-rpc.d.ts +85 -0
  8. package/aleph/query.d.ts +1573 -0
  9. package/aleph/runtime.d.ts +596 -0
  10. package/aleph/tx.d.ts +3440 -0
  11. package/aleph/types.d.ts +3951 -0
  12. package/astar/consts.d.ts +737 -0
  13. package/astar/errors.d.ts +1508 -0
  14. package/astar/events.d.ts +1878 -0
  15. package/astar/index.d.ts +27 -0
  16. package/astar/json-rpc.d.ts +131 -0
  17. package/astar/query.d.ts +1851 -0
  18. package/astar/runtime.d.ts +803 -0
  19. package/astar/tx.d.ts +4516 -0
  20. package/astar/types.d.ts +6141 -0
  21. package/index.d.ts +11 -0
  22. package/index.js +1 -0
  23. package/index.ts +11 -0
  24. package/kusama/consts.d.ts +1578 -0
  25. package/kusama/errors.d.ts +3152 -0
  26. package/kusama/events.d.ts +3579 -0
  27. package/kusama/index.d.ts +27 -0
  28. package/kusama/json-rpc.d.ts +103 -0
  29. package/kusama/query.d.ts +4229 -0
  30. package/kusama/runtime.d.ts +1196 -0
  31. package/kusama/tx.d.ts +9040 -0
  32. package/kusama/types.d.ts +11369 -0
  33. package/kusamaAssetHub/consts.d.ts +759 -0
  34. package/kusamaAssetHub/errors.d.ts +1494 -0
  35. package/kusamaAssetHub/events.d.ts +2491 -0
  36. package/kusamaAssetHub/index.d.ts +27 -0
  37. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  38. package/kusamaAssetHub/query.d.ts +1662 -0
  39. package/kusamaAssetHub/runtime.d.ts +555 -0
  40. package/kusamaAssetHub/tx.d.ts +6192 -0
  41. package/kusamaAssetHub/types.d.ts +6831 -0
  42. package/moonbeam/consts.d.ts +1010 -0
  43. package/moonbeam/errors.d.ts +1932 -0
  44. package/moonbeam/events.d.ts +2928 -0
  45. package/moonbeam/index.d.ts +27 -0
  46. package/moonbeam/json-rpc.d.ts +137 -0
  47. package/moonbeam/query.d.ts +2282 -0
  48. package/moonbeam/runtime.d.ts +724 -0
  49. package/moonbeam/tx.d.ts +6222 -0
  50. package/moonbeam/types.d.ts +8165 -0
  51. package/package.json +25 -0
  52. package/polkadot/consts.d.ts +1313 -0
  53. package/polkadot/errors.d.ts +2575 -0
  54. package/polkadot/events.d.ts +2757 -0
  55. package/polkadot/index.d.ts +27 -0
  56. package/polkadot/json-rpc.d.ts +103 -0
  57. package/polkadot/query.d.ts +3693 -0
  58. package/polkadot/runtime.d.ts +1196 -0
  59. package/polkadot/tx.d.ts +7706 -0
  60. package/polkadot/types.d.ts +9893 -0
  61. package/polkadotAssetHub/consts.d.ts +724 -0
  62. package/polkadotAssetHub/errors.d.ts +1465 -0
  63. package/polkadotAssetHub/events.d.ts +2462 -0
  64. package/polkadotAssetHub/index.d.ts +27 -0
  65. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  66. package/polkadotAssetHub/query.d.ts +1640 -0
  67. package/polkadotAssetHub/runtime.d.ts +558 -0
  68. package/polkadotAssetHub/tx.d.ts +6121 -0
  69. package/polkadotAssetHub/types.d.ts +6739 -0
  70. package/rococo/consts.d.ts +1423 -0
  71. package/rococo/errors.d.ts +2783 -0
  72. package/rococo/events.d.ts +3361 -0
  73. package/rococo/index.d.ts +27 -0
  74. package/rococo/json-rpc.d.ts +103 -0
  75. package/rococo/query.d.ts +3561 -0
  76. package/rococo/runtime.d.ts +1257 -0
  77. package/rococo/tx.d.ts +10721 -0
  78. package/rococo/types.d.ts +14828 -0
  79. package/rococoAssetHub/consts.d.ts +787 -0
  80. package/rococoAssetHub/errors.d.ts +1523 -0
  81. package/rococoAssetHub/events.d.ts +2517 -0
  82. package/rococoAssetHub/index.d.ts +27 -0
  83. package/rococoAssetHub/json-rpc.d.ts +89 -0
  84. package/rococoAssetHub/query.d.ts +1682 -0
  85. package/rococoAssetHub/runtime.d.ts +704 -0
  86. package/rococoAssetHub/tx.d.ts +9013 -0
  87. package/rococoAssetHub/types.d.ts +12352 -0
  88. package/substrate/consts.d.ts +2223 -0
  89. package/substrate/errors.d.ts +4023 -0
  90. package/substrate/events.d.ts +5430 -0
  91. package/substrate/index.d.ts +27 -0
  92. package/substrate/json-rpc.d.ts +101 -0
  93. package/substrate/query.d.ts +4083 -0
  94. package/substrate/runtime.d.ts +971 -0
  95. package/substrate/tx.d.ts +12501 -0
  96. package/substrate/types.d.ts +13380 -0
  97. package/westendAssetHub/consts.d.ts +787 -0
  98. package/westendAssetHub/errors.d.ts +1523 -0
  99. package/westendAssetHub/events.d.ts +2477 -0
  100. package/westendAssetHub/index.d.ts +27 -0
  101. package/westendAssetHub/json-rpc.d.ts +89 -0
  102. package/westendAssetHub/query.d.ts +1656 -0
  103. package/westendAssetHub/runtime.d.ts +652 -0
  104. package/westendAssetHub/tx.d.ts +8984 -0
  105. package/westendAssetHub/types.d.ts +12292 -0
@@ -0,0 +1,558 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ H256,
6
+ RuntimeVersion,
7
+ Header,
8
+ DispatchError,
9
+ Result,
10
+ UncheckedExtrinsicLike,
11
+ UncheckedExtrinsic,
12
+ Bytes,
13
+ BytesLike,
14
+ AccountId32Like,
15
+ } from 'dedot/codecs';
16
+ import type {
17
+ SpConsensusSlotsSlotDuration,
18
+ SpConsensusAuraEd25519AppEd25519Public,
19
+ SpConsensusSlotsSlot,
20
+ SpRuntimeBlock,
21
+ SpCoreOpaqueMetadata,
22
+ SpRuntimeTransactionValidityTransactionValidityError,
23
+ SpInherentsInherentData,
24
+ SpInherentsCheckInherentsResult,
25
+ SpRuntimeTransactionValidityValidTransaction,
26
+ SpRuntimeTransactionValidityTransactionSource,
27
+ SpCoreCryptoKeyTypeId,
28
+ PalletTransactionPaymentRuntimeDispatchInfo,
29
+ PalletTransactionPaymentFeeDetails,
30
+ SpWeightsWeightV2Weight,
31
+ AssetHubPolkadotRuntimeRuntimeCallLike,
32
+ XcmVersionedAssets,
33
+ AssetsCommonRuntimeApiFungiblesAccessError,
34
+ CumulusPrimitivesCoreCollationInfo,
35
+ StagingXcmV3MultilocationMultiLocation,
36
+ } from './types';
37
+
38
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
39
+ /**
40
+ * @runtimeapi: AuraApi - 0xdd718d5cc53262d4
41
+ **/
42
+ auraApi: {
43
+ /**
44
+ * Returns the slot duration for Aura.
45
+ *
46
+ * Currently, only the value provided by this type at genesis will be used.
47
+ *
48
+ * @callname: AuraApi_slot_duration
49
+ **/
50
+ slotDuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlotDuration>>;
51
+
52
+ /**
53
+ * Return the current set of authorities.
54
+ *
55
+ * @callname: AuraApi_authorities
56
+ **/
57
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpConsensusAuraEd25519AppEd25519Public>>>;
58
+
59
+ /**
60
+ * Generic runtime api call
61
+ **/
62
+ [method: string]: GenericRuntimeApiMethod<Rv>;
63
+ };
64
+ /**
65
+ * @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
66
+ **/
67
+ auraUnincludedSegmentApi: {
68
+ /**
69
+ * Whether it is legal to extend the chain, assuming the given block is the most
70
+ * recently included one as-of the relay parent that will be built against, and
71
+ * the given slot.
72
+ *
73
+ * This should be consistent with the logic the runtime uses when validating blocks to
74
+ * avoid issues.
75
+ *
76
+ * When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block
77
+ * whose state we are querying against, this must always return `true` as long as the slot
78
+ * is more recent than the included block itself.
79
+ *
80
+ * @callname: AuraUnincludedSegmentApi_can_build_upon
81
+ * @param {H256} included_hash
82
+ * @param {SpConsensusSlotsSlot} slot
83
+ **/
84
+ canBuildUpon: GenericRuntimeApiMethod<Rv, (includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
85
+
86
+ /**
87
+ * Generic runtime api call
88
+ **/
89
+ [method: string]: GenericRuntimeApiMethod<Rv>;
90
+ };
91
+ /**
92
+ * @runtimeapi: Core - 0xdf6acb689907609b
93
+ **/
94
+ core: {
95
+ /**
96
+ * Returns the version of the runtime.
97
+ *
98
+ * @callname: Core_version
99
+ **/
100
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
101
+
102
+ /**
103
+ * Execute the given block.
104
+ *
105
+ * @callname: Core_execute_block
106
+ * @param {SpRuntimeBlock} block
107
+ **/
108
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
109
+
110
+ /**
111
+ * Initialize a block with the given header.
112
+ *
113
+ * @callname: Core_initialize_block
114
+ * @param {Header} header
115
+ **/
116
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
117
+
118
+ /**
119
+ * Generic runtime api call
120
+ **/
121
+ [method: string]: GenericRuntimeApiMethod<Rv>;
122
+ };
123
+ /**
124
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
125
+ **/
126
+ metadata: {
127
+ /**
128
+ * Returns the metadata of a runtime.
129
+ *
130
+ * @callname: Metadata_metadata
131
+ **/
132
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
133
+
134
+ /**
135
+ * Returns the metadata at a given version.
136
+ *
137
+ * If the given `version` isn't supported, this will return `None`.
138
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
139
+ *
140
+ * @callname: Metadata_metadata_at_version
141
+ * @param {number} version
142
+ **/
143
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
144
+
145
+ /**
146
+ * Returns the supported metadata versions.
147
+ *
148
+ * This can be used to call `metadata_at_version`.
149
+ *
150
+ * @callname: Metadata_metadata_versions
151
+ **/
152
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
153
+
154
+ /**
155
+ * Generic runtime api call
156
+ **/
157
+ [method: string]: GenericRuntimeApiMethod<Rv>;
158
+ };
159
+ /**
160
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
161
+ **/
162
+ blockBuilder: {
163
+ /**
164
+ * Apply the given extrinsic.
165
+ *
166
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
167
+ * this block or not.
168
+ *
169
+ * @callname: BlockBuilder_apply_extrinsic
170
+ * @param {UncheckedExtrinsicLike} extrinsic
171
+ **/
172
+ applyExtrinsic: GenericRuntimeApiMethod<
173
+ Rv,
174
+ (
175
+ extrinsic: UncheckedExtrinsicLike,
176
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
177
+ >;
178
+
179
+ /**
180
+ * Finish the current block.
181
+ *
182
+ * @callname: BlockBuilder_finalize_block
183
+ **/
184
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
185
+
186
+ /**
187
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
188
+ *
189
+ * @callname: BlockBuilder_inherent_extrinsics
190
+ * @param {SpInherentsInherentData} inherent
191
+ **/
192
+ inherentExtrinsics: GenericRuntimeApiMethod<
193
+ Rv,
194
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
195
+ >;
196
+
197
+ /**
198
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
199
+ *
200
+ * @callname: BlockBuilder_check_inherents
201
+ * @param {SpRuntimeBlock} block
202
+ * @param {SpInherentsInherentData} data
203
+ **/
204
+ checkInherents: GenericRuntimeApiMethod<
205
+ Rv,
206
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
207
+ >;
208
+
209
+ /**
210
+ * Generic runtime api call
211
+ **/
212
+ [method: string]: GenericRuntimeApiMethod<Rv>;
213
+ };
214
+ /**
215
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
216
+ **/
217
+ taggedTransactionQueue: {
218
+ /**
219
+ * Validate the transaction.
220
+ *
221
+ * This method is invoked by the transaction pool to learn details about given transaction.
222
+ * The implementation should make sure to verify the correctness of the transaction
223
+ * against current state. The given `block_hash` corresponds to the hash of the block
224
+ * that is used as current state.
225
+ *
226
+ * Note that this call may be performed by the pool multiple times and transactions
227
+ * might be verified in any possible order.
228
+ *
229
+ * @callname: TaggedTransactionQueue_validate_transaction
230
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
231
+ * @param {UncheckedExtrinsicLike} tx
232
+ * @param {H256} block_hash
233
+ **/
234
+ validateTransaction: GenericRuntimeApiMethod<
235
+ Rv,
236
+ (
237
+ source: SpRuntimeTransactionValidityTransactionSource,
238
+ tx: UncheckedExtrinsicLike,
239
+ blockHash: H256,
240
+ ) => Promise<
241
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
242
+ >
243
+ >;
244
+
245
+ /**
246
+ * Generic runtime api call
247
+ **/
248
+ [method: string]: GenericRuntimeApiMethod<Rv>;
249
+ };
250
+ /**
251
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
252
+ **/
253
+ offchainWorkerApi: {
254
+ /**
255
+ * Starts the off-chain task for given block header.
256
+ *
257
+ * @callname: OffchainWorkerApi_offchain_worker
258
+ * @param {Header} header
259
+ **/
260
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
261
+
262
+ /**
263
+ * Generic runtime api call
264
+ **/
265
+ [method: string]: GenericRuntimeApiMethod<Rv>;
266
+ };
267
+ /**
268
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
269
+ **/
270
+ sessionKeys: {
271
+ /**
272
+ * Generate a set of session keys with optionally using the given seed.
273
+ * The keys should be stored within the keystore exposed via runtime
274
+ * externalities.
275
+ *
276
+ * The seed needs to be a valid `utf8` string.
277
+ *
278
+ * Returns the concatenated SCALE encoded public keys.
279
+ *
280
+ * @callname: SessionKeys_generate_session_keys
281
+ * @param {BytesLike | undefined} seed
282
+ **/
283
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
284
+
285
+ /**
286
+ * Decode the given public session keys.
287
+ *
288
+ * Returns the list of public raw public keys + key type.
289
+ *
290
+ * @callname: SessionKeys_decode_session_keys
291
+ * @param {BytesLike} encoded
292
+ **/
293
+ decodeSessionKeys: GenericRuntimeApiMethod<
294
+ Rv,
295
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
296
+ >;
297
+
298
+ /**
299
+ * Generic runtime api call
300
+ **/
301
+ [method: string]: GenericRuntimeApiMethod<Rv>;
302
+ };
303
+ /**
304
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
305
+ **/
306
+ accountNonceApi: {
307
+ /**
308
+ * Get current account nonce of given `AccountId`.
309
+ *
310
+ * @callname: AccountNonceApi_account_nonce
311
+ * @param {AccountId32Like} account
312
+ **/
313
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
314
+
315
+ /**
316
+ * Generic runtime api call
317
+ **/
318
+ [method: string]: GenericRuntimeApiMethod<Rv>;
319
+ };
320
+ /**
321
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
322
+ **/
323
+ transactionPaymentApi: {
324
+ /**
325
+ *
326
+ * @callname: TransactionPaymentApi_query_info
327
+ * @param {UncheckedExtrinsicLike} uxt
328
+ * @param {number} len
329
+ **/
330
+ queryInfo: GenericRuntimeApiMethod<
331
+ Rv,
332
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
333
+ >;
334
+
335
+ /**
336
+ *
337
+ * @callname: TransactionPaymentApi_query_fee_details
338
+ * @param {UncheckedExtrinsicLike} uxt
339
+ * @param {number} len
340
+ **/
341
+ queryFeeDetails: GenericRuntimeApiMethod<
342
+ Rv,
343
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
344
+ >;
345
+
346
+ /**
347
+ *
348
+ * @callname: TransactionPaymentApi_query_weight_to_fee
349
+ * @param {SpWeightsWeightV2Weight} weight
350
+ **/
351
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
352
+
353
+ /**
354
+ *
355
+ * @callname: TransactionPaymentApi_query_length_to_fee
356
+ * @param {number} length
357
+ **/
358
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
359
+
360
+ /**
361
+ * Generic runtime api call
362
+ **/
363
+ [method: string]: GenericRuntimeApiMethod<Rv>;
364
+ };
365
+ /**
366
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
367
+ **/
368
+ transactionPaymentCallApi: {
369
+ /**
370
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
371
+ *
372
+ * @callname: TransactionPaymentCallApi_query_call_info
373
+ * @param {AssetHubPolkadotRuntimeRuntimeCallLike} call
374
+ * @param {number} len
375
+ **/
376
+ queryCallInfo: GenericRuntimeApiMethod<
377
+ Rv,
378
+ (
379
+ call: AssetHubPolkadotRuntimeRuntimeCallLike,
380
+ len: number,
381
+ ) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
382
+ >;
383
+
384
+ /**
385
+ * Query fee details of a given encoded `Call`.
386
+ *
387
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
388
+ * @param {AssetHubPolkadotRuntimeRuntimeCallLike} call
389
+ * @param {number} len
390
+ **/
391
+ queryCallFeeDetails: GenericRuntimeApiMethod<
392
+ Rv,
393
+ (call: AssetHubPolkadotRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
394
+ >;
395
+
396
+ /**
397
+ * Query the output of the current `WeightToFee` given some input.
398
+ *
399
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
400
+ * @param {SpWeightsWeightV2Weight} weight
401
+ **/
402
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
403
+
404
+ /**
405
+ * Query the output of the current `LengthToFee` given some input.
406
+ *
407
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
408
+ * @param {number} length
409
+ **/
410
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
411
+
412
+ /**
413
+ * Generic runtime api call
414
+ **/
415
+ [method: string]: GenericRuntimeApiMethod<Rv>;
416
+ };
417
+ /**
418
+ * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
419
+ **/
420
+ fungiblesApi: {
421
+ /**
422
+ * Returns the list of all [`Asset`] that an `AccountId` has.
423
+ *
424
+ * @callname: FungiblesApi_query_account_balances
425
+ * @param {AccountId32Like} account
426
+ **/
427
+ queryAccountBalances: GenericRuntimeApiMethod<
428
+ Rv,
429
+ (account: AccountId32Like) => Promise<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>
430
+ >;
431
+
432
+ /**
433
+ * Generic runtime api call
434
+ **/
435
+ [method: string]: GenericRuntimeApiMethod<Rv>;
436
+ };
437
+ /**
438
+ * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
439
+ **/
440
+ collectCollationInfo: {
441
+ /**
442
+ * Collect information about a collation.
443
+ *
444
+ * The given `header` is the header of the built block for that
445
+ * we are collecting the collation info for.
446
+ *
447
+ * @callname: CollectCollationInfo_collect_collation_info
448
+ * @param {Header} header
449
+ **/
450
+ collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
451
+
452
+ /**
453
+ * Generic runtime api call
454
+ **/
455
+ [method: string]: GenericRuntimeApiMethod<Rv>;
456
+ };
457
+ /**
458
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
459
+ **/
460
+ genesisBuilder: {
461
+ /**
462
+ * Creates the default `GenesisConfig` and returns it as a JSON blob.
463
+ *
464
+ * This function instantiates the default `GenesisConfig` struct for the runtime and serializes it into a JSON
465
+ * blob. It returns a `Vec<u8>` containing the JSON representation of the default `GenesisConfig`.
466
+ *
467
+ * @callname: GenesisBuilder_create_default_config
468
+ **/
469
+ createDefaultConfig: GenericRuntimeApiMethod<Rv, () => Promise<Bytes>>;
470
+
471
+ /**
472
+ * Build `GenesisConfig` from a JSON blob not using any defaults and store it in the storage.
473
+ *
474
+ * This function deserializes the full `GenesisConfig` from the given JSON blob and puts it into the storage.
475
+ * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
476
+ * It is recommended to log any errors encountered during the process.
477
+ *
478
+ * Please note that provided json blob must contain all `GenesisConfig` fields, no defaults will be used.
479
+ *
480
+ * @callname: GenesisBuilder_build_config
481
+ * @param {BytesLike} json
482
+ **/
483
+ buildConfig: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
484
+
485
+ /**
486
+ * Generic runtime api call
487
+ **/
488
+ [method: string]: GenericRuntimeApiMethod<Rv>;
489
+ };
490
+ /**
491
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
492
+ **/
493
+ assetConversionApi: {
494
+ /**
495
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
496
+ *
497
+ * Note that the price may have changed by the time the transaction is executed.
498
+ * (Use `amount_in_max` to control slippage.)
499
+ *
500
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
501
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
502
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
503
+ * @param {bigint} amount
504
+ * @param {boolean} include_fee
505
+ **/
506
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
507
+ Rv,
508
+ (
509
+ asset1: StagingXcmV3MultilocationMultiLocation,
510
+ asset2: StagingXcmV3MultilocationMultiLocation,
511
+ amount: bigint,
512
+ includeFee: boolean,
513
+ ) => Promise<bigint | undefined>
514
+ >;
515
+
516
+ /**
517
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
518
+ *
519
+ * Note that the price may have changed by the time the transaction is executed.
520
+ * (Use `amount_out_min` to control slippage.)
521
+ *
522
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
523
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
524
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
525
+ * @param {bigint} amount
526
+ * @param {boolean} include_fee
527
+ **/
528
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
529
+ Rv,
530
+ (
531
+ asset1: StagingXcmV3MultilocationMultiLocation,
532
+ asset2: StagingXcmV3MultilocationMultiLocation,
533
+ amount: bigint,
534
+ includeFee: boolean,
535
+ ) => Promise<bigint | undefined>
536
+ >;
537
+
538
+ /**
539
+ * Returns the size of the liquidity pool for the given asset pair.
540
+ *
541
+ * @callname: AssetConversionApi_get_reserves
542
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
543
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
544
+ **/
545
+ getReserves: GenericRuntimeApiMethod<
546
+ Rv,
547
+ (
548
+ asset1: StagingXcmV3MultilocationMultiLocation,
549
+ asset2: StagingXcmV3MultilocationMultiLocation,
550
+ ) => Promise<[bigint, bigint] | undefined>
551
+ >;
552
+
553
+ /**
554
+ * Generic runtime api call
555
+ **/
556
+ [method: string]: GenericRuntimeApiMethod<Rv>;
557
+ };
558
+ }