@dedot/chaintypes 0.110.0 → 0.112.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,889 @@
1
+ // Generated by dedot cli
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ AccountId32Like,
6
+ H256,
7
+ Result,
8
+ BytesLike,
9
+ Bytes,
10
+ RuntimeVersion,
11
+ Header,
12
+ DispatchError,
13
+ UncheckedExtrinsicLike,
14
+ UncheckedExtrinsic,
15
+ } from 'dedot/codecs';
16
+ import type {
17
+ SpConsensusBabeBabeConfiguration,
18
+ SpConsensusSlotsSlot,
19
+ SpConsensusBabeEpoch,
20
+ SpConsensusBabeOpaqueKeyOwnershipProof,
21
+ SpConsensusBabeAppPublic,
22
+ SpConsensusSlotsEquivocationProof,
23
+ SpAuthorityDiscoveryAppPublic,
24
+ PalletTransactionPaymentRuntimeDispatchInfo,
25
+ VaraRuntimeRuntimeCallLike,
26
+ PalletTransactionPaymentFeeDetails,
27
+ SpWeightsWeightV2Weight,
28
+ PalletGearStakingRewardsInflationInfo,
29
+ PalletGearEthBridgeInternalProof,
30
+ SpRuntimeBlock,
31
+ SpRuntimeExtrinsicInclusionMode,
32
+ SpCoreOpaqueMetadata,
33
+ SpRuntimeTransactionValidityTransactionValidityError,
34
+ SpInherentsInherentData,
35
+ SpInherentsCheckInherentsResult,
36
+ SpRuntimeTransactionValidityValidTransaction,
37
+ SpRuntimeTransactionValidityTransactionSource,
38
+ SpCoreCryptoKeyTypeId,
39
+ SpConsensusGrandpaAppPublic,
40
+ SpConsensusGrandpaEquivocationProof,
41
+ SpRuntimeOpaqueValue,
42
+ GearCoreMessageReplyInfo,
43
+ GearCoreGasGasInfo,
44
+ PalletGearManagerHandleKind,
45
+ } from './types.js';
46
+
47
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
48
+ /**
49
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
50
+ **/
51
+ babeApi: {
52
+ /**
53
+ * Return the configuration for BABE.
54
+ *
55
+ * @callname: BabeApi_configuration
56
+ **/
57
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
58
+
59
+ /**
60
+ * Returns the slot that started the current epoch.
61
+ *
62
+ * @callname: BabeApi_current_epoch_start
63
+ **/
64
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
65
+
66
+ /**
67
+ * Returns information regarding the current epoch.
68
+ *
69
+ * @callname: BabeApi_current_epoch
70
+ **/
71
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
72
+
73
+ /**
74
+ * Returns information regarding the next epoch (which was already
75
+ * previously announced).
76
+ *
77
+ * @callname: BabeApi_next_epoch
78
+ **/
79
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
80
+
81
+ /**
82
+ * Generates a proof of key ownership for the given authority in the
83
+ * current epoch. An example usage of this module is coupled with the
84
+ * session historical module to prove that a given authority key is
85
+ * tied to a given staking identity during a specific session. Proofs
86
+ * of key ownership are necessary for submitting equivocation reports.
87
+ * NOTE: even though the API takes a `slot` as parameter the current
88
+ * implementations ignores this parameter and instead relies on this
89
+ * method being called at the correct block height, i.e. any point at
90
+ * which the epoch for the given slot is live on-chain. Future
91
+ * implementations will instead use indexed data through an offchain
92
+ * worker, not requiring older states to be available.
93
+ *
94
+ * @callname: BabeApi_generate_key_ownership_proof
95
+ * @param {SpConsensusSlotsSlot} slot
96
+ * @param {SpConsensusBabeAppPublic} authority_id
97
+ **/
98
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
99
+ Rv,
100
+ (
101
+ slot: SpConsensusSlotsSlot,
102
+ authorityId: SpConsensusBabeAppPublic,
103
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
104
+ >;
105
+
106
+ /**
107
+ * Submits an unsigned extrinsic to report an equivocation. The caller
108
+ * must provide the equivocation proof and a key ownership proof
109
+ * (should be obtained using `generate_key_ownership_proof`). The
110
+ * extrinsic will be unsigned and should only be accepted for local
111
+ * authorship (not to be broadcast to the network). This method returns
112
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
113
+ * reporting is disabled for the given runtime (i.e. this method is
114
+ * hardcoded to return `None`). Only useful in an offchain context.
115
+ *
116
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
117
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
118
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
119
+ **/
120
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
121
+ Rv,
122
+ (
123
+ equivocationProof: SpConsensusSlotsEquivocationProof,
124
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
125
+ ) => Promise<[] | undefined>
126
+ >;
127
+
128
+ /**
129
+ * Generic runtime api call
130
+ **/
131
+ [method: string]: GenericRuntimeApiMethod<Rv>;
132
+ };
133
+ /**
134
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
135
+ **/
136
+ authorityDiscoveryApi: {
137
+ /**
138
+ * Retrieve authority identifiers of the current and next authority set.
139
+ *
140
+ * @callname: AuthorityDiscoveryApi_authorities
141
+ **/
142
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
143
+
144
+ /**
145
+ * Generic runtime api call
146
+ **/
147
+ [method: string]: GenericRuntimeApiMethod<Rv>;
148
+ };
149
+ /**
150
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
151
+ **/
152
+ transactionPaymentCallApi: {
153
+ /**
154
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
155
+ *
156
+ * @callname: TransactionPaymentCallApi_query_call_info
157
+ * @param {VaraRuntimeRuntimeCallLike} call
158
+ * @param {number} len
159
+ **/
160
+ queryCallInfo: GenericRuntimeApiMethod<
161
+ Rv,
162
+ (call: VaraRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
163
+ >;
164
+
165
+ /**
166
+ * Query fee details of a given encoded `Call`.
167
+ *
168
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
169
+ * @param {VaraRuntimeRuntimeCallLike} call
170
+ * @param {number} len
171
+ **/
172
+ queryCallFeeDetails: GenericRuntimeApiMethod<
173
+ Rv,
174
+ (call: VaraRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
175
+ >;
176
+
177
+ /**
178
+ * Query the output of the current `WeightToFee` given some input.
179
+ *
180
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
181
+ * @param {SpWeightsWeightV2Weight} weight
182
+ **/
183
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
184
+
185
+ /**
186
+ * Query the output of the current `LengthToFee` given some input.
187
+ *
188
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
189
+ * @param {number} length
190
+ **/
191
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
192
+
193
+ /**
194
+ * Generic runtime api call
195
+ **/
196
+ [method: string]: GenericRuntimeApiMethod<Rv>;
197
+ };
198
+ /**
199
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
200
+ **/
201
+ nominationPoolsApi: {
202
+ /**
203
+ * Returns the pending rewards for the member that the AccountId was given for.
204
+ *
205
+ * @callname: NominationPoolsApi_pending_rewards
206
+ * @param {AccountId32Like} who
207
+ **/
208
+ pendingRewards: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
209
+
210
+ /**
211
+ * Returns the equivalent balance of `points` for a given pool.
212
+ *
213
+ * @callname: NominationPoolsApi_points_to_balance
214
+ * @param {number} pool_id
215
+ * @param {bigint} points
216
+ **/
217
+ pointsToBalance: GenericRuntimeApiMethod<Rv, (poolId: number, points: bigint) => Promise<bigint>>;
218
+
219
+ /**
220
+ * Returns the equivalent points of `new_funds` for a given pool.
221
+ *
222
+ * @callname: NominationPoolsApi_balance_to_points
223
+ * @param {number} pool_id
224
+ * @param {bigint} new_funds
225
+ **/
226
+ balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
227
+
228
+ /**
229
+ * Returns the pending slash for a given pool.
230
+ *
231
+ * @callname: NominationPoolsApi_pool_pending_slash
232
+ * @param {number} pool_id
233
+ **/
234
+ poolPendingSlash: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
235
+
236
+ /**
237
+ * Returns the pending slash for a given pool member.
238
+ *
239
+ * @callname: NominationPoolsApi_member_pending_slash
240
+ * @param {AccountId32Like} member
241
+ **/
242
+ memberPendingSlash: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<bigint>>;
243
+
244
+ /**
245
+ * Returns true if the pool with `pool_id` needs migration.
246
+ *
247
+ * This can happen when the `pallet-nomination-pools` has switched to using strategy
248
+ * [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool
249
+ * still has funds that were staked using the older strategy
250
+ * [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use
251
+ * [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake)
252
+ * to migrate the pool.
253
+ *
254
+ * @callname: NominationPoolsApi_pool_needs_delegate_migration
255
+ * @param {number} pool_id
256
+ **/
257
+ poolNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<boolean>>;
258
+
259
+ /**
260
+ * Returns true if the delegated funds of the pool `member` needs migration.
261
+ *
262
+ * Once a pool has successfully migrated to the strategy
263
+ * [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the
264
+ * member can be migrated from pool account to the member's account. Use
265
+ * [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation)
266
+ * to migrate the funds of the pool member.
267
+ *
268
+ * @callname: NominationPoolsApi_member_needs_delegate_migration
269
+ * @param {AccountId32Like} member
270
+ **/
271
+ memberNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<boolean>>;
272
+
273
+ /**
274
+ * Returns the total contribution of a pool member including any balance that is unbonding.
275
+ *
276
+ * @callname: NominationPoolsApi_member_total_balance
277
+ * @param {AccountId32Like} who
278
+ **/
279
+ memberTotalBalance: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
280
+
281
+ /**
282
+ * Total balance contributed to the pool.
283
+ *
284
+ * @callname: NominationPoolsApi_pool_balance
285
+ * @param {number} pool_id
286
+ **/
287
+ poolBalance: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
288
+
289
+ /**
290
+ * Generic runtime api call
291
+ **/
292
+ [method: string]: GenericRuntimeApiMethod<Rv>;
293
+ };
294
+ /**
295
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
296
+ **/
297
+ stakingApi: {
298
+ /**
299
+ * Returns the nominations quota for a nominator with a given balance.
300
+ *
301
+ * @callname: StakingApi_nominations_quota
302
+ * @param {bigint} balance
303
+ **/
304
+ nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
305
+
306
+ /**
307
+ * Returns the page count of exposures for a validator `account` in a given era.
308
+ *
309
+ * @callname: StakingApi_eras_stakers_page_count
310
+ * @param {number} era
311
+ * @param {AccountId32Like} account
312
+ **/
313
+ erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
314
+
315
+ /**
316
+ * Returns true if validator `account` has pages to be claimed for the given era.
317
+ *
318
+ * @callname: StakingApi_pending_rewards
319
+ * @param {number} era
320
+ * @param {AccountId32Like} account
321
+ **/
322
+ pendingRewards: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<boolean>>;
323
+
324
+ /**
325
+ * Generic runtime api call
326
+ **/
327
+ [method: string]: GenericRuntimeApiMethod<Rv>;
328
+ };
329
+ /**
330
+ * @runtimeapi: GearStakingRewardsApi - 0x29ca33476f4108aa
331
+ **/
332
+ gearStakingRewardsApi: {
333
+ /**
334
+ * Calculate token economics related data.
335
+ *
336
+ * @callname: GearStakingRewardsApi_inflation_info
337
+ **/
338
+ inflationInfo: GenericRuntimeApiMethod<Rv, () => Promise<PalletGearStakingRewardsInflationInfo>>;
339
+
340
+ /**
341
+ * Generic runtime api call
342
+ **/
343
+ [method: string]: GenericRuntimeApiMethod<Rv>;
344
+ };
345
+ /**
346
+ * @runtimeapi: GearBuiltinApi - 0xf757f704c8ea14fe
347
+ **/
348
+ gearBuiltinApi: {
349
+ /**
350
+ * Calculate `ProgramId` (a.k.a. actor id) for a given builtin id.
351
+ *
352
+ * @callname: GearBuiltinApi_query_actor_id
353
+ * @param {bigint} builtin_id
354
+ **/
355
+ queryActorId: GenericRuntimeApiMethod<Rv, (builtinId: bigint) => Promise<H256>>;
356
+
357
+ /**
358
+ * Generic runtime api call
359
+ **/
360
+ [method: string]: GenericRuntimeApiMethod<Rv>;
361
+ };
362
+ /**
363
+ * @runtimeapi: GearEthBridgeApi - 0xfe1bbc43de74baec
364
+ **/
365
+ gearEthBridgeApi: {
366
+ /**
367
+ * Generate merkle inclusion proof of the message hash in bridge queue.
368
+ *
369
+ * @callname: GearEthBridgeApi_merkle_proof
370
+ * @param {H256} hash
371
+ **/
372
+ merkleProof: GenericRuntimeApiMethod<Rv, (hash: H256) => Promise<PalletGearEthBridgeInternalProof | undefined>>;
373
+
374
+ /**
375
+ * Generic runtime api call
376
+ **/
377
+ [method: string]: GenericRuntimeApiMethod<Rv>;
378
+ };
379
+ /**
380
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
381
+ **/
382
+ genesisBuilder: {
383
+ /**
384
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
385
+ * storage.
386
+ *
387
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
388
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
389
+ * deserialization fails, an error is returned.
390
+ *
391
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
392
+ * defaults will be used.
393
+ *
394
+ * @callname: GenesisBuilder_build_state
395
+ * @param {BytesLike} json
396
+ **/
397
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
398
+
399
+ /**
400
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
401
+ * `id`.
402
+ *
403
+ * If `id` is `None` the function returns JSON blob representation of the default
404
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
405
+ * `RuntimeGenesisConfig`.
406
+ *
407
+ * Otherwise function returns a JSON representation of the built-in, named
408
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
409
+ * exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
410
+ * (potentially nested) key-value pairs that are intended for customizing the default
411
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
412
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
413
+ * be used in `build_state` method.
414
+ *
415
+ * @callname: GenesisBuilder_get_preset
416
+ * @param {string | undefined} id
417
+ **/
418
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
419
+
420
+ /**
421
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
422
+ *
423
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
424
+ * no named presets are provided by the runtime the list is empty.
425
+ *
426
+ * @callname: GenesisBuilder_preset_names
427
+ **/
428
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
429
+
430
+ /**
431
+ * Generic runtime api call
432
+ **/
433
+ [method: string]: GenericRuntimeApiMethod<Rv>;
434
+ };
435
+ /**
436
+ * @runtimeapi: Core - 0xdf6acb689907609b
437
+ **/
438
+ core: {
439
+ /**
440
+ * Returns the version of the runtime.
441
+ *
442
+ * @callname: Core_version
443
+ **/
444
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
445
+
446
+ /**
447
+ * Execute the given block.
448
+ *
449
+ * @callname: Core_execute_block
450
+ * @param {SpRuntimeBlock} block
451
+ **/
452
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
453
+
454
+ /**
455
+ * Initialize a block with the given header and return the runtime executive mode.
456
+ *
457
+ * @callname: Core_initialize_block
458
+ * @param {Header} header
459
+ **/
460
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
461
+
462
+ /**
463
+ * Generic runtime api call
464
+ **/
465
+ [method: string]: GenericRuntimeApiMethod<Rv>;
466
+ };
467
+ /**
468
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
469
+ **/
470
+ metadata: {
471
+ /**
472
+ * Returns the metadata of a runtime.
473
+ *
474
+ * @callname: Metadata_metadata
475
+ **/
476
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
477
+
478
+ /**
479
+ * Returns the metadata at a given version.
480
+ *
481
+ * If the given `version` isn't supported, this will return `None`.
482
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
483
+ *
484
+ * @callname: Metadata_metadata_at_version
485
+ * @param {number} version
486
+ **/
487
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
488
+
489
+ /**
490
+ * Returns the supported metadata versions.
491
+ *
492
+ * This can be used to call `metadata_at_version`.
493
+ *
494
+ * @callname: Metadata_metadata_versions
495
+ **/
496
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
497
+
498
+ /**
499
+ * Generic runtime api call
500
+ **/
501
+ [method: string]: GenericRuntimeApiMethod<Rv>;
502
+ };
503
+ /**
504
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
505
+ **/
506
+ blockBuilder: {
507
+ /**
508
+ * Apply the given extrinsic.
509
+ *
510
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
511
+ * this block or not.
512
+ *
513
+ * @callname: BlockBuilder_apply_extrinsic
514
+ * @param {UncheckedExtrinsicLike} extrinsic
515
+ **/
516
+ applyExtrinsic: GenericRuntimeApiMethod<
517
+ Rv,
518
+ (
519
+ extrinsic: UncheckedExtrinsicLike,
520
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
521
+ >;
522
+
523
+ /**
524
+ * Finish the current block.
525
+ *
526
+ * @callname: BlockBuilder_finalize_block
527
+ **/
528
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
529
+
530
+ /**
531
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
532
+ *
533
+ * @callname: BlockBuilder_inherent_extrinsics
534
+ * @param {SpInherentsInherentData} inherent
535
+ **/
536
+ inherentExtrinsics: GenericRuntimeApiMethod<
537
+ Rv,
538
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
539
+ >;
540
+
541
+ /**
542
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
543
+ *
544
+ * @callname: BlockBuilder_check_inherents
545
+ * @param {SpRuntimeBlock} block
546
+ * @param {SpInherentsInherentData} data
547
+ **/
548
+ checkInherents: GenericRuntimeApiMethod<
549
+ Rv,
550
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
551
+ >;
552
+
553
+ /**
554
+ * Generic runtime api call
555
+ **/
556
+ [method: string]: GenericRuntimeApiMethod<Rv>;
557
+ };
558
+ /**
559
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
560
+ **/
561
+ taggedTransactionQueue: {
562
+ /**
563
+ * Validate the transaction.
564
+ *
565
+ * This method is invoked by the transaction pool to learn details about given transaction.
566
+ * The implementation should make sure to verify the correctness of the transaction
567
+ * against current state. The given `block_hash` corresponds to the hash of the block
568
+ * that is used as current state.
569
+ *
570
+ * Note that this call may be performed by the pool multiple times and transactions
571
+ * might be verified in any possible order.
572
+ *
573
+ * @callname: TaggedTransactionQueue_validate_transaction
574
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
575
+ * @param {UncheckedExtrinsicLike} tx
576
+ * @param {H256} block_hash
577
+ **/
578
+ validateTransaction: GenericRuntimeApiMethod<
579
+ Rv,
580
+ (
581
+ source: SpRuntimeTransactionValidityTransactionSource,
582
+ tx: UncheckedExtrinsicLike,
583
+ blockHash: H256,
584
+ ) => Promise<
585
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
586
+ >
587
+ >;
588
+
589
+ /**
590
+ * Generic runtime api call
591
+ **/
592
+ [method: string]: GenericRuntimeApiMethod<Rv>;
593
+ };
594
+ /**
595
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
596
+ **/
597
+ offchainWorkerApi: {
598
+ /**
599
+ * Starts the off-chain task for given block header.
600
+ *
601
+ * @callname: OffchainWorkerApi_offchain_worker
602
+ * @param {Header} header
603
+ **/
604
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
605
+
606
+ /**
607
+ * Generic runtime api call
608
+ **/
609
+ [method: string]: GenericRuntimeApiMethod<Rv>;
610
+ };
611
+ /**
612
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
613
+ **/
614
+ sessionKeys: {
615
+ /**
616
+ * Generate a set of session keys with optionally using the given seed.
617
+ * The keys should be stored within the keystore exposed via runtime
618
+ * externalities.
619
+ *
620
+ * The seed needs to be a valid `utf8` string.
621
+ *
622
+ * Returns the concatenated SCALE encoded public keys.
623
+ *
624
+ * @callname: SessionKeys_generate_session_keys
625
+ * @param {BytesLike | undefined} seed
626
+ **/
627
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
628
+
629
+ /**
630
+ * Decode the given public session keys.
631
+ *
632
+ * Returns the list of public raw public keys + key type.
633
+ *
634
+ * @callname: SessionKeys_decode_session_keys
635
+ * @param {BytesLike} encoded
636
+ **/
637
+ decodeSessionKeys: GenericRuntimeApiMethod<
638
+ Rv,
639
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
640
+ >;
641
+
642
+ /**
643
+ * Generic runtime api call
644
+ **/
645
+ [method: string]: GenericRuntimeApiMethod<Rv>;
646
+ };
647
+ /**
648
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
649
+ **/
650
+ grandpaApi: {
651
+ /**
652
+ * Get the current GRANDPA authorities and weights. This should not change except
653
+ * for when changes are scheduled and the corresponding delay has passed.
654
+ *
655
+ * When called at block B, it will return the set of authorities that should be
656
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
657
+ * is finalized by the authorities from block B-1.
658
+ *
659
+ * @callname: GrandpaApi_grandpa_authorities
660
+ **/
661
+ grandpaAuthorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
662
+
663
+ /**
664
+ * Submits an unsigned extrinsic to report an equivocation. The caller
665
+ * must provide the equivocation proof and a key ownership proof
666
+ * (should be obtained using `generate_key_ownership_proof`). The
667
+ * extrinsic will be unsigned and should only be accepted for local
668
+ * authorship (not to be broadcast to the network). This method returns
669
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
670
+ * reporting is disabled for the given runtime (i.e. this method is
671
+ * hardcoded to return `None`). Only useful in an offchain context.
672
+ *
673
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
674
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
675
+ * @param {SpRuntimeOpaqueValue} key_owner_proof
676
+ **/
677
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
678
+ Rv,
679
+ (
680
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
681
+ keyOwnerProof: SpRuntimeOpaqueValue,
682
+ ) => Promise<[] | undefined>
683
+ >;
684
+
685
+ /**
686
+ * Generates a proof of key ownership for the given authority in the
687
+ * given set. An example usage of this module is coupled with the
688
+ * session historical module to prove that a given authority key is
689
+ * tied to a given staking identity during a specific session. Proofs
690
+ * of key ownership are necessary for submitting equivocation reports.
691
+ * NOTE: even though the API takes a `set_id` as parameter the current
692
+ * implementations ignore this parameter and instead rely on this
693
+ * method being called at the correct block height, i.e. any point at
694
+ * which the given set id is live on-chain. Future implementations will
695
+ * instead use indexed data through an offchain worker, not requiring
696
+ * older states to be available.
697
+ *
698
+ * @callname: GrandpaApi_generate_key_ownership_proof
699
+ * @param {bigint} set_id
700
+ * @param {SpConsensusGrandpaAppPublic} authority_id
701
+ **/
702
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
703
+ Rv,
704
+ (setId: bigint, authorityId: SpConsensusGrandpaAppPublic) => Promise<SpRuntimeOpaqueValue | undefined>
705
+ >;
706
+
707
+ /**
708
+ * Get current GRANDPA authority set id.
709
+ *
710
+ * @callname: GrandpaApi_current_set_id
711
+ **/
712
+ currentSetId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
713
+
714
+ /**
715
+ * Generic runtime api call
716
+ **/
717
+ [method: string]: GenericRuntimeApiMethod<Rv>;
718
+ };
719
+ /**
720
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
721
+ **/
722
+ accountNonceApi: {
723
+ /**
724
+ * Get current account nonce of given `AccountId`.
725
+ *
726
+ * @callname: AccountNonceApi_account_nonce
727
+ * @param {AccountId32Like} account
728
+ **/
729
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
730
+
731
+ /**
732
+ * Generic runtime api call
733
+ **/
734
+ [method: string]: GenericRuntimeApiMethod<Rv>;
735
+ };
736
+ /**
737
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
738
+ **/
739
+ transactionPaymentApi: {
740
+ /**
741
+ *
742
+ * @callname: TransactionPaymentApi_query_info
743
+ * @param {UncheckedExtrinsicLike} uxt
744
+ * @param {number} len
745
+ **/
746
+ queryInfo: GenericRuntimeApiMethod<
747
+ Rv,
748
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
749
+ >;
750
+
751
+ /**
752
+ *
753
+ * @callname: TransactionPaymentApi_query_fee_details
754
+ * @param {UncheckedExtrinsicLike} uxt
755
+ * @param {number} len
756
+ **/
757
+ queryFeeDetails: GenericRuntimeApiMethod<
758
+ Rv,
759
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
760
+ >;
761
+
762
+ /**
763
+ *
764
+ * @callname: TransactionPaymentApi_query_weight_to_fee
765
+ * @param {SpWeightsWeightV2Weight} weight
766
+ **/
767
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
768
+
769
+ /**
770
+ *
771
+ * @callname: TransactionPaymentApi_query_length_to_fee
772
+ * @param {number} length
773
+ **/
774
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
775
+
776
+ /**
777
+ * Generic runtime api call
778
+ **/
779
+ [method: string]: GenericRuntimeApiMethod<Rv>;
780
+ };
781
+ /**
782
+ * @runtimeapi: GearApi - 0xff8dc88037f26223
783
+ **/
784
+ gearApi: {
785
+ /**
786
+ *
787
+ * @callname: GearApi_calculate_reply_for_handle
788
+ * @param {H256} origin
789
+ * @param {H256} destination
790
+ * @param {BytesLike} payload
791
+ * @param {bigint} gas_limit
792
+ * @param {bigint} value
793
+ * @param {bigint} allowance_multiplier
794
+ **/
795
+ calculateReplyForHandle: GenericRuntimeApiMethod<
796
+ Rv,
797
+ (
798
+ origin: H256,
799
+ destination: H256,
800
+ payload: BytesLike,
801
+ gasLimit: bigint,
802
+ value: bigint,
803
+ allowanceMultiplier: bigint,
804
+ ) => Promise<Result<GearCoreMessageReplyInfo, Bytes>>
805
+ >;
806
+
807
+ /**
808
+ *
809
+ * @callname: GearApi_calculate_gas_info
810
+ * @param {H256} source
811
+ * @param {PalletGearManagerHandleKind} kind
812
+ * @param {BytesLike} payload
813
+ * @param {bigint} value
814
+ * @param {boolean} allow_other_panics
815
+ * @param {bigint | undefined} initial_gas
816
+ * @param {bigint | undefined} allowance_multiplier
817
+ **/
818
+ calculateGasInfo: GenericRuntimeApiMethod<
819
+ Rv,
820
+ (
821
+ source: H256,
822
+ kind: PalletGearManagerHandleKind,
823
+ payload: BytesLike,
824
+ value: bigint,
825
+ allowOtherPanics: boolean,
826
+ initialGas?: bigint | undefined,
827
+ allowanceMultiplier?: bigint | undefined,
828
+ ) => Promise<Result<GearCoreGasGasInfo, Bytes>>
829
+ >;
830
+
831
+ /**
832
+ * Generate inherent-like extrinsic that runs message queue processing.
833
+ *
834
+ * @callname: GearApi_gear_run_extrinsic
835
+ * @param {bigint | undefined} max_gas
836
+ **/
837
+ gearRunExtrinsic: GenericRuntimeApiMethod<Rv, (maxGas?: bigint | undefined) => Promise<UncheckedExtrinsic>>;
838
+
839
+ /**
840
+ *
841
+ * @callname: GearApi_read_state
842
+ * @param {H256} program_id
843
+ * @param {BytesLike} payload
844
+ * @param {bigint | undefined} allowance_multiplier
845
+ **/
846
+ readState: GenericRuntimeApiMethod<
847
+ Rv,
848
+ (programId: H256, payload: BytesLike, allowanceMultiplier?: bigint | undefined) => Promise<Result<Bytes, Bytes>>
849
+ >;
850
+
851
+ /**
852
+ *
853
+ * @callname: GearApi_read_state_using_wasm
854
+ * @param {H256} program_id
855
+ * @param {BytesLike} payload
856
+ * @param {BytesLike} fn_name
857
+ * @param {BytesLike} wasm
858
+ * @param {BytesLike | undefined} argument
859
+ * @param {bigint | undefined} allowance_multiplier
860
+ **/
861
+ readStateUsingWasm: GenericRuntimeApiMethod<
862
+ Rv,
863
+ (
864
+ programId: H256,
865
+ payload: BytesLike,
866
+ fnName: BytesLike,
867
+ wasm: BytesLike,
868
+ argument?: BytesLike | undefined,
869
+ allowanceMultiplier?: bigint | undefined,
870
+ ) => Promise<Result<Bytes, Bytes>>
871
+ >;
872
+
873
+ /**
874
+ *
875
+ * @callname: GearApi_read_metahash
876
+ * @param {H256} program_id
877
+ * @param {bigint | undefined} allowance_multiplier
878
+ **/
879
+ readMetahash: GenericRuntimeApiMethod<
880
+ Rv,
881
+ (programId: H256, allowanceMultiplier?: bigint | undefined) => Promise<Result<H256, Bytes>>
882
+ >;
883
+
884
+ /**
885
+ * Generic runtime api call
886
+ **/
887
+ [method: string]: GenericRuntimeApiMethod<Rv>;
888
+ };
889
+ }