@dedot/chaintypes 0.5.0 → 0.7.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 (47) hide show
  1. package/astar/json-rpc.d.ts +8 -3
  2. package/kusama-asset-hub/consts.d.ts +765 -0
  3. package/kusama-asset-hub/errors.d.ts +1529 -0
  4. package/kusama-asset-hub/events.d.ts +2443 -0
  5. package/kusama-asset-hub/index.d.ts +27 -0
  6. package/kusama-asset-hub/json-rpc.d.ts +90 -0
  7. package/kusama-asset-hub/query.d.ts +1677 -0
  8. package/kusama-asset-hub/runtime.d.ts +555 -0
  9. package/kusama-asset-hub/tx.d.ts +6364 -0
  10. package/kusama-asset-hub/types.d.ts +6921 -0
  11. package/package.json +3 -3
  12. package/polkadot-asset-hub/consts.d.ts +730 -0
  13. package/polkadot-asset-hub/errors.d.ts +1500 -0
  14. package/polkadot-asset-hub/events.d.ts +2414 -0
  15. package/polkadot-asset-hub/index.d.ts +27 -0
  16. package/polkadot-asset-hub/json-rpc.d.ts +90 -0
  17. package/polkadot-asset-hub/query.d.ts +1655 -0
  18. package/polkadot-asset-hub/runtime.d.ts +558 -0
  19. package/polkadot-asset-hub/tx.d.ts +6293 -0
  20. package/polkadot-asset-hub/types.d.ts +6829 -0
  21. package/rococo-asset-hub/consts.d.ts +835 -0
  22. package/rococo-asset-hub/errors.d.ts +1590 -0
  23. package/rococo-asset-hub/events.d.ts +2573 -0
  24. package/rococo-asset-hub/index.d.ts +27 -0
  25. package/rococo-asset-hub/json-rpc.d.ts +90 -0
  26. package/rococo-asset-hub/query.d.ts +1829 -0
  27. package/rococo-asset-hub/runtime.d.ts +726 -0
  28. package/rococo-asset-hub/tx.d.ts +9011 -0
  29. package/rococo-asset-hub/types.d.ts +12431 -0
  30. package/westend-asset-hub/consts.d.ts +869 -0
  31. package/westend-asset-hub/errors.d.ts +1635 -0
  32. package/westend-asset-hub/events.d.ts +2610 -0
  33. package/westend-asset-hub/index.d.ts +27 -0
  34. package/westend-asset-hub/json-rpc.d.ts +90 -0
  35. package/westend-asset-hub/query.d.ts +1868 -0
  36. package/westend-asset-hub/runtime.d.ts +798 -0
  37. package/westend-asset-hub/tx.d.ts +9199 -0
  38. package/westend-asset-hub/types.d.ts +12661 -0
  39. package/westend-people/consts.d.ts +434 -0
  40. package/westend-people/errors.d.ts +769 -0
  41. package/westend-people/events.d.ts +1082 -0
  42. package/westend-people/index.d.ts +27 -0
  43. package/westend-people/json-rpc.d.ts +89 -0
  44. package/westend-people/query.d.ts +1209 -0
  45. package/westend-people/runtime.d.ts +636 -0
  46. package/westend-people/tx.d.ts +2891 -0
  47. package/westend-people/types.d.ts +4984 -0
@@ -0,0 +1,798 @@
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
+ StagingXcmV3MultilocationMultiLocation,
31
+ PalletTransactionPaymentRuntimeDispatchInfo,
32
+ PalletTransactionPaymentFeeDetails,
33
+ SpWeightsWeightV2Weight,
34
+ XcmVersionedAssetId,
35
+ XcmRuntimeApisFeesError,
36
+ XcmVersionedXcm,
37
+ XcmVersionedAssets,
38
+ XcmVersionedLocation,
39
+ XcmRuntimeApisDryRunCallDryRunEffects,
40
+ XcmRuntimeApisDryRunError,
41
+ AssetHubWestendRuntimeOriginCaller,
42
+ AssetHubWestendRuntimeRuntimeCallLike,
43
+ XcmRuntimeApisDryRunXcmDryRunEffects,
44
+ XcmRuntimeApisConversionsError,
45
+ AssetsCommonRuntimeApiFungiblesAccessError,
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: NftsApi - 0x899a250cbe84f250
333
+ **/
334
+ nftsApi: {
335
+ /**
336
+ *
337
+ * @callname: NftsApi_owner
338
+ * @param {number} collection
339
+ * @param {number} item
340
+ **/
341
+ owner: GenericRuntimeApiMethod<Rv, (collection: number, item: number) => Promise<AccountId32 | undefined>>;
342
+
343
+ /**
344
+ *
345
+ * @callname: NftsApi_collection_owner
346
+ * @param {number} collection
347
+ **/
348
+ collectionOwner: GenericRuntimeApiMethod<Rv, (collection: number) => Promise<AccountId32 | undefined>>;
349
+
350
+ /**
351
+ *
352
+ * @callname: NftsApi_attribute
353
+ * @param {number} collection
354
+ * @param {number} item
355
+ * @param {BytesLike} key
356
+ **/
357
+ attribute: GenericRuntimeApiMethod<
358
+ Rv,
359
+ (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
360
+ >;
361
+
362
+ /**
363
+ *
364
+ * @callname: NftsApi_custom_attribute
365
+ * @param {AccountId32Like} account
366
+ * @param {number} collection
367
+ * @param {number} item
368
+ * @param {BytesLike} key
369
+ **/
370
+ customAttribute: GenericRuntimeApiMethod<
371
+ Rv,
372
+ (account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
373
+ >;
374
+
375
+ /**
376
+ *
377
+ * @callname: NftsApi_system_attribute
378
+ * @param {number} collection
379
+ * @param {number | undefined} item
380
+ * @param {BytesLike} key
381
+ **/
382
+ systemAttribute: GenericRuntimeApiMethod<
383
+ Rv,
384
+ (collection: number, item: number | undefined, key: BytesLike) => Promise<Bytes | undefined>
385
+ >;
386
+
387
+ /**
388
+ *
389
+ * @callname: NftsApi_collection_attribute
390
+ * @param {number} collection
391
+ * @param {BytesLike} key
392
+ **/
393
+ collectionAttribute: GenericRuntimeApiMethod<
394
+ Rv,
395
+ (collection: number, key: BytesLike) => Promise<Bytes | undefined>
396
+ >;
397
+
398
+ /**
399
+ * Generic runtime api call
400
+ **/
401
+ [method: string]: GenericRuntimeApiMethod<Rv>;
402
+ };
403
+ /**
404
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
405
+ **/
406
+ assetConversionApi: {
407
+ /**
408
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
409
+ *
410
+ * Note that the price may have changed by the time the transaction is executed.
411
+ * (Use `amount_in_max` to control slippage.)
412
+ *
413
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
414
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
415
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
416
+ * @param {bigint} amount
417
+ * @param {boolean} include_fee
418
+ **/
419
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
420
+ Rv,
421
+ (
422
+ asset1: StagingXcmV3MultilocationMultiLocation,
423
+ asset2: StagingXcmV3MultilocationMultiLocation,
424
+ amount: bigint,
425
+ includeFee: boolean,
426
+ ) => Promise<bigint | undefined>
427
+ >;
428
+
429
+ /**
430
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
431
+ *
432
+ * Note that the price may have changed by the time the transaction is executed.
433
+ * (Use `amount_out_min` to control slippage.)
434
+ *
435
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
436
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
437
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
438
+ * @param {bigint} amount
439
+ * @param {boolean} include_fee
440
+ **/
441
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
442
+ Rv,
443
+ (
444
+ asset1: StagingXcmV3MultilocationMultiLocation,
445
+ asset2: StagingXcmV3MultilocationMultiLocation,
446
+ amount: bigint,
447
+ includeFee: boolean,
448
+ ) => Promise<bigint | undefined>
449
+ >;
450
+
451
+ /**
452
+ * Returns the size of the liquidity pool for the given asset pair.
453
+ *
454
+ * @callname: AssetConversionApi_get_reserves
455
+ * @param {StagingXcmV3MultilocationMultiLocation} asset1
456
+ * @param {StagingXcmV3MultilocationMultiLocation} asset2
457
+ **/
458
+ getReserves: GenericRuntimeApiMethod<
459
+ Rv,
460
+ (
461
+ asset1: StagingXcmV3MultilocationMultiLocation,
462
+ asset2: StagingXcmV3MultilocationMultiLocation,
463
+ ) => Promise<[bigint, bigint] | undefined>
464
+ >;
465
+
466
+ /**
467
+ * Generic runtime api call
468
+ **/
469
+ [method: string]: GenericRuntimeApiMethod<Rv>;
470
+ };
471
+ /**
472
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
473
+ **/
474
+ transactionPaymentApi: {
475
+ /**
476
+ *
477
+ * @callname: TransactionPaymentApi_query_info
478
+ * @param {UncheckedExtrinsicLike} uxt
479
+ * @param {number} len
480
+ **/
481
+ queryInfo: GenericRuntimeApiMethod<
482
+ Rv,
483
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
484
+ >;
485
+
486
+ /**
487
+ *
488
+ * @callname: TransactionPaymentApi_query_fee_details
489
+ * @param {UncheckedExtrinsicLike} uxt
490
+ * @param {number} len
491
+ **/
492
+ queryFeeDetails: GenericRuntimeApiMethod<
493
+ Rv,
494
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
495
+ >;
496
+
497
+ /**
498
+ *
499
+ * @callname: TransactionPaymentApi_query_weight_to_fee
500
+ * @param {SpWeightsWeightV2Weight} weight
501
+ **/
502
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
503
+
504
+ /**
505
+ *
506
+ * @callname: TransactionPaymentApi_query_length_to_fee
507
+ * @param {number} length
508
+ **/
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
+ >;
647
+
648
+ /**
649
+ * Generic runtime api call
650
+ **/
651
+ [method: string]: GenericRuntimeApiMethod<Rv>;
652
+ };
653
+ /**
654
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
655
+ **/
656
+ transactionPaymentCallApi: {
657
+ /**
658
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
659
+ *
660
+ * @callname: TransactionPaymentCallApi_query_call_info
661
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} call
662
+ * @param {number} len
663
+ **/
664
+ queryCallInfo: GenericRuntimeApiMethod<
665
+ Rv,
666
+ (call: AssetHubWestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
667
+ >;
668
+
669
+ /**
670
+ * Query fee details of a given encoded `Call`.
671
+ *
672
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
673
+ * @param {AssetHubWestendRuntimeRuntimeCallLike} call
674
+ * @param {number} len
675
+ **/
676
+ queryCallFeeDetails: GenericRuntimeApiMethod<
677
+ Rv,
678
+ (call: AssetHubWestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
679
+ >;
680
+
681
+ /**
682
+ * Query the output of the current `WeightToFee` given some input.
683
+ *
684
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
685
+ * @param {SpWeightsWeightV2Weight} weight
686
+ **/
687
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
688
+
689
+ /**
690
+ * Query the output of the current `LengthToFee` given some input.
691
+ *
692
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
693
+ * @param {number} length
694
+ **/
695
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
696
+
697
+ /**
698
+ * Generic runtime api call
699
+ **/
700
+ [method: string]: GenericRuntimeApiMethod<Rv>;
701
+ };
702
+ /**
703
+ * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
704
+ **/
705
+ fungiblesApi: {
706
+ /**
707
+ * Returns the list of all [`Asset`] that an `AccountId` has.
708
+ *
709
+ * @callname: FungiblesApi_query_account_balances
710
+ * @param {AccountId32Like} account
711
+ **/
712
+ queryAccountBalances: GenericRuntimeApiMethod<
713
+ Rv,
714
+ (account: AccountId32Like) => Promise<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>
715
+ >;
716
+
717
+ /**
718
+ * Generic runtime api call
719
+ **/
720
+ [method: string]: GenericRuntimeApiMethod<Rv>;
721
+ };
722
+ /**
723
+ * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
724
+ **/
725
+ collectCollationInfo: {
726
+ /**
727
+ * Collect information about a collation.
728
+ *
729
+ * The given `header` is the header of the built block for that
730
+ * we are collecting the collation info for.
731
+ *
732
+ * @callname: CollectCollationInfo_collect_collation_info
733
+ * @param {Header} header
734
+ **/
735
+ collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
736
+
737
+ /**
738
+ * Generic runtime api call
739
+ **/
740
+ [method: string]: GenericRuntimeApiMethod<Rv>;
741
+ };
742
+ /**
743
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
744
+ **/
745
+ genesisBuilder: {
746
+ /**
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.
753
+ *
754
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
755
+ * defaults will be used.
756
+ *
757
+ * @callname: GenesisBuilder_build_state
758
+ * @param {BytesLike} json
759
+ **/
760
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
761
+
762
+ /**
763
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
764
+ * `id`.
765
+ *
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`.
769
+ *
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.
777
+ *
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
790
+ **/
791
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
792
+
793
+ /**
794
+ * Generic runtime api call
795
+ **/
796
+ [method: string]: GenericRuntimeApiMethod<Rv>;
797
+ };
798
+ }