@dedot/chaintypes 0.28.0 → 0.30.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,723 +0,0 @@
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
- StagingXcmV4Location,
31
- PalletTransactionPaymentRuntimeDispatchInfo,
32
- PalletTransactionPaymentFeeDetails,
33
- SpWeightsWeightV2Weight,
34
- AssetHubRococoRuntimeRuntimeCallLike,
35
- XcmVersionedAssets,
36
- AssetsCommonRuntimeApiFungiblesAccessError,
37
- XcmVersionedAssetId,
38
- XcmRuntimeApisFeesError,
39
- XcmVersionedXcm,
40
- XcmVersionedLocation,
41
- XcmRuntimeApisDryRunCallDryRunEffects,
42
- XcmRuntimeApisDryRunError,
43
- AssetHubRococoRuntimeOriginCaller,
44
- XcmRuntimeApisDryRunXcmDryRunEffects,
45
- XcmRuntimeApisConversionsError,
46
- CumulusPrimitivesCoreCollationInfo,
47
- } from './types';
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: AssetConversionApi - 0x8a8047a53a8277ec
333
- **/
334
- assetConversionApi: {
335
- /**
336
- * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
337
- *
338
- * Note that the price may have changed by the time the transaction is executed.
339
- * (Use `amount_in_max` to control slippage.)
340
- *
341
- * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
342
- * @param {StagingXcmV4Location} asset1
343
- * @param {StagingXcmV4Location} asset2
344
- * @param {bigint} amount
345
- * @param {boolean} include_fee
346
- **/
347
- quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
348
- Rv,
349
- (
350
- asset1: StagingXcmV4Location,
351
- asset2: StagingXcmV4Location,
352
- amount: bigint,
353
- includeFee: boolean,
354
- ) => Promise<bigint | undefined>
355
- >;
356
-
357
- /**
358
- * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
359
- *
360
- * Note that the price may have changed by the time the transaction is executed.
361
- * (Use `amount_out_min` to control slippage.)
362
- *
363
- * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
364
- * @param {StagingXcmV4Location} asset1
365
- * @param {StagingXcmV4Location} asset2
366
- * @param {bigint} amount
367
- * @param {boolean} include_fee
368
- **/
369
- quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
370
- Rv,
371
- (
372
- asset1: StagingXcmV4Location,
373
- asset2: StagingXcmV4Location,
374
- amount: bigint,
375
- includeFee: boolean,
376
- ) => Promise<bigint | undefined>
377
- >;
378
-
379
- /**
380
- * Returns the size of the liquidity pool for the given asset pair.
381
- *
382
- * @callname: AssetConversionApi_get_reserves
383
- * @param {StagingXcmV4Location} asset1
384
- * @param {StagingXcmV4Location} asset2
385
- **/
386
- getReserves: GenericRuntimeApiMethod<
387
- Rv,
388
- (asset1: StagingXcmV4Location, asset2: StagingXcmV4Location) => Promise<[bigint, bigint] | undefined>
389
- >;
390
-
391
- /**
392
- * Generic runtime api call
393
- **/
394
- [method: string]: GenericRuntimeApiMethod<Rv>;
395
- };
396
- /**
397
- * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
398
- **/
399
- transactionPaymentApi: {
400
- /**
401
- *
402
- * @callname: TransactionPaymentApi_query_info
403
- * @param {UncheckedExtrinsicLike} uxt
404
- * @param {number} len
405
- **/
406
- queryInfo: GenericRuntimeApiMethod<
407
- Rv,
408
- (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
409
- >;
410
-
411
- /**
412
- *
413
- * @callname: TransactionPaymentApi_query_fee_details
414
- * @param {UncheckedExtrinsicLike} uxt
415
- * @param {number} len
416
- **/
417
- queryFeeDetails: GenericRuntimeApiMethod<
418
- Rv,
419
- (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
420
- >;
421
-
422
- /**
423
- *
424
- * @callname: TransactionPaymentApi_query_weight_to_fee
425
- * @param {SpWeightsWeightV2Weight} weight
426
- **/
427
- queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
428
-
429
- /**
430
- *
431
- * @callname: TransactionPaymentApi_query_length_to_fee
432
- * @param {number} length
433
- **/
434
- queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
435
-
436
- /**
437
- * Generic runtime api call
438
- **/
439
- [method: string]: GenericRuntimeApiMethod<Rv>;
440
- };
441
- /**
442
- * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
443
- **/
444
- transactionPaymentCallApi: {
445
- /**
446
- * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
447
- *
448
- * @callname: TransactionPaymentCallApi_query_call_info
449
- * @param {AssetHubRococoRuntimeRuntimeCallLike} call
450
- * @param {number} len
451
- **/
452
- queryCallInfo: GenericRuntimeApiMethod<
453
- Rv,
454
- (call: AssetHubRococoRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
455
- >;
456
-
457
- /**
458
- * Query fee details of a given encoded `Call`.
459
- *
460
- * @callname: TransactionPaymentCallApi_query_call_fee_details
461
- * @param {AssetHubRococoRuntimeRuntimeCallLike} call
462
- * @param {number} len
463
- **/
464
- queryCallFeeDetails: GenericRuntimeApiMethod<
465
- Rv,
466
- (call: AssetHubRococoRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
467
- >;
468
-
469
- /**
470
- * Query the output of the current `WeightToFee` given some input.
471
- *
472
- * @callname: TransactionPaymentCallApi_query_weight_to_fee
473
- * @param {SpWeightsWeightV2Weight} weight
474
- **/
475
- queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
476
-
477
- /**
478
- * Query the output of the current `LengthToFee` given some input.
479
- *
480
- * @callname: TransactionPaymentCallApi_query_length_to_fee
481
- * @param {number} length
482
- **/
483
- queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
484
-
485
- /**
486
- * Generic runtime api call
487
- **/
488
- [method: string]: GenericRuntimeApiMethod<Rv>;
489
- };
490
- /**
491
- * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
492
- **/
493
- fungiblesApi: {
494
- /**
495
- * Returns the list of all [`Asset`] that an `AccountId` has.
496
- *
497
- * @callname: FungiblesApi_query_account_balances
498
- * @param {AccountId32Like} account
499
- **/
500
- queryAccountBalances: GenericRuntimeApiMethod<
501
- Rv,
502
- (account: AccountId32Like) => Promise<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>
503
- >;
504
-
505
- /**
506
- * Generic runtime api call
507
- **/
508
- [method: string]: GenericRuntimeApiMethod<Rv>;
509
- };
510
- /**
511
- * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
512
- **/
513
- xcmPaymentApi: {
514
- /**
515
- * Returns a list of acceptable payment assets.
516
- *
517
- * # Arguments
518
- *
519
- * * `xcm_version`: Version.
520
- *
521
- * @callname: XcmPaymentApi_query_acceptable_payment_assets
522
- * @param {number} xcm_version
523
- **/
524
- queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
525
- Rv,
526
- (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
527
- >;
528
-
529
- /**
530
- * Returns a weight needed to execute a XCM.
531
- *
532
- * # Arguments
533
- *
534
- * * `message`: `VersionedXcm`.
535
- *
536
- * @callname: XcmPaymentApi_query_xcm_weight
537
- * @param {XcmVersionedXcm} message
538
- **/
539
- queryXcmWeight: GenericRuntimeApiMethod<
540
- Rv,
541
- (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
542
- >;
543
-
544
- /**
545
- * Converts a weight into a fee for the specified `AssetId`.
546
- *
547
- * # Arguments
548
- *
549
- * * `weight`: convertible `Weight`.
550
- * * `asset`: `VersionedAssetId`.
551
- *
552
- * @callname: XcmPaymentApi_query_weight_to_asset_fee
553
- * @param {SpWeightsWeightV2Weight} weight
554
- * @param {XcmVersionedAssetId} asset
555
- **/
556
- queryWeightToAssetFee: GenericRuntimeApiMethod<
557
- Rv,
558
- (weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
559
- >;
560
-
561
- /**
562
- * Get delivery fees for sending a specific `message` to a `destination`.
563
- * These always come in a specific asset, defined by the chain.
564
- *
565
- * # Arguments
566
- * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
567
- * size of the message.
568
- * * `destination`: The destination to send the message to. Different destinations may use
569
- * different senders that charge different fees.
570
- *
571
- * @callname: XcmPaymentApi_query_delivery_fees
572
- * @param {XcmVersionedLocation} destination
573
- * @param {XcmVersionedXcm} message
574
- **/
575
- queryDeliveryFees: GenericRuntimeApiMethod<
576
- Rv,
577
- (
578
- destination: XcmVersionedLocation,
579
- message: XcmVersionedXcm,
580
- ) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
581
- >;
582
-
583
- /**
584
- * Generic runtime api call
585
- **/
586
- [method: string]: GenericRuntimeApiMethod<Rv>;
587
- };
588
- /**
589
- * @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
590
- **/
591
- dryRunApi: {
592
- /**
593
- * Dry run call.
594
- *
595
- * @callname: DryRunApi_dry_run_call
596
- * @param {AssetHubRococoRuntimeOriginCaller} origin
597
- * @param {AssetHubRococoRuntimeRuntimeCallLike} call
598
- **/
599
- dryRunCall: GenericRuntimeApiMethod<
600
- Rv,
601
- (
602
- origin: AssetHubRococoRuntimeOriginCaller,
603
- call: AssetHubRococoRuntimeRuntimeCallLike,
604
- ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
605
- >;
606
-
607
- /**
608
- * Dry run XCM program
609
- *
610
- * @callname: DryRunApi_dry_run_xcm
611
- * @param {XcmVersionedLocation} origin_location
612
- * @param {XcmVersionedXcm} xcm
613
- **/
614
- dryRunXcm: GenericRuntimeApiMethod<
615
- Rv,
616
- (
617
- originLocation: XcmVersionedLocation,
618
- xcm: XcmVersionedXcm,
619
- ) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
620
- >;
621
-
622
- /**
623
- * Generic runtime api call
624
- **/
625
- [method: string]: GenericRuntimeApiMethod<Rv>;
626
- };
627
- /**
628
- * @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
629
- **/
630
- locationToAccountApi: {
631
- /**
632
- * Converts `Location` to `AccountId`.
633
- *
634
- * @callname: LocationToAccountApi_convert_location
635
- * @param {XcmVersionedLocation} location
636
- **/
637
- convertLocation: GenericRuntimeApiMethod<
638
- Rv,
639
- (location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
640
- >;
641
-
642
- /**
643
- * Generic runtime api call
644
- **/
645
- [method: string]: GenericRuntimeApiMethod<Rv>;
646
- };
647
- /**
648
- * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
649
- **/
650
- collectCollationInfo: {
651
- /**
652
- * Collect information about a collation.
653
- *
654
- * The given `header` is the header of the built block for that
655
- * we are collecting the collation info for.
656
- *
657
- * @callname: CollectCollationInfo_collect_collation_info
658
- * @param {Header} header
659
- **/
660
- collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
661
-
662
- /**
663
- * Generic runtime api call
664
- **/
665
- [method: string]: GenericRuntimeApiMethod<Rv>;
666
- };
667
- /**
668
- * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
669
- **/
670
- genesisBuilder: {
671
- /**
672
- * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
673
- * storage.
674
- *
675
- * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
676
- * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
677
- * deserialization fails, an error is returned.
678
- *
679
- * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
680
- * defaults will be used.
681
- *
682
- * @callname: GenesisBuilder_build_state
683
- * @param {BytesLike} json
684
- **/
685
- buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
686
-
687
- /**
688
- * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
689
- * `id`.
690
- *
691
- * If `id` is `None` the function returns JSON blob representation of the default
692
- * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
693
- * `RuntimeGenesisConfig`.
694
- *
695
- * Otherwise function returns a JSON representation of the built-in, named
696
- * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
697
- * exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
698
- * (potentially nested) key-value pairs that are intended for customizing the default
699
- * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
700
- * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
701
- * be used in `build_state` method.
702
- *
703
- * @callname: GenesisBuilder_get_preset
704
- * @param {string | undefined} id
705
- **/
706
- getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
707
-
708
- /**
709
- * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
710
- *
711
- * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
712
- * no named presets are provided by the runtime the list is empty.
713
- *
714
- * @callname: GenesisBuilder_preset_names
715
- **/
716
- presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
717
-
718
- /**
719
- * Generic runtime api call
720
- **/
721
- [method: string]: GenericRuntimeApiMethod<Rv>;
722
- };
723
- }