@dedot/chaintypes 0.0.1-alpha.100

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 (105) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -0
  3. package/aleph/consts.d.ts +676 -0
  4. package/aleph/errors.d.ts +1054 -0
  5. package/aleph/events.d.ts +1201 -0
  6. package/aleph/index.d.ts +27 -0
  7. package/aleph/json-rpc.d.ts +85 -0
  8. package/aleph/query.d.ts +1573 -0
  9. package/aleph/runtime.d.ts +596 -0
  10. package/aleph/tx.d.ts +3440 -0
  11. package/aleph/types.d.ts +3951 -0
  12. package/astar/consts.d.ts +737 -0
  13. package/astar/errors.d.ts +1508 -0
  14. package/astar/events.d.ts +1878 -0
  15. package/astar/index.d.ts +27 -0
  16. package/astar/json-rpc.d.ts +131 -0
  17. package/astar/query.d.ts +1851 -0
  18. package/astar/runtime.d.ts +803 -0
  19. package/astar/tx.d.ts +4516 -0
  20. package/astar/types.d.ts +6141 -0
  21. package/index.d.ts +11 -0
  22. package/index.js +1 -0
  23. package/index.ts +11 -0
  24. package/kusama/consts.d.ts +1578 -0
  25. package/kusama/errors.d.ts +3152 -0
  26. package/kusama/events.d.ts +3579 -0
  27. package/kusama/index.d.ts +27 -0
  28. package/kusama/json-rpc.d.ts +103 -0
  29. package/kusama/query.d.ts +4229 -0
  30. package/kusama/runtime.d.ts +1196 -0
  31. package/kusama/tx.d.ts +9040 -0
  32. package/kusama/types.d.ts +11369 -0
  33. package/kusamaAssetHub/consts.d.ts +759 -0
  34. package/kusamaAssetHub/errors.d.ts +1494 -0
  35. package/kusamaAssetHub/events.d.ts +2491 -0
  36. package/kusamaAssetHub/index.d.ts +27 -0
  37. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  38. package/kusamaAssetHub/query.d.ts +1662 -0
  39. package/kusamaAssetHub/runtime.d.ts +555 -0
  40. package/kusamaAssetHub/tx.d.ts +6192 -0
  41. package/kusamaAssetHub/types.d.ts +6831 -0
  42. package/moonbeam/consts.d.ts +1010 -0
  43. package/moonbeam/errors.d.ts +1932 -0
  44. package/moonbeam/events.d.ts +2928 -0
  45. package/moonbeam/index.d.ts +27 -0
  46. package/moonbeam/json-rpc.d.ts +137 -0
  47. package/moonbeam/query.d.ts +2282 -0
  48. package/moonbeam/runtime.d.ts +724 -0
  49. package/moonbeam/tx.d.ts +6222 -0
  50. package/moonbeam/types.d.ts +8165 -0
  51. package/package.json +25 -0
  52. package/polkadot/consts.d.ts +1313 -0
  53. package/polkadot/errors.d.ts +2575 -0
  54. package/polkadot/events.d.ts +2757 -0
  55. package/polkadot/index.d.ts +27 -0
  56. package/polkadot/json-rpc.d.ts +103 -0
  57. package/polkadot/query.d.ts +3693 -0
  58. package/polkadot/runtime.d.ts +1196 -0
  59. package/polkadot/tx.d.ts +7706 -0
  60. package/polkadot/types.d.ts +9893 -0
  61. package/polkadotAssetHub/consts.d.ts +724 -0
  62. package/polkadotAssetHub/errors.d.ts +1465 -0
  63. package/polkadotAssetHub/events.d.ts +2462 -0
  64. package/polkadotAssetHub/index.d.ts +27 -0
  65. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  66. package/polkadotAssetHub/query.d.ts +1640 -0
  67. package/polkadotAssetHub/runtime.d.ts +558 -0
  68. package/polkadotAssetHub/tx.d.ts +6121 -0
  69. package/polkadotAssetHub/types.d.ts +6739 -0
  70. package/rococo/consts.d.ts +1423 -0
  71. package/rococo/errors.d.ts +2783 -0
  72. package/rococo/events.d.ts +3361 -0
  73. package/rococo/index.d.ts +27 -0
  74. package/rococo/json-rpc.d.ts +103 -0
  75. package/rococo/query.d.ts +3561 -0
  76. package/rococo/runtime.d.ts +1257 -0
  77. package/rococo/tx.d.ts +10721 -0
  78. package/rococo/types.d.ts +14828 -0
  79. package/rococoAssetHub/consts.d.ts +787 -0
  80. package/rococoAssetHub/errors.d.ts +1523 -0
  81. package/rococoAssetHub/events.d.ts +2517 -0
  82. package/rococoAssetHub/index.d.ts +27 -0
  83. package/rococoAssetHub/json-rpc.d.ts +89 -0
  84. package/rococoAssetHub/query.d.ts +1682 -0
  85. package/rococoAssetHub/runtime.d.ts +704 -0
  86. package/rococoAssetHub/tx.d.ts +9013 -0
  87. package/rococoAssetHub/types.d.ts +12352 -0
  88. package/substrate/consts.d.ts +2223 -0
  89. package/substrate/errors.d.ts +4023 -0
  90. package/substrate/events.d.ts +5430 -0
  91. package/substrate/index.d.ts +27 -0
  92. package/substrate/json-rpc.d.ts +101 -0
  93. package/substrate/query.d.ts +4083 -0
  94. package/substrate/runtime.d.ts +971 -0
  95. package/substrate/tx.d.ts +12501 -0
  96. package/substrate/types.d.ts +13380 -0
  97. package/westendAssetHub/consts.d.ts +787 -0
  98. package/westendAssetHub/errors.d.ts +1523 -0
  99. package/westendAssetHub/events.d.ts +2477 -0
  100. package/westendAssetHub/index.d.ts +27 -0
  101. package/westendAssetHub/json-rpc.d.ts +89 -0
  102. package/westendAssetHub/query.d.ts +1656 -0
  103. package/westendAssetHub/runtime.d.ts +652 -0
  104. package/westendAssetHub/tx.d.ts +8984 -0
  105. package/westendAssetHub/types.d.ts +12292 -0
@@ -0,0 +1,1196 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ RuntimeVersion,
6
+ Header,
7
+ DispatchError,
8
+ Result,
9
+ UncheckedExtrinsicLike,
10
+ UncheckedExtrinsic,
11
+ AccountId32Like,
12
+ H256,
13
+ BitSequence,
14
+ Bytes,
15
+ BytesLike,
16
+ } from 'dedot/codecs';
17
+ import type {
18
+ SpRuntimeBlock,
19
+ SpCoreOpaqueMetadata,
20
+ SpRuntimeTransactionValidityTransactionValidityError,
21
+ SpInherentsInherentData,
22
+ SpInherentsCheckInherentsResult,
23
+ SpRuntimeTransactionValidityValidTransaction,
24
+ SpRuntimeTransactionValidityTransactionSource,
25
+ PolkadotPrimitivesV6ValidatorAppPublic,
26
+ PolkadotPrimitivesV6ValidatorIndex,
27
+ PolkadotPrimitivesV6GroupRotationInfo,
28
+ PolkadotPrimitivesV6CoreState,
29
+ PolkadotPrimitivesV6PersistedValidationData,
30
+ PolkadotParachainPrimitivesPrimitivesId,
31
+ PolkadotPrimitivesV6OccupiedCoreAssumption,
32
+ PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
33
+ PolkadotPrimitivesV6CandidateCommitments,
34
+ PolkadotParachainPrimitivesPrimitivesValidationCode,
35
+ PolkadotPrimitivesV6CommittedCandidateReceipt,
36
+ PolkadotPrimitivesV6CandidateEvent,
37
+ PolkadotCorePrimitivesInboundDownwardMessage,
38
+ PolkadotCorePrimitivesInboundHrmpMessage,
39
+ PolkadotPrimitivesV6ScrapedOnChainVotes,
40
+ PolkadotPrimitivesV6SessionInfo,
41
+ PolkadotPrimitivesV6PvfCheckStatement,
42
+ PolkadotPrimitivesV6ValidatorAppSignature,
43
+ PolkadotCorePrimitivesCandidateHash,
44
+ PolkadotPrimitivesV6DisputeState,
45
+ PolkadotPrimitivesV6ExecutorParams,
46
+ PolkadotPrimitivesV6SlashingPendingSlashes,
47
+ PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
48
+ PolkadotPrimitivesV6SlashingDisputeProof,
49
+ PolkadotPrimitivesV6AsyncBackingBackingState,
50
+ PolkadotPrimitivesV6AsyncBackingAsyncBackingParams,
51
+ PolkadotPrimitivesVstagingApprovalVotingParams,
52
+ SpConsensusBeefyValidatorSet,
53
+ SpConsensusBeefyEquivocationProof,
54
+ SpConsensusBeefyOpaqueKeyOwnershipProof,
55
+ SpConsensusBeefyEcdsaCryptoPublic,
56
+ SpMmrPrimitivesError,
57
+ SpMmrPrimitivesEncodableOpaqueLeaf,
58
+ SpMmrPrimitivesProof,
59
+ SpConsensusBeefyMmrBeefyAuthoritySet,
60
+ SpConsensusGrandpaAppPublic,
61
+ SpConsensusGrandpaEquivocationProof,
62
+ SpConsensusGrandpaOpaqueKeyOwnershipProof,
63
+ SpConsensusBabeBabeConfiguration,
64
+ SpConsensusSlotsSlot,
65
+ SpConsensusBabeEpoch,
66
+ SpConsensusBabeOpaqueKeyOwnershipProof,
67
+ SpConsensusBabeAppPublic,
68
+ SpConsensusSlotsEquivocationProof,
69
+ SpAuthorityDiscoveryAppPublic,
70
+ SpCoreCryptoKeyTypeId,
71
+ PalletTransactionPaymentRuntimeDispatchInfo,
72
+ PalletTransactionPaymentFeeDetails,
73
+ SpWeightsWeightV2Weight,
74
+ PolkadotRuntimeRuntimeCallLike,
75
+ } from './types';
76
+
77
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
78
+ /**
79
+ * @runtimeapi: Core - 0xdf6acb689907609b
80
+ **/
81
+ core: {
82
+ /**
83
+ * Returns the version of the runtime.
84
+ *
85
+ * @callname: Core_version
86
+ **/
87
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
88
+
89
+ /**
90
+ * Execute the given block.
91
+ *
92
+ * @callname: Core_execute_block
93
+ * @param {SpRuntimeBlock} block
94
+ **/
95
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
96
+
97
+ /**
98
+ * Initialize a block with the given header.
99
+ *
100
+ * @callname: Core_initialize_block
101
+ * @param {Header} header
102
+ **/
103
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
104
+
105
+ /**
106
+ * Generic runtime api call
107
+ **/
108
+ [method: string]: GenericRuntimeApiMethod<Rv>;
109
+ };
110
+ /**
111
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
112
+ **/
113
+ metadata: {
114
+ /**
115
+ * Returns the metadata of a runtime.
116
+ *
117
+ * @callname: Metadata_metadata
118
+ **/
119
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
120
+
121
+ /**
122
+ * Returns the metadata at a given version.
123
+ *
124
+ * If the given `version` isn't supported, this will return `None`.
125
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
126
+ *
127
+ * @callname: Metadata_metadata_at_version
128
+ * @param {number} version
129
+ **/
130
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
131
+
132
+ /**
133
+ * Returns the supported metadata versions.
134
+ *
135
+ * This can be used to call `metadata_at_version`.
136
+ *
137
+ * @callname: Metadata_metadata_versions
138
+ **/
139
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
140
+
141
+ /**
142
+ * Generic runtime api call
143
+ **/
144
+ [method: string]: GenericRuntimeApiMethod<Rv>;
145
+ };
146
+ /**
147
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
148
+ **/
149
+ blockBuilder: {
150
+ /**
151
+ * Apply the given extrinsic.
152
+ *
153
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
154
+ * this block or not.
155
+ *
156
+ * @callname: BlockBuilder_apply_extrinsic
157
+ * @param {UncheckedExtrinsicLike} extrinsic
158
+ **/
159
+ applyExtrinsic: GenericRuntimeApiMethod<
160
+ Rv,
161
+ (
162
+ extrinsic: UncheckedExtrinsicLike,
163
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
164
+ >;
165
+
166
+ /**
167
+ * Finish the current block.
168
+ *
169
+ * @callname: BlockBuilder_finalize_block
170
+ **/
171
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
172
+
173
+ /**
174
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
175
+ *
176
+ * @callname: BlockBuilder_inherent_extrinsics
177
+ * @param {SpInherentsInherentData} inherent
178
+ **/
179
+ inherentExtrinsics: GenericRuntimeApiMethod<
180
+ Rv,
181
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
182
+ >;
183
+
184
+ /**
185
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
186
+ *
187
+ * @callname: BlockBuilder_check_inherents
188
+ * @param {SpRuntimeBlock} block
189
+ * @param {SpInherentsInherentData} data
190
+ **/
191
+ checkInherents: GenericRuntimeApiMethod<
192
+ Rv,
193
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
194
+ >;
195
+
196
+ /**
197
+ * Generic runtime api call
198
+ **/
199
+ [method: string]: GenericRuntimeApiMethod<Rv>;
200
+ };
201
+ /**
202
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
203
+ **/
204
+ nominationPoolsApi: {
205
+ /**
206
+ * Returns the pending rewards for the member that the AccountId was given for.
207
+ *
208
+ * @callname: NominationPoolsApi_pending_rewards
209
+ * @param {AccountId32Like} who
210
+ **/
211
+ pendingRewards: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
212
+
213
+ /**
214
+ * Returns the equivalent balance of `points` for a given pool.
215
+ *
216
+ * @callname: NominationPoolsApi_points_to_balance
217
+ * @param {number} pool_id
218
+ * @param {bigint} points
219
+ **/
220
+ pointsToBalance: GenericRuntimeApiMethod<Rv, (poolId: number, points: bigint) => Promise<bigint>>;
221
+
222
+ /**
223
+ * Returns the equivalent points of `new_funds` for a given pool.
224
+ *
225
+ * @callname: NominationPoolsApi_balance_to_points
226
+ * @param {number} pool_id
227
+ * @param {bigint} new_funds
228
+ **/
229
+ balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
230
+
231
+ /**
232
+ * Generic runtime api call
233
+ **/
234
+ [method: string]: GenericRuntimeApiMethod<Rv>;
235
+ };
236
+ /**
237
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
238
+ **/
239
+ stakingApi: {
240
+ /**
241
+ * Returns the nominations quota for a nominator with a given balance.
242
+ *
243
+ * @callname: StakingApi_nominations_quota
244
+ * @param {bigint} balance
245
+ **/
246
+ nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
247
+
248
+ /**
249
+ * Returns the page count of exposures for a validator in a given era.
250
+ *
251
+ * @callname: StakingApi_eras_stakers_page_count
252
+ * @param {number} era
253
+ * @param {AccountId32Like} account
254
+ **/
255
+ erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
256
+
257
+ /**
258
+ * Generic runtime api call
259
+ **/
260
+ [method: string]: GenericRuntimeApiMethod<Rv>;
261
+ };
262
+ /**
263
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
264
+ **/
265
+ taggedTransactionQueue: {
266
+ /**
267
+ * Validate the transaction.
268
+ *
269
+ * This method is invoked by the transaction pool to learn details about given transaction.
270
+ * The implementation should make sure to verify the correctness of the transaction
271
+ * against current state. The given `block_hash` corresponds to the hash of the block
272
+ * that is used as current state.
273
+ *
274
+ * Note that this call may be performed by the pool multiple times and transactions
275
+ * might be verified in any possible order.
276
+ *
277
+ * @callname: TaggedTransactionQueue_validate_transaction
278
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
279
+ * @param {UncheckedExtrinsicLike} tx
280
+ * @param {H256} block_hash
281
+ **/
282
+ validateTransaction: GenericRuntimeApiMethod<
283
+ Rv,
284
+ (
285
+ source: SpRuntimeTransactionValidityTransactionSource,
286
+ tx: UncheckedExtrinsicLike,
287
+ blockHash: H256,
288
+ ) => Promise<
289
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
290
+ >
291
+ >;
292
+
293
+ /**
294
+ * Generic runtime api call
295
+ **/
296
+ [method: string]: GenericRuntimeApiMethod<Rv>;
297
+ };
298
+ /**
299
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
300
+ **/
301
+ offchainWorkerApi: {
302
+ /**
303
+ * Starts the off-chain task for given block header.
304
+ *
305
+ * @callname: OffchainWorkerApi_offchain_worker
306
+ * @param {Header} header
307
+ **/
308
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
309
+
310
+ /**
311
+ * Generic runtime api call
312
+ **/
313
+ [method: string]: GenericRuntimeApiMethod<Rv>;
314
+ };
315
+ /**
316
+ * @runtimeapi: ParachainHost - 0xaf2c0297a23e6d3d
317
+ **/
318
+ parachainHost: {
319
+ /**
320
+ * Get the current validators.
321
+ *
322
+ * @callname: ParachainHost_validators
323
+ **/
324
+ validators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6ValidatorAppPublic>>>;
325
+
326
+ /**
327
+ * Returns the validator groups and rotation info localized based on the hypothetical child
328
+ * of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`
329
+ * should be the successor of the number of the block.
330
+ *
331
+ * @callname: ParachainHost_validator_groups
332
+ **/
333
+ validatorGroups: GenericRuntimeApiMethod<
334
+ Rv,
335
+ () => Promise<[Array<Array<PolkadotPrimitivesV6ValidatorIndex>>, PolkadotPrimitivesV6GroupRotationInfo]>
336
+ >;
337
+
338
+ /**
339
+ * Yields information on all availability cores as relevant to the child block.
340
+ * Cores are either free or occupied. Free cores can have paras assigned to them.
341
+ *
342
+ * @callname: ParachainHost_availability_cores
343
+ **/
344
+ availabilityCores: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6CoreState>>>;
345
+
346
+ /**
347
+ * Yields the persisted validation data for the given `ParaId` along with an assumption that
348
+ * should be used if the para currently occupies a core.
349
+ *
350
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
351
+ * and the para already occupies a core.
352
+ *
353
+ * @callname: ParachainHost_persisted_validation_data
354
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
355
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
356
+ **/
357
+ persistedValidationData: GenericRuntimeApiMethod<
358
+ Rv,
359
+ (
360
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
361
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
362
+ ) => Promise<PolkadotPrimitivesV6PersistedValidationData | undefined>
363
+ >;
364
+
365
+ /**
366
+ * Returns the persisted validation data for the given `ParaId` along with the corresponding
367
+ * validation code hash. Instead of accepting assumption about the para, matches the validation
368
+ * data hash against an expected one and yields `None` if they're not equal.
369
+ *
370
+ * @callname: ParachainHost_assumed_validation_data
371
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
372
+ * @param {H256} expected_persisted_validation_data_hash
373
+ **/
374
+ assumedValidationData: GenericRuntimeApiMethod<
375
+ Rv,
376
+ (
377
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
378
+ expectedPersistedValidationDataHash: H256,
379
+ ) => Promise<
380
+ | [PolkadotPrimitivesV6PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
381
+ | undefined
382
+ >
383
+ >;
384
+
385
+ /**
386
+ * Checks if the given validation outputs pass the acceptance criteria.
387
+ *
388
+ * @callname: ParachainHost_check_validation_outputs
389
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
390
+ * @param {PolkadotPrimitivesV6CandidateCommitments} outputs
391
+ **/
392
+ checkValidationOutputs: GenericRuntimeApiMethod<
393
+ Rv,
394
+ (
395
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
396
+ outputs: PolkadotPrimitivesV6CandidateCommitments,
397
+ ) => Promise<boolean>
398
+ >;
399
+
400
+ /**
401
+ * Returns the session index expected at a child of the block.
402
+ *
403
+ * This can be used to instantiate a `SigningContext`.
404
+ *
405
+ * @callname: ParachainHost_session_index_for_child
406
+ **/
407
+ sessionIndexForChild: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
408
+
409
+ /**
410
+ * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
411
+ *
412
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
413
+ * and the para already occupies a core.
414
+ *
415
+ * @callname: ParachainHost_validation_code
416
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
417
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
418
+ **/
419
+ validationCode: GenericRuntimeApiMethod<
420
+ Rv,
421
+ (
422
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
423
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
424
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
425
+ >;
426
+
427
+ /**
428
+ * Get the receipt of a candidate pending availability. This returns `Some` for any paras
429
+ * assigned to occupied cores in `availability_cores` and `None` otherwise.
430
+ *
431
+ * @callname: ParachainHost_candidate_pending_availability
432
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
433
+ **/
434
+ candidatePendingAvailability: GenericRuntimeApiMethod<
435
+ Rv,
436
+ (
437
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
438
+ ) => Promise<PolkadotPrimitivesV6CommittedCandidateReceipt | undefined>
439
+ >;
440
+
441
+ /**
442
+ * Get a vector of events concerning candidates that occurred within a block.
443
+ *
444
+ * @callname: ParachainHost_candidate_events
445
+ **/
446
+ candidateEvents: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6CandidateEvent>>>;
447
+
448
+ /**
449
+ * Get all the pending inbound messages in the downward message queue for a para.
450
+ *
451
+ * @callname: ParachainHost_dmq_contents
452
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
453
+ **/
454
+ dmqContents: GenericRuntimeApiMethod<
455
+ Rv,
456
+ (
457
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
458
+ ) => Promise<Array<PolkadotCorePrimitivesInboundDownwardMessage>>
459
+ >;
460
+
461
+ /**
462
+ * Get the contents of all channels addressed to the given recipient. Channels that have no
463
+ * messages in them are also included.
464
+ *
465
+ * @callname: ParachainHost_inbound_hrmp_channels_contents
466
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
467
+ **/
468
+ inboundHrmpChannelsContents: GenericRuntimeApiMethod<
469
+ Rv,
470
+ (
471
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
472
+ ) => Promise<Array<[PolkadotParachainPrimitivesPrimitivesId, Array<PolkadotCorePrimitivesInboundHrmpMessage>]>>
473
+ >;
474
+
475
+ /**
476
+ * Get the validation code from its hash.
477
+ *
478
+ * @callname: ParachainHost_validation_code_by_hash
479
+ * @param {PolkadotParachainPrimitivesPrimitivesValidationCodeHash} hash
480
+ **/
481
+ validationCodeByHash: GenericRuntimeApiMethod<
482
+ Rv,
483
+ (
484
+ hash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
485
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
486
+ >;
487
+
488
+ /**
489
+ * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
490
+ *
491
+ * @callname: ParachainHost_on_chain_votes
492
+ **/
493
+ onChainVotes: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV6ScrapedOnChainVotes | undefined>>;
494
+
495
+ /**
496
+ * Get the session info for the given session, if stored.
497
+ *
498
+ * NOTE: This function is only available since parachain host version 2.
499
+ *
500
+ * @callname: ParachainHost_session_info
501
+ * @param {number} index
502
+ **/
503
+ sessionInfo: GenericRuntimeApiMethod<Rv, (index: number) => Promise<PolkadotPrimitivesV6SessionInfo | undefined>>;
504
+
505
+ /**
506
+ * Submits a PVF pre-checking statement into the transaction pool.
507
+ *
508
+ * NOTE: This function is only available since parachain host version 2.
509
+ *
510
+ * @callname: ParachainHost_submit_pvf_check_statement
511
+ * @param {PolkadotPrimitivesV6PvfCheckStatement} stmt
512
+ * @param {PolkadotPrimitivesV6ValidatorAppSignature} signature
513
+ **/
514
+ submitPvfCheckStatement: GenericRuntimeApiMethod<
515
+ Rv,
516
+ (stmt: PolkadotPrimitivesV6PvfCheckStatement, signature: PolkadotPrimitivesV6ValidatorAppSignature) => Promise<[]>
517
+ >;
518
+
519
+ /**
520
+ * Returns code hashes of PVFs that require pre-checking by validators in the active set.
521
+ *
522
+ * NOTE: This function is only available since parachain host version 2.
523
+ *
524
+ * @callname: ParachainHost_pvfs_require_precheck
525
+ **/
526
+ pvfsRequirePrecheck: GenericRuntimeApiMethod<
527
+ Rv,
528
+ () => Promise<Array<PolkadotParachainPrimitivesPrimitivesValidationCodeHash>>
529
+ >;
530
+
531
+ /**
532
+ * Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
533
+ *
534
+ * NOTE: This function is only available since parachain host version 2.
535
+ *
536
+ * @callname: ParachainHost_validation_code_hash
537
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
538
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
539
+ **/
540
+ validationCodeHash: GenericRuntimeApiMethod<
541
+ Rv,
542
+ (
543
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
544
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
545
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>
546
+ >;
547
+
548
+ /**
549
+ * Returns all onchain disputes.
550
+ *
551
+ * @callname: ParachainHost_disputes
552
+ **/
553
+ disputes: GenericRuntimeApiMethod<
554
+ Rv,
555
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6DisputeState]>>
556
+ >;
557
+
558
+ /**
559
+ * Returns execution parameters for the session.
560
+ *
561
+ * @callname: ParachainHost_session_executor_params
562
+ * @param {number} session_index
563
+ **/
564
+ sessionExecutorParams: GenericRuntimeApiMethod<
565
+ Rv,
566
+ (sessionIndex: number) => Promise<PolkadotPrimitivesV6ExecutorParams | undefined>
567
+ >;
568
+
569
+ /**
570
+ * Returns a list of validators that lost a past session dispute and need to be slashed.
571
+ * NOTE: This function is only available since parachain host version 5.
572
+ *
573
+ * @callname: ParachainHost_unapplied_slashes
574
+ **/
575
+ unappliedSlashes: GenericRuntimeApiMethod<
576
+ Rv,
577
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6SlashingPendingSlashes]>>
578
+ >;
579
+
580
+ /**
581
+ * Returns a merkle proof of a validator session key.
582
+ * NOTE: This function is only available since parachain host version 5.
583
+ *
584
+ * @callname: ParachainHost_key_ownership_proof
585
+ * @param {PolkadotPrimitivesV6ValidatorAppPublic} validator_id
586
+ **/
587
+ keyOwnershipProof: GenericRuntimeApiMethod<
588
+ Rv,
589
+ (
590
+ validatorId: PolkadotPrimitivesV6ValidatorAppPublic,
591
+ ) => Promise<PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof | undefined>
592
+ >;
593
+
594
+ /**
595
+ * Submit an unsigned extrinsic to slash validators who lost a dispute about
596
+ * a candidate of a past session.
597
+ * NOTE: This function is only available since parachain host version 5.
598
+ *
599
+ * @callname: ParachainHost_submit_report_dispute_lost
600
+ * @param {PolkadotPrimitivesV6SlashingDisputeProof} dispute_proof
601
+ * @param {PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof} key_ownership_proof
602
+ **/
603
+ submitReportDisputeLost: GenericRuntimeApiMethod<
604
+ Rv,
605
+ (
606
+ disputeProof: PolkadotPrimitivesV6SlashingDisputeProof,
607
+ keyOwnershipProof: PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
608
+ ) => Promise<[] | undefined>
609
+ >;
610
+
611
+ /**
612
+ * Get the minimum number of backing votes for a parachain candidate.
613
+ * This is a staging method! Do not use on production runtimes!
614
+ *
615
+ * @callname: ParachainHost_minimum_backing_votes
616
+ **/
617
+ minimumBackingVotes: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
618
+
619
+ /**
620
+ * Returns the state of parachain backing for a given para.
621
+ *
622
+ * @callname: ParachainHost_para_backing_state
623
+ * @param {PolkadotParachainPrimitivesPrimitivesId} _
624
+ **/
625
+ paraBackingState: GenericRuntimeApiMethod<
626
+ Rv,
627
+ (
628
+ undefined: PolkadotParachainPrimitivesPrimitivesId,
629
+ ) => Promise<PolkadotPrimitivesV6AsyncBackingBackingState | undefined>
630
+ >;
631
+
632
+ /**
633
+ * Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
634
+ *
635
+ * @callname: ParachainHost_async_backing_params
636
+ **/
637
+ asyncBackingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV6AsyncBackingAsyncBackingParams>>;
638
+
639
+ /**
640
+ * Returns a list of all disabled validators at the given block.
641
+ *
642
+ * @callname: ParachainHost_disabled_validators
643
+ **/
644
+ disabledValidators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6ValidatorIndex>>>;
645
+
646
+ /**
647
+ * Get node features.
648
+ * This is a staging method! Do not use on production runtimes!
649
+ *
650
+ * @callname: ParachainHost_node_features
651
+ **/
652
+ nodeFeatures: GenericRuntimeApiMethod<Rv, () => Promise<BitSequence>>;
653
+
654
+ /**
655
+ * Approval voting configuration parameters
656
+ *
657
+ * @callname: ParachainHost_approval_voting_params
658
+ **/
659
+ approvalVotingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesVstagingApprovalVotingParams>>;
660
+
661
+ /**
662
+ * Generic runtime api call
663
+ **/
664
+ [method: string]: GenericRuntimeApiMethod<Rv>;
665
+ };
666
+ /**
667
+ * @runtimeapi: BeefyApi - 0x49eaaf1b548a0cb0
668
+ **/
669
+ beefyApi: {
670
+ /**
671
+ * Return the block number where BEEFY consensus is enabled/started
672
+ *
673
+ * @callname: BeefyApi_beefy_genesis
674
+ **/
675
+ beefyGenesis: GenericRuntimeApiMethod<Rv, () => Promise<number | undefined>>;
676
+
677
+ /**
678
+ * Return the current active BEEFY validator set
679
+ *
680
+ * @callname: BeefyApi_validator_set
681
+ **/
682
+ validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
683
+
684
+ /**
685
+ * Submits an unsigned extrinsic to report an equivocation. The caller
686
+ * must provide the equivocation proof and a key ownership proof
687
+ * (should be obtained using `generate_key_ownership_proof`). The
688
+ * extrinsic will be unsigned and should only be accepted for local
689
+ * authorship (not to be broadcast to the network). This method returns
690
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
691
+ * reporting is disabled for the given runtime (i.e. this method is
692
+ * hardcoded to return `None`). Only useful in an offchain context.
693
+ *
694
+ * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
695
+ * @param {SpConsensusBeefyEquivocationProof} equivocation_proof
696
+ * @param {SpConsensusBeefyOpaqueKeyOwnershipProof} key_owner_proof
697
+ **/
698
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
699
+ Rv,
700
+ (
701
+ equivocationProof: SpConsensusBeefyEquivocationProof,
702
+ keyOwnerProof: SpConsensusBeefyOpaqueKeyOwnershipProof,
703
+ ) => Promise<[] | undefined>
704
+ >;
705
+
706
+ /**
707
+ * Generates a proof of key ownership for the given authority in the
708
+ * given set. An example usage of this module is coupled with the
709
+ * session historical module to prove that a given authority key is
710
+ * tied to a given staking identity during a specific session. Proofs
711
+ * of key ownership are necessary for submitting equivocation reports.
712
+ * NOTE: even though the API takes a `set_id` as parameter the current
713
+ * implementations ignores this parameter and instead relies on this
714
+ * method being called at the correct block height, i.e. any point at
715
+ * which the given set id is live on-chain. Future implementations will
716
+ * instead use indexed data through an offchain worker, not requiring
717
+ * older states to be available.
718
+ *
719
+ * @callname: BeefyApi_generate_key_ownership_proof
720
+ * @param {bigint} set_id
721
+ * @param {SpConsensusBeefyEcdsaCryptoPublic} authority_id
722
+ **/
723
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
724
+ Rv,
725
+ (
726
+ setId: bigint,
727
+ authorityId: SpConsensusBeefyEcdsaCryptoPublic,
728
+ ) => Promise<SpConsensusBeefyOpaqueKeyOwnershipProof | undefined>
729
+ >;
730
+
731
+ /**
732
+ * Generic runtime api call
733
+ **/
734
+ [method: string]: GenericRuntimeApiMethod<Rv>;
735
+ };
736
+ /**
737
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
738
+ **/
739
+ mmrApi: {
740
+ /**
741
+ * Return the on-chain MMR root hash.
742
+ *
743
+ * @callname: MmrApi_mmr_root
744
+ **/
745
+ mmrRoot: GenericRuntimeApiMethod<Rv, () => Promise<Result<H256, SpMmrPrimitivesError>>>;
746
+
747
+ /**
748
+ * Return the number of MMR blocks in the chain.
749
+ *
750
+ * @callname: MmrApi_mmr_leaf_count
751
+ **/
752
+ mmrLeafCount: GenericRuntimeApiMethod<Rv, () => Promise<Result<bigint, SpMmrPrimitivesError>>>;
753
+
754
+ /**
755
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
756
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
757
+ *
758
+ * @callname: MmrApi_generate_proof
759
+ * @param {Array<number>} block_numbers
760
+ * @param {number | undefined} best_known_block_number
761
+ **/
762
+ generateProof: GenericRuntimeApiMethod<
763
+ Rv,
764
+ (
765
+ blockNumbers: Array<number>,
766
+ bestKnownBlockNumber?: number | undefined,
767
+ ) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>
768
+ >;
769
+
770
+ /**
771
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
772
+ *
773
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
774
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
775
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
776
+ *
777
+ * @callname: MmrApi_verify_proof
778
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
779
+ * @param {SpMmrPrimitivesProof} proof
780
+ **/
781
+ verifyProof: GenericRuntimeApiMethod<
782
+ Rv,
783
+ (
784
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
785
+ proof: SpMmrPrimitivesProof,
786
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
787
+ >;
788
+
789
+ /**
790
+ * Verify MMR proof against given root hash for a batch of leaves.
791
+ *
792
+ * Note this function does not require any on-chain storage - the
793
+ * proof is verified against given MMR root hash.
794
+ *
795
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
796
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
797
+ *
798
+ * @callname: MmrApi_verify_proof_stateless
799
+ * @param {H256} root
800
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
801
+ * @param {SpMmrPrimitivesProof} proof
802
+ **/
803
+ verifyProofStateless: GenericRuntimeApiMethod<
804
+ Rv,
805
+ (
806
+ root: H256,
807
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
808
+ proof: SpMmrPrimitivesProof,
809
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
810
+ >;
811
+
812
+ /**
813
+ * Generic runtime api call
814
+ **/
815
+ [method: string]: GenericRuntimeApiMethod<Rv>;
816
+ };
817
+ /**
818
+ * @runtimeapi: BeefyMmrApi - 0x2a5e924655399e60
819
+ **/
820
+ beefyMmrApi: {
821
+ /**
822
+ * Return the currently active BEEFY authority set proof.
823
+ *
824
+ * @callname: BeefyMmrApi_authority_set_proof
825
+ **/
826
+ authoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
827
+
828
+ /**
829
+ * Return the next/queued BEEFY authority set proof.
830
+ *
831
+ * @callname: BeefyMmrApi_next_authority_set_proof
832
+ **/
833
+ nextAuthoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
834
+
835
+ /**
836
+ * Generic runtime api call
837
+ **/
838
+ [method: string]: GenericRuntimeApiMethod<Rv>;
839
+ };
840
+ /**
841
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
842
+ **/
843
+ grandpaApi: {
844
+ /**
845
+ * Get the current GRANDPA authorities and weights. This should not change except
846
+ * for when changes are scheduled and the corresponding delay has passed.
847
+ *
848
+ * When called at block B, it will return the set of authorities that should be
849
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
850
+ * is finalized by the authorities from block B-1.
851
+ *
852
+ * @callname: GrandpaApi_grandpa_authorities
853
+ **/
854
+ grandpaAuthorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
855
+
856
+ /**
857
+ * Submits an unsigned extrinsic to report an equivocation. The caller
858
+ * must provide the equivocation proof and a key ownership proof
859
+ * (should be obtained using `generate_key_ownership_proof`). The
860
+ * extrinsic will be unsigned and should only be accepted for local
861
+ * authorship (not to be broadcast to the network). This method returns
862
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
863
+ * reporting is disabled for the given runtime (i.e. this method is
864
+ * hardcoded to return `None`). Only useful in an offchain context.
865
+ *
866
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
867
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
868
+ * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
869
+ **/
870
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
871
+ Rv,
872
+ (
873
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
874
+ keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof,
875
+ ) => Promise<[] | undefined>
876
+ >;
877
+
878
+ /**
879
+ * Generates a proof of key ownership for the given authority in the
880
+ * given set. An example usage of this module is coupled with the
881
+ * session historical module to prove that a given authority key is
882
+ * tied to a given staking identity during a specific session. Proofs
883
+ * of key ownership are necessary for submitting equivocation reports.
884
+ * NOTE: even though the API takes a `set_id` as parameter the current
885
+ * implementations ignore this parameter and instead rely on this
886
+ * method being called at the correct block height, i.e. any point at
887
+ * which the given set id is live on-chain. Future implementations will
888
+ * instead use indexed data through an offchain worker, not requiring
889
+ * older states to be available.
890
+ *
891
+ * @callname: GrandpaApi_generate_key_ownership_proof
892
+ * @param {bigint} set_id
893
+ * @param {SpConsensusGrandpaAppPublic} authority_id
894
+ **/
895
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
896
+ Rv,
897
+ (
898
+ setId: bigint,
899
+ authorityId: SpConsensusGrandpaAppPublic,
900
+ ) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>
901
+ >;
902
+
903
+ /**
904
+ * Get current GRANDPA authority set id.
905
+ *
906
+ * @callname: GrandpaApi_current_set_id
907
+ **/
908
+ currentSetId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
909
+
910
+ /**
911
+ * Generic runtime api call
912
+ **/
913
+ [method: string]: GenericRuntimeApiMethod<Rv>;
914
+ };
915
+ /**
916
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
917
+ **/
918
+ babeApi: {
919
+ /**
920
+ * Return the configuration for BABE.
921
+ *
922
+ * @callname: BabeApi_configuration
923
+ **/
924
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
925
+
926
+ /**
927
+ * Returns the slot that started the current epoch.
928
+ *
929
+ * @callname: BabeApi_current_epoch_start
930
+ **/
931
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
932
+
933
+ /**
934
+ * Returns information regarding the current epoch.
935
+ *
936
+ * @callname: BabeApi_current_epoch
937
+ **/
938
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
939
+
940
+ /**
941
+ * Returns information regarding the next epoch (which was already
942
+ * previously announced).
943
+ *
944
+ * @callname: BabeApi_next_epoch
945
+ **/
946
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
947
+
948
+ /**
949
+ * Generates a proof of key ownership for the given authority in the
950
+ * current epoch. An example usage of this module is coupled with the
951
+ * session historical module to prove that a given authority key is
952
+ * tied to a given staking identity during a specific session. Proofs
953
+ * of key ownership are necessary for submitting equivocation reports.
954
+ * NOTE: even though the API takes a `slot` as parameter the current
955
+ * implementations ignores this parameter and instead relies on this
956
+ * method being called at the correct block height, i.e. any point at
957
+ * which the epoch for the given slot is live on-chain. Future
958
+ * implementations will instead use indexed data through an offchain
959
+ * worker, not requiring older states to be available.
960
+ *
961
+ * @callname: BabeApi_generate_key_ownership_proof
962
+ * @param {SpConsensusSlotsSlot} slot
963
+ * @param {SpConsensusBabeAppPublic} authority_id
964
+ **/
965
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
966
+ Rv,
967
+ (
968
+ slot: SpConsensusSlotsSlot,
969
+ authorityId: SpConsensusBabeAppPublic,
970
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
971
+ >;
972
+
973
+ /**
974
+ * Submits an unsigned extrinsic to report an equivocation. The caller
975
+ * must provide the equivocation proof and a key ownership proof
976
+ * (should be obtained using `generate_key_ownership_proof`). The
977
+ * extrinsic will be unsigned and should only be accepted for local
978
+ * authorship (not to be broadcast to the network). This method returns
979
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
980
+ * reporting is disabled for the given runtime (i.e. this method is
981
+ * hardcoded to return `None`). Only useful in an offchain context.
982
+ *
983
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
984
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
985
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
986
+ **/
987
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
988
+ Rv,
989
+ (
990
+ equivocationProof: SpConsensusSlotsEquivocationProof,
991
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
992
+ ) => Promise<[] | undefined>
993
+ >;
994
+
995
+ /**
996
+ * Generic runtime api call
997
+ **/
998
+ [method: string]: GenericRuntimeApiMethod<Rv>;
999
+ };
1000
+ /**
1001
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
1002
+ **/
1003
+ authorityDiscoveryApi: {
1004
+ /**
1005
+ * Retrieve authority identifiers of the current and next authority set.
1006
+ *
1007
+ * @callname: AuthorityDiscoveryApi_authorities
1008
+ **/
1009
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
1010
+
1011
+ /**
1012
+ * Generic runtime api call
1013
+ **/
1014
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1015
+ };
1016
+ /**
1017
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
1018
+ **/
1019
+ sessionKeys: {
1020
+ /**
1021
+ * Generate a set of session keys with optionally using the given seed.
1022
+ * The keys should be stored within the keystore exposed via runtime
1023
+ * externalities.
1024
+ *
1025
+ * The seed needs to be a valid `utf8` string.
1026
+ *
1027
+ * Returns the concatenated SCALE encoded public keys.
1028
+ *
1029
+ * @callname: SessionKeys_generate_session_keys
1030
+ * @param {BytesLike | undefined} seed
1031
+ **/
1032
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
1033
+
1034
+ /**
1035
+ * Decode the given public session keys.
1036
+ *
1037
+ * Returns the list of public raw public keys + key type.
1038
+ *
1039
+ * @callname: SessionKeys_decode_session_keys
1040
+ * @param {BytesLike} encoded
1041
+ **/
1042
+ decodeSessionKeys: GenericRuntimeApiMethod<
1043
+ Rv,
1044
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
1045
+ >;
1046
+
1047
+ /**
1048
+ * Generic runtime api call
1049
+ **/
1050
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1051
+ };
1052
+ /**
1053
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
1054
+ **/
1055
+ accountNonceApi: {
1056
+ /**
1057
+ * Get current account nonce of given `AccountId`.
1058
+ *
1059
+ * @callname: AccountNonceApi_account_nonce
1060
+ * @param {AccountId32Like} account
1061
+ **/
1062
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
1063
+
1064
+ /**
1065
+ * Generic runtime api call
1066
+ **/
1067
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1068
+ };
1069
+ /**
1070
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
1071
+ **/
1072
+ transactionPaymentApi: {
1073
+ /**
1074
+ *
1075
+ * @callname: TransactionPaymentApi_query_info
1076
+ * @param {UncheckedExtrinsicLike} uxt
1077
+ * @param {number} len
1078
+ **/
1079
+ queryInfo: GenericRuntimeApiMethod<
1080
+ Rv,
1081
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1082
+ >;
1083
+
1084
+ /**
1085
+ *
1086
+ * @callname: TransactionPaymentApi_query_fee_details
1087
+ * @param {UncheckedExtrinsicLike} uxt
1088
+ * @param {number} len
1089
+ **/
1090
+ queryFeeDetails: GenericRuntimeApiMethod<
1091
+ Rv,
1092
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1093
+ >;
1094
+
1095
+ /**
1096
+ *
1097
+ * @callname: TransactionPaymentApi_query_weight_to_fee
1098
+ * @param {SpWeightsWeightV2Weight} weight
1099
+ **/
1100
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1101
+
1102
+ /**
1103
+ *
1104
+ * @callname: TransactionPaymentApi_query_length_to_fee
1105
+ * @param {number} length
1106
+ **/
1107
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1108
+
1109
+ /**
1110
+ * Generic runtime api call
1111
+ **/
1112
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1113
+ };
1114
+ /**
1115
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
1116
+ **/
1117
+ transactionPaymentCallApi: {
1118
+ /**
1119
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
1120
+ *
1121
+ * @callname: TransactionPaymentCallApi_query_call_info
1122
+ * @param {PolkadotRuntimeRuntimeCallLike} call
1123
+ * @param {number} len
1124
+ **/
1125
+ queryCallInfo: GenericRuntimeApiMethod<
1126
+ Rv,
1127
+ (call: PolkadotRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1128
+ >;
1129
+
1130
+ /**
1131
+ * Query fee details of a given encoded `Call`.
1132
+ *
1133
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
1134
+ * @param {PolkadotRuntimeRuntimeCallLike} call
1135
+ * @param {number} len
1136
+ **/
1137
+ queryCallFeeDetails: GenericRuntimeApiMethod<
1138
+ Rv,
1139
+ (call: PolkadotRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1140
+ >;
1141
+
1142
+ /**
1143
+ * Query the output of the current `WeightToFee` given some input.
1144
+ *
1145
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
1146
+ * @param {SpWeightsWeightV2Weight} weight
1147
+ **/
1148
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1149
+
1150
+ /**
1151
+ * Query the output of the current `LengthToFee` given some input.
1152
+ *
1153
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
1154
+ * @param {number} length
1155
+ **/
1156
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1157
+
1158
+ /**
1159
+ * Generic runtime api call
1160
+ **/
1161
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1162
+ };
1163
+ /**
1164
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
1165
+ **/
1166
+ genesisBuilder: {
1167
+ /**
1168
+ * Creates the default `GenesisConfig` and returns it as a JSON blob.
1169
+ *
1170
+ * This function instantiates the default `GenesisConfig` struct for the runtime and serializes it into a JSON
1171
+ * blob. It returns a `Vec<u8>` containing the JSON representation of the default `GenesisConfig`.
1172
+ *
1173
+ * @callname: GenesisBuilder_create_default_config
1174
+ **/
1175
+ createDefaultConfig: GenericRuntimeApiMethod<Rv, () => Promise<Bytes>>;
1176
+
1177
+ /**
1178
+ * Build `GenesisConfig` from a JSON blob not using any defaults and store it in the storage.
1179
+ *
1180
+ * This function deserializes the full `GenesisConfig` from the given JSON blob and puts it into the storage.
1181
+ * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
1182
+ * It is recommended to log any errors encountered during the process.
1183
+ *
1184
+ * Please note that provided json blob must contain all `GenesisConfig` fields, no defaults will be used.
1185
+ *
1186
+ * @callname: GenesisBuilder_build_config
1187
+ * @param {BytesLike} json
1188
+ **/
1189
+ buildConfig: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
1190
+
1191
+ /**
1192
+ * Generic runtime api call
1193
+ **/
1194
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1195
+ };
1196
+ }