@dedot/chaintypes 0.76.0 → 0.77.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 (39) hide show
  1. package/README.md +8 -4
  2. package/kusama-people/consts.d.ts +477 -0
  3. package/kusama-people/errors.d.ts +818 -0
  4. package/kusama-people/events.d.ts +1108 -0
  5. package/kusama-people/index.d.ts +31 -0
  6. package/kusama-people/json-rpc.d.ts +97 -0
  7. package/kusama-people/query.d.ts +1245 -0
  8. package/kusama-people/runtime.d.ts +636 -0
  9. package/kusama-people/tx.d.ts +3153 -0
  10. package/kusama-people/types.d.ts +5330 -0
  11. package/package.json +14 -2
  12. package/paseo-asset-hub/consts.d.ts +788 -0
  13. package/paseo-asset-hub/errors.d.ts +1539 -0
  14. package/paseo-asset-hub/events.d.ts +2538 -0
  15. package/paseo-asset-hub/index.d.ts +31 -0
  16. package/paseo-asset-hub/json-rpc.d.ts +97 -0
  17. package/paseo-asset-hub/query.d.ts +1753 -0
  18. package/paseo-asset-hub/runtime.d.ts +726 -0
  19. package/paseo-asset-hub/tx.d.ts +9202 -0
  20. package/paseo-asset-hub/types.d.ts +12526 -0
  21. package/paseo-people/consts.d.ts +486 -0
  22. package/paseo-people/errors.d.ts +832 -0
  23. package/paseo-people/events.d.ts +1172 -0
  24. package/paseo-people/index.d.ts +31 -0
  25. package/paseo-people/json-rpc.d.ts +97 -0
  26. package/paseo-people/query.d.ts +1257 -0
  27. package/paseo-people/runtime.d.ts +636 -0
  28. package/paseo-people/tx.d.ts +3273 -0
  29. package/paseo-people/types.d.ts +5460 -0
  30. package/polkadot-people/consts.d.ts +477 -0
  31. package/polkadot-people/errors.d.ts +818 -0
  32. package/polkadot-people/events.d.ts +1108 -0
  33. package/polkadot-people/index.d.ts +31 -0
  34. package/polkadot-people/json-rpc.d.ts +97 -0
  35. package/polkadot-people/query.d.ts +1245 -0
  36. package/polkadot-people/runtime.d.ts +636 -0
  37. package/polkadot-people/tx.d.ts +3153 -0
  38. package/polkadot-people/types.d.ts +5349 -0
  39. package/westend-people/json-rpc.d.ts +11 -10
@@ -0,0 +1,726 @@
1
+ // Generated by dedot cli
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
+ AccountId32,
16
+ } from 'dedot/codecs';
17
+ import type {
18
+ SpConsensusSlotsSlotDuration,
19
+ SpConsensusAuraSr25519AppSr25519Public,
20
+ SpConsensusSlotsSlot,
21
+ SpRuntimeBlock,
22
+ SpRuntimeExtrinsicInclusionMode,
23
+ SpCoreOpaqueMetadata,
24
+ SpRuntimeTransactionValidityTransactionValidityError,
25
+ SpInherentsInherentData,
26
+ SpInherentsCheckInherentsResult,
27
+ SpRuntimeTransactionValidityValidTransaction,
28
+ SpRuntimeTransactionValidityTransactionSource,
29
+ SpCoreCryptoKeyTypeId,
30
+ PalletTransactionPaymentRuntimeDispatchInfo,
31
+ PalletTransactionPaymentFeeDetails,
32
+ SpWeightsWeightV2Weight,
33
+ AssetHubPaseoRuntimeRuntimeCallLike,
34
+ XcmVersionedAssetId,
35
+ XcmRuntimeApisFeesError,
36
+ XcmVersionedXcm,
37
+ XcmVersionedAssets,
38
+ XcmVersionedLocation,
39
+ XcmRuntimeApisDryRunCallDryRunEffects,
40
+ XcmRuntimeApisDryRunError,
41
+ AssetHubPaseoRuntimeOriginCaller,
42
+ XcmRuntimeApisDryRunXcmDryRunEffects,
43
+ XcmRuntimeApisConversionsError,
44
+ AssetsCommonRuntimeApiFungiblesAccessError,
45
+ CumulusPrimitivesCoreCollationInfo,
46
+ StagingXcmV3MultilocationMultiLocation,
47
+ } from './types.js';
48
+
49
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
50
+ /**
51
+ * @runtimeapi: AuraApi - 0xdd718d5cc53262d4
52
+ **/
53
+ auraApi: {
54
+ /**
55
+ * Returns the slot duration for Aura.
56
+ *
57
+ * Currently, only the value provided by this type at genesis will be used.
58
+ *
59
+ * @callname: AuraApi_slot_duration
60
+ **/
61
+ slotDuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlotDuration>>;
62
+
63
+ /**
64
+ * Return the current set of authorities.
65
+ *
66
+ * @callname: AuraApi_authorities
67
+ **/
68
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpConsensusAuraSr25519AppSr25519Public>>>;
69
+
70
+ /**
71
+ * Generic runtime api call
72
+ **/
73
+ [method: string]: GenericRuntimeApiMethod<Rv>;
74
+ };
75
+ /**
76
+ * @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
77
+ **/
78
+ auraUnincludedSegmentApi: {
79
+ /**
80
+ * Whether it is legal to extend the chain, assuming the given block is the most
81
+ * recently included one as-of the relay parent that will be built against, and
82
+ * the given slot.
83
+ *
84
+ * This should be consistent with the logic the runtime uses when validating blocks to
85
+ * avoid issues.
86
+ *
87
+ * When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block
88
+ * whose state we are querying against, this must always return `true` as long as the slot
89
+ * is more recent than the included block itself.
90
+ *
91
+ * @callname: AuraUnincludedSegmentApi_can_build_upon
92
+ * @param {H256} included_hash
93
+ * @param {SpConsensusSlotsSlot} slot
94
+ **/
95
+ canBuildUpon: GenericRuntimeApiMethod<Rv, (includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
96
+
97
+ /**
98
+ * Generic runtime api call
99
+ **/
100
+ [method: string]: GenericRuntimeApiMethod<Rv>;
101
+ };
102
+ /**
103
+ * @runtimeapi: Core - 0xdf6acb689907609b
104
+ **/
105
+ core: {
106
+ /**
107
+ * Returns the version of the runtime.
108
+ *
109
+ * @callname: Core_version
110
+ **/
111
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
112
+
113
+ /**
114
+ * Execute the given block.
115
+ *
116
+ * @callname: Core_execute_block
117
+ * @param {SpRuntimeBlock} block
118
+ **/
119
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
120
+
121
+ /**
122
+ * Initialize a block with the given header and return the runtime executive mode.
123
+ *
124
+ * @callname: Core_initialize_block
125
+ * @param {Header} header
126
+ **/
127
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
128
+
129
+ /**
130
+ * Generic runtime api call
131
+ **/
132
+ [method: string]: GenericRuntimeApiMethod<Rv>;
133
+ };
134
+ /**
135
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
136
+ **/
137
+ metadata: {
138
+ /**
139
+ * Returns the metadata of a runtime.
140
+ *
141
+ * @callname: Metadata_metadata
142
+ **/
143
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
144
+
145
+ /**
146
+ * Returns the metadata at a given version.
147
+ *
148
+ * If the given `version` isn't supported, this will return `None`.
149
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
150
+ *
151
+ * @callname: Metadata_metadata_at_version
152
+ * @param {number} version
153
+ **/
154
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
155
+
156
+ /**
157
+ * Returns the supported metadata versions.
158
+ *
159
+ * This can be used to call `metadata_at_version`.
160
+ *
161
+ * @callname: Metadata_metadata_versions
162
+ **/
163
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
164
+
165
+ /**
166
+ * Generic runtime api call
167
+ **/
168
+ [method: string]: GenericRuntimeApiMethod<Rv>;
169
+ };
170
+ /**
171
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
172
+ **/
173
+ blockBuilder: {
174
+ /**
175
+ * Apply the given extrinsic.
176
+ *
177
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
178
+ * this block or not.
179
+ *
180
+ * @callname: BlockBuilder_apply_extrinsic
181
+ * @param {UncheckedExtrinsicLike} extrinsic
182
+ **/
183
+ applyExtrinsic: GenericRuntimeApiMethod<
184
+ Rv,
185
+ (
186
+ extrinsic: UncheckedExtrinsicLike,
187
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
188
+ >;
189
+
190
+ /**
191
+ * Finish the current block.
192
+ *
193
+ * @callname: BlockBuilder_finalize_block
194
+ **/
195
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
196
+
197
+ /**
198
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
199
+ *
200
+ * @callname: BlockBuilder_inherent_extrinsics
201
+ * @param {SpInherentsInherentData} inherent
202
+ **/
203
+ inherentExtrinsics: GenericRuntimeApiMethod<
204
+ Rv,
205
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
206
+ >;
207
+
208
+ /**
209
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
210
+ *
211
+ * @callname: BlockBuilder_check_inherents
212
+ * @param {SpRuntimeBlock} block
213
+ * @param {SpInherentsInherentData} data
214
+ **/
215
+ checkInherents: GenericRuntimeApiMethod<
216
+ Rv,
217
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
218
+ >;
219
+
220
+ /**
221
+ * Generic runtime api call
222
+ **/
223
+ [method: string]: GenericRuntimeApiMethod<Rv>;
224
+ };
225
+ /**
226
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
227
+ **/
228
+ taggedTransactionQueue: {
229
+ /**
230
+ * Validate the transaction.
231
+ *
232
+ * This method is invoked by the transaction pool to learn details about given transaction.
233
+ * The implementation should make sure to verify the correctness of the transaction
234
+ * against current state. The given `block_hash` corresponds to the hash of the block
235
+ * that is used as current state.
236
+ *
237
+ * Note that this call may be performed by the pool multiple times and transactions
238
+ * might be verified in any possible order.
239
+ *
240
+ * @callname: TaggedTransactionQueue_validate_transaction
241
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
242
+ * @param {UncheckedExtrinsicLike} tx
243
+ * @param {H256} block_hash
244
+ **/
245
+ validateTransaction: GenericRuntimeApiMethod<
246
+ Rv,
247
+ (
248
+ source: SpRuntimeTransactionValidityTransactionSource,
249
+ tx: UncheckedExtrinsicLike,
250
+ blockHash: H256,
251
+ ) => Promise<
252
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
253
+ >
254
+ >;
255
+
256
+ /**
257
+ * Generic runtime api call
258
+ **/
259
+ [method: string]: GenericRuntimeApiMethod<Rv>;
260
+ };
261
+ /**
262
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
263
+ **/
264
+ offchainWorkerApi: {
265
+ /**
266
+ * Starts the off-chain task for given block header.
267
+ *
268
+ * @callname: OffchainWorkerApi_offchain_worker
269
+ * @param {Header} header
270
+ **/
271
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
272
+
273
+ /**
274
+ * Generic runtime api call
275
+ **/
276
+ [method: string]: GenericRuntimeApiMethod<Rv>;
277
+ };
278
+ /**
279
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
280
+ **/
281
+ sessionKeys: {
282
+ /**
283
+ * Generate a set of session keys with optionally using the given seed.
284
+ * The keys should be stored within the keystore exposed via runtime
285
+ * externalities.
286
+ *
287
+ * The seed needs to be a valid `utf8` string.
288
+ *
289
+ * Returns the concatenated SCALE encoded public keys.
290
+ *
291
+ * @callname: SessionKeys_generate_session_keys
292
+ * @param {BytesLike | undefined} seed
293
+ **/
294
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
295
+
296
+ /**
297
+ * Decode the given public session keys.
298
+ *
299
+ * Returns the list of public raw public keys + key type.
300
+ *
301
+ * @callname: SessionKeys_decode_session_keys
302
+ * @param {BytesLike} encoded
303
+ **/
304
+ decodeSessionKeys: GenericRuntimeApiMethod<
305
+ Rv,
306
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
307
+ >;
308
+
309
+ /**
310
+ * Generic runtime api call
311
+ **/
312
+ [method: string]: GenericRuntimeApiMethod<Rv>;
313
+ };
314
+ /**
315
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
316
+ **/
317
+ accountNonceApi: {
318
+ /**
319
+ * Get current account nonce of given `AccountId`.
320
+ *
321
+ * @callname: AccountNonceApi_account_nonce
322
+ * @param {AccountId32Like} account
323
+ **/
324
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
325
+
326
+ /**
327
+ * Generic runtime api call
328
+ **/
329
+ [method: string]: GenericRuntimeApiMethod<Rv>;
330
+ };
331
+ /**
332
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
333
+ **/
334
+ transactionPaymentApi: {
335
+ /**
336
+ *
337
+ * @callname: TransactionPaymentApi_query_info
338
+ * @param {UncheckedExtrinsicLike} uxt
339
+ * @param {number} len
340
+ **/
341
+ queryInfo: GenericRuntimeApiMethod<
342
+ Rv,
343
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
344
+ >;
345
+
346
+ /**
347
+ *
348
+ * @callname: TransactionPaymentApi_query_fee_details
349
+ * @param {UncheckedExtrinsicLike} uxt
350
+ * @param {number} len
351
+ **/
352
+ queryFeeDetails: GenericRuntimeApiMethod<
353
+ Rv,
354
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
355
+ >;
356
+
357
+ /**
358
+ *
359
+ * @callname: TransactionPaymentApi_query_weight_to_fee
360
+ * @param {SpWeightsWeightV2Weight} weight
361
+ **/
362
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
363
+
364
+ /**
365
+ *
366
+ * @callname: TransactionPaymentApi_query_length_to_fee
367
+ * @param {number} length
368
+ **/
369
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
370
+
371
+ /**
372
+ * Generic runtime api call
373
+ **/
374
+ [method: string]: GenericRuntimeApiMethod<Rv>;
375
+ };
376
+ /**
377
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
378
+ **/
379
+ transactionPaymentCallApi: {
380
+ /**
381
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
382
+ *
383
+ * @callname: TransactionPaymentCallApi_query_call_info
384
+ * @param {AssetHubPaseoRuntimeRuntimeCallLike} call
385
+ * @param {number} len
386
+ **/
387
+ queryCallInfo: GenericRuntimeApiMethod<
388
+ Rv,
389
+ (call: AssetHubPaseoRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
390
+ >;
391
+
392
+ /**
393
+ * Query fee details of a given encoded `Call`.
394
+ *
395
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
396
+ * @param {AssetHubPaseoRuntimeRuntimeCallLike} call
397
+ * @param {number} len
398
+ **/
399
+ queryCallFeeDetails: GenericRuntimeApiMethod<
400
+ Rv,
401
+ (call: AssetHubPaseoRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
402
+ >;
403
+
404
+ /**
405
+ * Query the output of the current `WeightToFee` given some input.
406
+ *
407
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
408
+ * @param {SpWeightsWeightV2Weight} weight
409
+ **/
410
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
411
+
412
+ /**
413
+ * Query the output of the current `LengthToFee` given some input.
414
+ *
415
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
416
+ * @param {number} length
417
+ **/
418
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
419
+
420
+ /**
421
+ * Generic runtime api call
422
+ **/
423
+ [method: string]: GenericRuntimeApiMethod<Rv>;
424
+ };
425
+ /**
426
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
427
+ **/
428
+ xcmPaymentApi: {
429
+ /**
430
+ * Returns a list of acceptable payment assets.
431
+ *
432
+ * # Arguments
433
+ *
434
+ * * `xcm_version`: Version.
435
+ *
436
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
437
+ * @param {number} xcm_version
438
+ **/
439
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
440
+ Rv,
441
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
442
+ >;
443
+
444
+ /**
445
+ * Returns a weight needed to execute a XCM.
446
+ *
447
+ * # Arguments
448
+ *
449
+ * * `message`: `VersionedXcm`.
450
+ *
451
+ * @callname: XcmPaymentApi_query_xcm_weight
452
+ * @param {XcmVersionedXcm} message
453
+ **/
454
+ queryXcmWeight: GenericRuntimeApiMethod<
455
+ Rv,
456
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
457
+ >;
458
+
459
+ /**
460
+ * Converts a weight into a fee for the specified `AssetId`.
461
+ *
462
+ * # Arguments
463
+ *
464
+ * * `weight`: convertible `Weight`.
465
+ * * `asset`: `VersionedAssetId`.
466
+ *
467
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
468
+ * @param {SpWeightsWeightV2Weight} weight
469
+ * @param {XcmVersionedAssetId} asset
470
+ **/
471
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
472
+ Rv,
473
+ (weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
474
+ >;
475
+
476
+ /**
477
+ * Get delivery fees for sending a specific `message` to a `destination`.
478
+ * These always come in a specific asset, defined by the chain.
479
+ *
480
+ * # Arguments
481
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
482
+ * size of the message.
483
+ * * `destination`: The destination to send the message to. Different destinations may use
484
+ * different senders that charge different fees.
485
+ *
486
+ * @callname: XcmPaymentApi_query_delivery_fees
487
+ * @param {XcmVersionedLocation} destination
488
+ * @param {XcmVersionedXcm} message
489
+ **/
490
+ queryDeliveryFees: GenericRuntimeApiMethod<
491
+ Rv,
492
+ (
493
+ destination: XcmVersionedLocation,
494
+ message: XcmVersionedXcm,
495
+ ) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
496
+ >;
497
+
498
+ /**
499
+ * Generic runtime api call
500
+ **/
501
+ [method: string]: GenericRuntimeApiMethod<Rv>;
502
+ };
503
+ /**
504
+ * @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
505
+ **/
506
+ dryRunApi: {
507
+ /**
508
+ * Dry run call.
509
+ *
510
+ * @callname: DryRunApi_dry_run_call
511
+ * @param {AssetHubPaseoRuntimeOriginCaller} origin
512
+ * @param {AssetHubPaseoRuntimeRuntimeCallLike} call
513
+ **/
514
+ dryRunCall: GenericRuntimeApiMethod<
515
+ Rv,
516
+ (
517
+ origin: AssetHubPaseoRuntimeOriginCaller,
518
+ call: AssetHubPaseoRuntimeRuntimeCallLike,
519
+ ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
520
+ >;
521
+
522
+ /**
523
+ * Dry run XCM program
524
+ *
525
+ * @callname: DryRunApi_dry_run_xcm
526
+ * @param {XcmVersionedLocation} origin_location
527
+ * @param {XcmVersionedXcm} xcm
528
+ **/
529
+ dryRunXcm: GenericRuntimeApiMethod<
530
+ Rv,
531
+ (
532
+ originLocation: XcmVersionedLocation,
533
+ xcm: XcmVersionedXcm,
534
+ ) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
535
+ >;
536
+
537
+ /**
538
+ * Generic runtime api call
539
+ **/
540
+ [method: string]: GenericRuntimeApiMethod<Rv>;
541
+ };
542
+ /**
543
+ * @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
544
+ **/
545
+ locationToAccountApi: {
546
+ /**
547
+ * Converts `Location` to `AccountId`.
548
+ *
549
+ * @callname: LocationToAccountApi_convert_location
550
+ * @param {XcmVersionedLocation} location
551
+ **/
552
+ convertLocation: GenericRuntimeApiMethod<
553
+ Rv,
554
+ (location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
555
+ >;
556
+
557
+ /**
558
+ * Generic runtime api call
559
+ **/
560
+ [method: string]: GenericRuntimeApiMethod<Rv>;
561
+ };
562
+ /**
563
+ * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
564
+ **/
565
+ fungiblesApi: {
566
+ /**
567
+ * Returns the list of all [`Asset`] that an `AccountId` has.
568
+ *
569
+ * @callname: FungiblesApi_query_account_balances
570
+ * @param {AccountId32Like} account
571
+ **/
572
+ queryAccountBalances: GenericRuntimeApiMethod<
573
+ Rv,
574
+ (account: AccountId32Like) => Promise<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>
575
+ >;
576
+
577
+ /**
578
+ * Generic runtime api call
579
+ **/
580
+ [method: string]: GenericRuntimeApiMethod<Rv>;
581
+ };
582
+ /**
583
+ * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
584
+ **/
585
+ collectCollationInfo: {
586
+ /**
587
+ * Collect information about a collation.
588
+ *
589
+ * The given `header` is the header of the built block for that
590
+ * we are collecting the collation info for.
591
+ *
592
+ * @callname: CollectCollationInfo_collect_collation_info
593
+ * @param {Header} header
594
+ **/
595
+ collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
596
+
597
+ /**
598
+ * Generic runtime api call
599
+ **/
600
+ [method: string]: GenericRuntimeApiMethod<Rv>;
601
+ };
602
+ /**
603
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
604
+ **/
605
+ genesisBuilder: {
606
+ /**
607
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
608
+ * storage.
609
+ *
610
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
611
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
612
+ * deserialization fails, an error is returned.
613
+ *
614
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
615
+ * defaults will be used.
616
+ *
617
+ * @callname: GenesisBuilder_build_state
618
+ * @param {BytesLike} json
619
+ **/
620
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
621
+
622
+ /**
623
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
624
+ * `id`.
625
+ *
626
+ * If `id` is `None` the function returns JSON blob representation of the default
627
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
628
+ * `RuntimeGenesisConfig`.
629
+ *
630
+ * Otherwise function returns a JSON representation of the built-in, named
631
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
632
+ * exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
633
+ * (potentially nested) key-value pairs that are intended for customizing the default
634
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
635
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
636
+ * be used in `build_state` method.
637
+ *
638
+ * @callname: GenesisBuilder_get_preset
639
+ * @param {string | undefined} id
640
+ **/
641
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
642
+
643
+ /**
644
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
645
+ *
646
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
647
+ * no named presets are provided by the runtime the list is empty.
648
+ *
649
+ * @callname: GenesisBuilder_preset_names
650
+ **/
651
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
652
+
653
+ /**
654
+ * Generic runtime api call
655
+ **/
656
+ [method: string]: GenericRuntimeApiMethod<Rv>;
657
+ };
658
+ /**
659
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
660
+ **/
661
+ assetConversionApi: {
662
+ /**
663
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
664
+ *
665
+ * Note that the price may have changed by the time the transaction is executed.
666
+ * (Use `amount_in_max` to control slippage.)
667
+ *
668
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
669
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
670
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
671
+ * @param {bigint} amount
672
+ * @param {boolean} include_fee
673
+ **/
674
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
675
+ Rv,
676
+ (
677
+ asset1: StagingXcmV3MultilocationMultiLocation,
678
+ asset2: StagingXcmV3MultilocationMultiLocation,
679
+ amount: bigint,
680
+ includeFee: boolean,
681
+ ) => Promise<bigint | undefined>
682
+ >;
683
+
684
+ /**
685
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
686
+ *
687
+ * Note that the price may have changed by the time the transaction is executed.
688
+ * (Use `amount_out_min` to control slippage.)
689
+ *
690
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
691
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
692
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
693
+ * @param {bigint} amount
694
+ * @param {boolean} include_fee
695
+ **/
696
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
697
+ Rv,
698
+ (
699
+ asset1: StagingXcmV3MultilocationMultiLocation,
700
+ asset2: StagingXcmV3MultilocationMultiLocation,
701
+ amount: bigint,
702
+ includeFee: boolean,
703
+ ) => Promise<bigint | undefined>
704
+ >;
705
+
706
+ /**
707
+ * Returns the size of the liquidity pool for the given asset pair.
708
+ *
709
+ * @callname: AssetConversionApi_get_reserves
710
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
711
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
712
+ **/
713
+ getReserves: GenericRuntimeApiMethod<
714
+ Rv,
715
+ (
716
+ asset1: StagingXcmV3MultilocationMultiLocation,
717
+ asset2: StagingXcmV3MultilocationMultiLocation,
718
+ ) => Promise<[bigint, bigint] | undefined>
719
+ >;
720
+
721
+ /**
722
+ * Generic runtime api call
723
+ **/
724
+ [method: string]: GenericRuntimeApiMethod<Rv>;
725
+ };
726
+ }