@dedot/chaintypes 0.99.0 → 0.100.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.
@@ -0,0 +1,940 @@
1
+ // Generated by dedot cli
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ RuntimeVersion,
6
+ Header,
7
+ DispatchError,
8
+ Result,
9
+ H256,
10
+ Bytes,
11
+ BytesLike,
12
+ AccountId32Like,
13
+ H160,
14
+ U256,
15
+ Permill,
16
+ AccountId32,
17
+ FixedBytes,
18
+ } from 'dedot/codecs';
19
+ import type {
20
+ SpRuntimeBlock,
21
+ SpRuntimeExtrinsicInclusionMode,
22
+ SpCoreOpaqueMetadata,
23
+ SpRuntimeTransactionValidityTransactionValidityError,
24
+ FpSelfContainedUncheckedExtrinsic,
25
+ SpInherentsInherentData,
26
+ SpInherentsCheckInherentsResult,
27
+ SpRuntimeTransactionValidityValidTransaction,
28
+ SpRuntimeTransactionValidityTransactionSource,
29
+ SpCoreCryptoKeyTypeId,
30
+ SpConsensusSlotsSlotDuration,
31
+ SpConsensusAuraSr25519AppSr25519Public,
32
+ CumulusPrimitivesCoreCollationInfo,
33
+ PalletCurrenciesRpcRuntimeApiAccountData,
34
+ PalletTransactionPaymentRuntimeDispatchInfo,
35
+ PalletTransactionPaymentFeeDetails,
36
+ SpWeightsWeightV2Weight,
37
+ EvmBackendBasic,
38
+ FpEvmExecutionInfoV2,
39
+ FpEvmExecutionInfoV2H160,
40
+ EthereumBlock,
41
+ EthereumReceiptReceiptV3,
42
+ FpRpcTransactionStatus,
43
+ EthereumTransactionTransactionV2,
44
+ XcmVersionedAssetId,
45
+ XcmRuntimeApisFeesError,
46
+ XcmVersionedXcm,
47
+ XcmVersionedAssets,
48
+ XcmVersionedLocation,
49
+ XcmRuntimeApisDryRunCallDryRunEffects,
50
+ XcmRuntimeApisDryRunError,
51
+ HydradxRuntimeOriginCaller,
52
+ HydradxRuntimeRuntimeCallLike,
53
+ XcmRuntimeApisDryRunXcmDryRunEffects,
54
+ XcmRuntimeApisConversionsError,
55
+ HydradxTraitsOracleOraclePeriod,
56
+ HydradxRuntimeEvmAaveTradeExecutorPoolData,
57
+ } from './types.js';
58
+
59
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
60
+ /**
61
+ * @runtimeapi: Core - 0xdf6acb689907609b
62
+ **/
63
+ core: {
64
+ /**
65
+ * Returns the version of the runtime.
66
+ *
67
+ * @callname: Core_version
68
+ **/
69
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
70
+
71
+ /**
72
+ * Execute the given block.
73
+ *
74
+ * @callname: Core_execute_block
75
+ * @param {SpRuntimeBlock} block
76
+ **/
77
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
78
+
79
+ /**
80
+ * Initialize a block with the given header and return the runtime executive mode.
81
+ *
82
+ * @callname: Core_initialize_block
83
+ * @param {Header} header
84
+ **/
85
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
86
+
87
+ /**
88
+ * Generic runtime api call
89
+ **/
90
+ [method: string]: GenericRuntimeApiMethod<Rv>;
91
+ };
92
+ /**
93
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
94
+ **/
95
+ metadata: {
96
+ /**
97
+ * Returns the metadata of a runtime.
98
+ *
99
+ * @callname: Metadata_metadata
100
+ **/
101
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
102
+
103
+ /**
104
+ * Returns the metadata at a given version.
105
+ *
106
+ * If the given `version` isn't supported, this will return `None`.
107
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
108
+ *
109
+ * @callname: Metadata_metadata_at_version
110
+ * @param {number} version
111
+ **/
112
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
113
+
114
+ /**
115
+ * Returns the supported metadata versions.
116
+ *
117
+ * This can be used to call `metadata_at_version`.
118
+ *
119
+ * @callname: Metadata_metadata_versions
120
+ **/
121
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
122
+
123
+ /**
124
+ * Generic runtime api call
125
+ **/
126
+ [method: string]: GenericRuntimeApiMethod<Rv>;
127
+ };
128
+ /**
129
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
130
+ **/
131
+ blockBuilder: {
132
+ /**
133
+ * Apply the given extrinsic.
134
+ *
135
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
136
+ * this block or not.
137
+ *
138
+ * @callname: BlockBuilder_apply_extrinsic
139
+ * @param {FpSelfContainedUncheckedExtrinsic} extrinsic
140
+ **/
141
+ applyExtrinsic: GenericRuntimeApiMethod<
142
+ Rv,
143
+ (
144
+ extrinsic: FpSelfContainedUncheckedExtrinsic,
145
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
146
+ >;
147
+
148
+ /**
149
+ * Finish the current block.
150
+ *
151
+ * @callname: BlockBuilder_finalize_block
152
+ **/
153
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
154
+
155
+ /**
156
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
157
+ *
158
+ * @callname: BlockBuilder_inherent_extrinsics
159
+ * @param {SpInherentsInherentData} inherent
160
+ **/
161
+ inherentExtrinsics: GenericRuntimeApiMethod<
162
+ Rv,
163
+ (inherent: SpInherentsInherentData) => Promise<Array<FpSelfContainedUncheckedExtrinsic>>
164
+ >;
165
+
166
+ /**
167
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
168
+ *
169
+ * @callname: BlockBuilder_check_inherents
170
+ * @param {SpRuntimeBlock} block
171
+ * @param {SpInherentsInherentData} data
172
+ **/
173
+ checkInherents: GenericRuntimeApiMethod<
174
+ Rv,
175
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
176
+ >;
177
+
178
+ /**
179
+ * Generic runtime api call
180
+ **/
181
+ [method: string]: GenericRuntimeApiMethod<Rv>;
182
+ };
183
+ /**
184
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
185
+ **/
186
+ taggedTransactionQueue: {
187
+ /**
188
+ * Validate the transaction.
189
+ *
190
+ * This method is invoked by the transaction pool to learn details about given transaction.
191
+ * The implementation should make sure to verify the correctness of the transaction
192
+ * against current state. The given `block_hash` corresponds to the hash of the block
193
+ * that is used as current state.
194
+ *
195
+ * Note that this call may be performed by the pool multiple times and transactions
196
+ * might be verified in any possible order.
197
+ *
198
+ * @callname: TaggedTransactionQueue_validate_transaction
199
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
200
+ * @param {FpSelfContainedUncheckedExtrinsic} tx
201
+ * @param {H256} block_hash
202
+ **/
203
+ validateTransaction: GenericRuntimeApiMethod<
204
+ Rv,
205
+ (
206
+ source: SpRuntimeTransactionValidityTransactionSource,
207
+ tx: FpSelfContainedUncheckedExtrinsic,
208
+ blockHash: H256,
209
+ ) => Promise<
210
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
211
+ >
212
+ >;
213
+
214
+ /**
215
+ * Generic runtime api call
216
+ **/
217
+ [method: string]: GenericRuntimeApiMethod<Rv>;
218
+ };
219
+ /**
220
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
221
+ **/
222
+ offchainWorkerApi: {
223
+ /**
224
+ * Starts the off-chain task for given block header.
225
+ *
226
+ * @callname: OffchainWorkerApi_offchain_worker
227
+ * @param {Header} header
228
+ **/
229
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
230
+
231
+ /**
232
+ * Generic runtime api call
233
+ **/
234
+ [method: string]: GenericRuntimeApiMethod<Rv>;
235
+ };
236
+ /**
237
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
238
+ **/
239
+ sessionKeys: {
240
+ /**
241
+ * Generate a set of session keys with optionally using the given seed.
242
+ * The keys should be stored within the keystore exposed via runtime
243
+ * externalities.
244
+ *
245
+ * The seed needs to be a valid `utf8` string.
246
+ *
247
+ * Returns the concatenated SCALE encoded public keys.
248
+ *
249
+ * @callname: SessionKeys_generate_session_keys
250
+ * @param {BytesLike | undefined} seed
251
+ **/
252
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
253
+
254
+ /**
255
+ * Decode the given public session keys.
256
+ *
257
+ * Returns the list of public raw public keys + key type.
258
+ *
259
+ * @callname: SessionKeys_decode_session_keys
260
+ * @param {BytesLike} encoded
261
+ **/
262
+ decodeSessionKeys: GenericRuntimeApiMethod<
263
+ Rv,
264
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
265
+ >;
266
+
267
+ /**
268
+ * Generic runtime api call
269
+ **/
270
+ [method: string]: GenericRuntimeApiMethod<Rv>;
271
+ };
272
+ /**
273
+ * @runtimeapi: AuraApi - 0xdd718d5cc53262d4
274
+ **/
275
+ auraApi: {
276
+ /**
277
+ * Returns the slot duration for Aura.
278
+ *
279
+ * Currently, only the value provided by this type at genesis will be used.
280
+ *
281
+ * @callname: AuraApi_slot_duration
282
+ **/
283
+ slotDuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlotDuration>>;
284
+
285
+ /**
286
+ * Return the current set of authorities.
287
+ *
288
+ * @callname: AuraApi_authorities
289
+ **/
290
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpConsensusAuraSr25519AppSr25519Public>>>;
291
+
292
+ /**
293
+ * Generic runtime api call
294
+ **/
295
+ [method: string]: GenericRuntimeApiMethod<Rv>;
296
+ };
297
+ /**
298
+ * @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
299
+ **/
300
+ collectCollationInfo: {
301
+ /**
302
+ * Collect information about a collation.
303
+ *
304
+ * The given `header` is the header of the built block for that
305
+ * we are collecting the collation info for.
306
+ *
307
+ * @callname: CollectCollationInfo_collect_collation_info
308
+ * @param {Header} header
309
+ **/
310
+ collectCollationInfo: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
311
+
312
+ /**
313
+ * Generic runtime api call
314
+ **/
315
+ [method: string]: GenericRuntimeApiMethod<Rv>;
316
+ };
317
+ /**
318
+ * @runtimeapi: CurrenciesApi - 0x9af86751b70c112d
319
+ **/
320
+ currenciesApi: {
321
+ /**
322
+ *
323
+ * @callname: CurrenciesApi_account
324
+ * @param {number} asset_id
325
+ * @param {AccountId32Like} who
326
+ **/
327
+ account: GenericRuntimeApiMethod<
328
+ Rv,
329
+ (assetId: number, who: AccountId32Like) => Promise<PalletCurrenciesRpcRuntimeApiAccountData>
330
+ >;
331
+
332
+ /**
333
+ *
334
+ * @callname: CurrenciesApi_accounts
335
+ * @param {AccountId32Like} who
336
+ **/
337
+ accounts: GenericRuntimeApiMethod<
338
+ Rv,
339
+ (who: AccountId32Like) => Promise<Array<[number, PalletCurrenciesRpcRuntimeApiAccountData]>>
340
+ >;
341
+
342
+ /**
343
+ *
344
+ * @callname: CurrenciesApi_free_balance
345
+ * @param {number} asset_id
346
+ * @param {AccountId32Like} who
347
+ **/
348
+ freeBalance: GenericRuntimeApiMethod<Rv, (assetId: number, who: AccountId32Like) => Promise<bigint>>;
349
+
350
+ /**
351
+ * Generic runtime api call
352
+ **/
353
+ [method: string]: GenericRuntimeApiMethod<Rv>;
354
+ };
355
+ /**
356
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
357
+ **/
358
+ accountNonceApi: {
359
+ /**
360
+ * Get current account nonce of given `AccountId`.
361
+ *
362
+ * @callname: AccountNonceApi_account_nonce
363
+ * @param {AccountId32Like} account
364
+ **/
365
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
366
+
367
+ /**
368
+ * Generic runtime api call
369
+ **/
370
+ [method: string]: GenericRuntimeApiMethod<Rv>;
371
+ };
372
+ /**
373
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
374
+ **/
375
+ transactionPaymentApi: {
376
+ /**
377
+ *
378
+ * @callname: TransactionPaymentApi_query_info
379
+ * @param {FpSelfContainedUncheckedExtrinsic} uxt
380
+ * @param {number} len
381
+ **/
382
+ queryInfo: GenericRuntimeApiMethod<
383
+ Rv,
384
+ (uxt: FpSelfContainedUncheckedExtrinsic, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
385
+ >;
386
+
387
+ /**
388
+ *
389
+ * @callname: TransactionPaymentApi_query_fee_details
390
+ * @param {FpSelfContainedUncheckedExtrinsic} uxt
391
+ * @param {number} len
392
+ **/
393
+ queryFeeDetails: GenericRuntimeApiMethod<
394
+ Rv,
395
+ (uxt: FpSelfContainedUncheckedExtrinsic, len: number) => Promise<PalletTransactionPaymentFeeDetails>
396
+ >;
397
+
398
+ /**
399
+ *
400
+ * @callname: TransactionPaymentApi_query_weight_to_fee
401
+ * @param {SpWeightsWeightV2Weight} weight
402
+ **/
403
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
404
+
405
+ /**
406
+ *
407
+ * @callname: TransactionPaymentApi_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: EthereumRuntimeRPCApi - 0x582211f65bb14b89
419
+ **/
420
+ ethereumRuntimeRPCApi: {
421
+ /**
422
+ * Returns runtime defined pallet_evm::ChainId.
423
+ *
424
+ * @callname: EthereumRuntimeRPCApi_chain_id
425
+ **/
426
+ chainId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
427
+
428
+ /**
429
+ * Returns pallet_evm::Accounts by address.
430
+ *
431
+ * @callname: EthereumRuntimeRPCApi_account_basic
432
+ * @param {H160} address
433
+ **/
434
+ accountBasic: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<EvmBackendBasic>>;
435
+
436
+ /**
437
+ * Returns FixedGasPrice::min_gas_price
438
+ *
439
+ * @callname: EthereumRuntimeRPCApi_gas_price
440
+ **/
441
+ gasPrice: GenericRuntimeApiMethod<Rv, () => Promise<U256>>;
442
+
443
+ /**
444
+ * For a given account address, returns pallet_evm::AccountCodes.
445
+ *
446
+ * @callname: EthereumRuntimeRPCApi_account_code_at
447
+ * @param {H160} address
448
+ **/
449
+ accountCodeAt: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<Bytes>>;
450
+
451
+ /**
452
+ * Returns the converted FindAuthor::find_author authority id.
453
+ *
454
+ * @callname: EthereumRuntimeRPCApi_author
455
+ **/
456
+ author: GenericRuntimeApiMethod<Rv, () => Promise<H160>>;
457
+
458
+ /**
459
+ * For a given account address and index, returns pallet_evm::AccountStorages.
460
+ *
461
+ * @callname: EthereumRuntimeRPCApi_storage_at
462
+ * @param {H160} address
463
+ * @param {U256} index
464
+ **/
465
+ storageAt: GenericRuntimeApiMethod<Rv, (address: H160, index: U256) => Promise<H256>>;
466
+
467
+ /**
468
+ *
469
+ * @callname: EthereumRuntimeRPCApi_call
470
+ * @param {H160} from
471
+ * @param {H160} to
472
+ * @param {BytesLike} data
473
+ * @param {U256} value
474
+ * @param {U256} gas_limit
475
+ * @param {U256 | undefined} max_fee_per_gas
476
+ * @param {U256 | undefined} max_priority_fee_per_gas
477
+ * @param {U256 | undefined} nonce
478
+ * @param {boolean} estimate
479
+ * @param {Array<[H160, Array<H256>]> | undefined} access_list
480
+ **/
481
+ call: GenericRuntimeApiMethod<
482
+ Rv,
483
+ (
484
+ from: H160,
485
+ to: H160,
486
+ data: BytesLike,
487
+ value: U256,
488
+ gasLimit: U256,
489
+ maxFeePerGas: U256 | undefined,
490
+ maxPriorityFeePerGas: U256 | undefined,
491
+ nonce: U256 | undefined,
492
+ estimate: boolean,
493
+ accessList?: Array<[H160, Array<H256>]> | undefined,
494
+ ) => Promise<Result<FpEvmExecutionInfoV2, DispatchError>>
495
+ >;
496
+
497
+ /**
498
+ *
499
+ * @callname: EthereumRuntimeRPCApi_create
500
+ * @param {H160} from
501
+ * @param {BytesLike} data
502
+ * @param {U256} value
503
+ * @param {U256} gas_limit
504
+ * @param {U256 | undefined} max_fee_per_gas
505
+ * @param {U256 | undefined} max_priority_fee_per_gas
506
+ * @param {U256 | undefined} nonce
507
+ * @param {boolean} estimate
508
+ * @param {Array<[H160, Array<H256>]> | undefined} access_list
509
+ **/
510
+ create: GenericRuntimeApiMethod<
511
+ Rv,
512
+ (
513
+ from: H160,
514
+ data: BytesLike,
515
+ value: U256,
516
+ gasLimit: U256,
517
+ maxFeePerGas: U256 | undefined,
518
+ maxPriorityFeePerGas: U256 | undefined,
519
+ nonce: U256 | undefined,
520
+ estimate: boolean,
521
+ accessList?: Array<[H160, Array<H256>]> | undefined,
522
+ ) => Promise<Result<FpEvmExecutionInfoV2H160, DispatchError>>
523
+ >;
524
+
525
+ /**
526
+ * Return the current block.
527
+ *
528
+ * @callname: EthereumRuntimeRPCApi_current_block
529
+ **/
530
+ currentBlock: GenericRuntimeApiMethod<Rv, () => Promise<EthereumBlock | undefined>>;
531
+
532
+ /**
533
+ * Return the current receipt.
534
+ *
535
+ * @callname: EthereumRuntimeRPCApi_current_receipts
536
+ **/
537
+ currentReceipts: GenericRuntimeApiMethod<Rv, () => Promise<Array<EthereumReceiptReceiptV3> | undefined>>;
538
+
539
+ /**
540
+ * Return the current transaction status.
541
+ *
542
+ * @callname: EthereumRuntimeRPCApi_current_transaction_statuses
543
+ **/
544
+ currentTransactionStatuses: GenericRuntimeApiMethod<Rv, () => Promise<Array<FpRpcTransactionStatus> | undefined>>;
545
+
546
+ /**
547
+ *
548
+ * @callname: EthereumRuntimeRPCApi_current_all
549
+ **/
550
+ currentAll: GenericRuntimeApiMethod<
551
+ Rv,
552
+ () => Promise<
553
+ [
554
+ EthereumBlock | undefined,
555
+ Array<EthereumReceiptReceiptV3> | undefined,
556
+ Array<FpRpcTransactionStatus> | undefined,
557
+ ]
558
+ >
559
+ >;
560
+
561
+ /**
562
+ * Receives a `Vec<OpaqueExtrinsic>` and filters all the ethereum transactions.
563
+ *
564
+ * @callname: EthereumRuntimeRPCApi_extrinsic_filter
565
+ * @param {Array<FpSelfContainedUncheckedExtrinsic>} xts
566
+ **/
567
+ extrinsicFilter: GenericRuntimeApiMethod<
568
+ Rv,
569
+ (xts: Array<FpSelfContainedUncheckedExtrinsic>) => Promise<Array<EthereumTransactionTransactionV2>>
570
+ >;
571
+
572
+ /**
573
+ * Return the elasticity multiplier.
574
+ *
575
+ * @callname: EthereumRuntimeRPCApi_elasticity
576
+ **/
577
+ elasticity: GenericRuntimeApiMethod<Rv, () => Promise<Permill | undefined>>;
578
+
579
+ /**
580
+ * Used to determine if gas limit multiplier for non-transactional calls (eth_call/estimateGas)
581
+ * is supported.
582
+ *
583
+ * @callname: EthereumRuntimeRPCApi_gas_limit_multiplier_support
584
+ **/
585
+ gasLimitMultiplierSupport: GenericRuntimeApiMethod<Rv, () => Promise<[]>>;
586
+
587
+ /**
588
+ * Return the pending block.
589
+ *
590
+ * @callname: EthereumRuntimeRPCApi_pending_block
591
+ * @param {Array<FpSelfContainedUncheckedExtrinsic>} xts
592
+ **/
593
+ pendingBlock: GenericRuntimeApiMethod<
594
+ Rv,
595
+ (
596
+ xts: Array<FpSelfContainedUncheckedExtrinsic>,
597
+ ) => Promise<[EthereumBlock | undefined, Array<FpRpcTransactionStatus> | undefined]>
598
+ >;
599
+
600
+ /**
601
+ * Initialize the pending block.
602
+ * The behavior should be the same as the runtime api Core_initialize_block but
603
+ * for a "pending" block.
604
+ * If your project don't need to have a different behavior to initialize "pending" blocks,
605
+ * you can copy your Core_initialize_block implementation.
606
+ *
607
+ * @callname: EthereumRuntimeRPCApi_initialize_pending_block
608
+ * @param {Header} header
609
+ **/
610
+ initializePendingBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
611
+
612
+ /**
613
+ * Generic runtime api call
614
+ **/
615
+ [method: string]: GenericRuntimeApiMethod<Rv>;
616
+ };
617
+ /**
618
+ * @runtimeapi: ConvertTransactionRuntimeApi - 0xe65b00e46cedd0aa
619
+ **/
620
+ convertTransactionRuntimeApi: {
621
+ /**
622
+ *
623
+ * @callname: ConvertTransactionRuntimeApi_convert_transaction
624
+ * @param {EthereumTransactionTransactionV2} transaction
625
+ **/
626
+ convertTransaction: GenericRuntimeApiMethod<
627
+ Rv,
628
+ (transaction: EthereumTransactionTransactionV2) => Promise<FpSelfContainedUncheckedExtrinsic>
629
+ >;
630
+
631
+ /**
632
+ * Generic runtime api call
633
+ **/
634
+ [method: string]: GenericRuntimeApiMethod<Rv>;
635
+ };
636
+ /**
637
+ * @runtimeapi: EvmAccountsApi - 0x0bb67a52fcd040ff
638
+ **/
639
+ evmAccountsApi: {
640
+ /**
641
+ * get the EVM address from the substrate address.
642
+ *
643
+ * @callname: EvmAccountsApi_evm_address
644
+ * @param {AccountId32Like} account_id
645
+ **/
646
+ evmAddress: GenericRuntimeApiMethod<Rv, (accountId: AccountId32Like) => Promise<H160>>;
647
+
648
+ /**
649
+ * Return the Substrate address bound to the EVM account. If not bound, returns `None`.
650
+ *
651
+ * @callname: EvmAccountsApi_bound_account_id
652
+ * @param {H160} evm_address
653
+ **/
654
+ boundAccountId: GenericRuntimeApiMethod<Rv, (evmAddress: H160) => Promise<AccountId32 | undefined>>;
655
+
656
+ /**
657
+ * Get the Substrate address from the EVM address.
658
+ * Returns the truncated version of the address if the address wasn't bind.
659
+ *
660
+ * @callname: EvmAccountsApi_account_id
661
+ * @param {H160} evm_address
662
+ **/
663
+ accountId: GenericRuntimeApiMethod<Rv, (evmAddress: H160) => Promise<AccountId32>>;
664
+
665
+ /**
666
+ * Generic runtime api call
667
+ **/
668
+ [method: string]: GenericRuntimeApiMethod<Rv>;
669
+ };
670
+ /**
671
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
672
+ **/
673
+ xcmPaymentApi: {
674
+ /**
675
+ * Returns a list of acceptable payment assets.
676
+ *
677
+ * # Arguments
678
+ *
679
+ * * `xcm_version`: Version.
680
+ *
681
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
682
+ * @param {number} xcm_version
683
+ **/
684
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
685
+ Rv,
686
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
687
+ >;
688
+
689
+ /**
690
+ * Returns a weight needed to execute a XCM.
691
+ *
692
+ * # Arguments
693
+ *
694
+ * * `message`: `VersionedXcm`.
695
+ *
696
+ * @callname: XcmPaymentApi_query_xcm_weight
697
+ * @param {XcmVersionedXcm} message
698
+ **/
699
+ queryXcmWeight: GenericRuntimeApiMethod<
700
+ Rv,
701
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
702
+ >;
703
+
704
+ /**
705
+ * Converts a weight into a fee for the specified `AssetId`.
706
+ *
707
+ * # Arguments
708
+ *
709
+ * * `weight`: convertible `Weight`.
710
+ * * `asset`: `VersionedAssetId`.
711
+ *
712
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
713
+ * @param {SpWeightsWeightV2Weight} weight
714
+ * @param {XcmVersionedAssetId} asset
715
+ **/
716
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
717
+ Rv,
718
+ (weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
719
+ >;
720
+
721
+ /**
722
+ * Get delivery fees for sending a specific `message` to a `destination`.
723
+ * These always come in a specific asset, defined by the chain.
724
+ *
725
+ * # Arguments
726
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
727
+ * size of the message.
728
+ * * `destination`: The destination to send the message to. Different destinations may use
729
+ * different senders that charge different fees.
730
+ *
731
+ * @callname: XcmPaymentApi_query_delivery_fees
732
+ * @param {XcmVersionedLocation} destination
733
+ * @param {XcmVersionedXcm} message
734
+ **/
735
+ queryDeliveryFees: GenericRuntimeApiMethod<
736
+ Rv,
737
+ (
738
+ destination: XcmVersionedLocation,
739
+ message: XcmVersionedXcm,
740
+ ) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
741
+ >;
742
+
743
+ /**
744
+ * Generic runtime api call
745
+ **/
746
+ [method: string]: GenericRuntimeApiMethod<Rv>;
747
+ };
748
+ /**
749
+ * @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
750
+ **/
751
+ dryRunApi: {
752
+ /**
753
+ * Dry run call.
754
+ *
755
+ * @callname: DryRunApi_dry_run_call
756
+ * @param {HydradxRuntimeOriginCaller} origin
757
+ * @param {HydradxRuntimeRuntimeCallLike} call
758
+ **/
759
+ dryRunCall: GenericRuntimeApiMethod<
760
+ Rv,
761
+ (
762
+ origin: HydradxRuntimeOriginCaller,
763
+ call: HydradxRuntimeRuntimeCallLike,
764
+ ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
765
+ >;
766
+
767
+ /**
768
+ * Dry run XCM program
769
+ *
770
+ * @callname: DryRunApi_dry_run_xcm
771
+ * @param {XcmVersionedLocation} origin_location
772
+ * @param {XcmVersionedXcm} xcm
773
+ **/
774
+ dryRunXcm: GenericRuntimeApiMethod<
775
+ Rv,
776
+ (
777
+ originLocation: XcmVersionedLocation,
778
+ xcm: XcmVersionedXcm,
779
+ ) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
780
+ >;
781
+
782
+ /**
783
+ * Generic runtime api call
784
+ **/
785
+ [method: string]: GenericRuntimeApiMethod<Rv>;
786
+ };
787
+ /**
788
+ * @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
789
+ **/
790
+ locationToAccountApi: {
791
+ /**
792
+ * Converts `Location` to `AccountId`.
793
+ *
794
+ * @callname: LocationToAccountApi_convert_location
795
+ * @param {XcmVersionedLocation} location
796
+ **/
797
+ convertLocation: GenericRuntimeApiMethod<
798
+ Rv,
799
+ (location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
800
+ >;
801
+
802
+ /**
803
+ * Generic runtime api call
804
+ **/
805
+ [method: string]: GenericRuntimeApiMethod<Rv>;
806
+ };
807
+ /**
808
+ * @runtimeapi: ChainlinkAdapterApi - 0x2b5f5bcd2460e4f0
809
+ **/
810
+ chainlinkAdapterApi: {
811
+ /**
812
+ *
813
+ * @callname: ChainlinkAdapterApi_encode_oracle_address
814
+ * @param {number} asset_id_a
815
+ * @param {number} asset_id_b
816
+ * @param {HydradxTraitsOracleOraclePeriod} period
817
+ * @param {FixedBytes<8>} source
818
+ **/
819
+ encodeOracleAddress: GenericRuntimeApiMethod<
820
+ Rv,
821
+ (
822
+ assetIdA: number,
823
+ assetIdB: number,
824
+ period: HydradxTraitsOracleOraclePeriod,
825
+ source: FixedBytes<8>,
826
+ ) => Promise<H160>
827
+ >;
828
+
829
+ /**
830
+ *
831
+ * @callname: ChainlinkAdapterApi_decode_oracle_address
832
+ * @param {H160} oracle_address
833
+ **/
834
+ decodeOracleAddress: GenericRuntimeApiMethod<
835
+ Rv,
836
+ (oracleAddress: H160) => Promise<[number, number, HydradxTraitsOracleOraclePeriod, FixedBytes<8>] | undefined>
837
+ >;
838
+
839
+ /**
840
+ * Generic runtime api call
841
+ **/
842
+ [method: string]: GenericRuntimeApiMethod<Rv>;
843
+ };
844
+ /**
845
+ * @runtimeapi: AaveTradeExecutor - 0xa2b2b484fcb86943
846
+ **/
847
+ aaveTradeExecutor: {
848
+ /**
849
+ *
850
+ * @callname: AaveTradeExecutor_pairs
851
+ **/
852
+ pairs: GenericRuntimeApiMethod<Rv, () => Promise<Array<[number, number]>>>;
853
+
854
+ /**
855
+ *
856
+ * @callname: AaveTradeExecutor_liquidity_depth
857
+ * @param {number} asset_in
858
+ * @param {number} asset_out
859
+ **/
860
+ liquidityDepth: GenericRuntimeApiMethod<Rv, (assetIn: number, assetOut: number) => Promise<bigint | undefined>>;
861
+
862
+ /**
863
+ *
864
+ * @callname: AaveTradeExecutor_pool
865
+ * @param {number} reserve
866
+ * @param {number} atoken
867
+ **/
868
+ pool: GenericRuntimeApiMethod<
869
+ Rv,
870
+ (reserve: number, atoken: number) => Promise<HydradxRuntimeEvmAaveTradeExecutorPoolData>
871
+ >;
872
+
873
+ /**
874
+ *
875
+ * @callname: AaveTradeExecutor_pools
876
+ **/
877
+ pools: GenericRuntimeApiMethod<Rv, () => Promise<Array<HydradxRuntimeEvmAaveTradeExecutorPoolData>>>;
878
+
879
+ /**
880
+ * Generic runtime api call
881
+ **/
882
+ [method: string]: GenericRuntimeApiMethod<Rv>;
883
+ };
884
+ /**
885
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
886
+ **/
887
+ genesisBuilder: {
888
+ /**
889
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
890
+ * storage.
891
+ *
892
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
893
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
894
+ * deserialization fails, an error is returned.
895
+ *
896
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
897
+ * defaults will be used.
898
+ *
899
+ * @callname: GenesisBuilder_build_state
900
+ * @param {BytesLike} json
901
+ **/
902
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
903
+
904
+ /**
905
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
906
+ * `id`.
907
+ *
908
+ * If `id` is `None` the function returns JSON blob representation of the default
909
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
910
+ * `RuntimeGenesisConfig`.
911
+ *
912
+ * Otherwise function returns a JSON representation of the built-in, named
913
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
914
+ * exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
915
+ * (potentially nested) key-value pairs that are intended for customizing the default
916
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
917
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
918
+ * be used in `build_state` method.
919
+ *
920
+ * @callname: GenesisBuilder_get_preset
921
+ * @param {string | undefined} id
922
+ **/
923
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
924
+
925
+ /**
926
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
927
+ *
928
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
929
+ * no named presets are provided by the runtime the list is empty.
930
+ *
931
+ * @callname: GenesisBuilder_preset_names
932
+ **/
933
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
934
+
935
+ /**
936
+ * Generic runtime api call
937
+ **/
938
+ [method: string]: GenericRuntimeApiMethod<Rv>;
939
+ };
940
+ }