@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,971 @@
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
+ H256,
12
+ AccountId32Like,
13
+ BytesLike,
14
+ Bytes,
15
+ AccountId32,
16
+ } from 'dedot/codecs';
17
+ import type {
18
+ SpRuntimeBlock,
19
+ SpCoreOpaqueMetadata,
20
+ SpRuntimeTransactionValidityTransactionValidityError,
21
+ SpInherentsInherentData,
22
+ SpInherentsCheckInherentsResult,
23
+ SpRuntimeTransactionValidityValidTransaction,
24
+ SpRuntimeTransactionValidityTransactionSource,
25
+ SpStatementStoreRuntimeApiValidStatement,
26
+ SpStatementStoreRuntimeApiInvalidStatement,
27
+ SpStatementStoreRuntimeApiStatementSource,
28
+ SpStatementStoreStatement,
29
+ SpConsensusGrandpaAppPublic,
30
+ SpConsensusGrandpaEquivocationProof,
31
+ SpConsensusGrandpaOpaqueKeyOwnershipProof,
32
+ SpConsensusBabeBabeConfiguration,
33
+ SpConsensusSlotsSlot,
34
+ SpConsensusBabeEpoch,
35
+ SpConsensusBabeOpaqueKeyOwnershipProof,
36
+ SpConsensusBabeAppPublic,
37
+ SpConsensusSlotsEquivocationProof,
38
+ SpAuthorityDiscoveryAppPublic,
39
+ PalletContractsPrimitivesContractResult,
40
+ SpWeightsWeightV2Weight,
41
+ PalletContractsPrimitivesContractResultResult,
42
+ PalletContractsPrimitivesCode,
43
+ PalletContractsPrimitivesCodeUploadReturnValue,
44
+ PalletContractsWasmDeterminism,
45
+ PalletContractsPrimitivesContractAccessError,
46
+ PalletTransactionPaymentRuntimeDispatchInfo,
47
+ PalletTransactionPaymentFeeDetails,
48
+ PalletAssetConversionNativeOrAssetId,
49
+ KitchensinkRuntimeRuntimeCallLike,
50
+ SpMmrPrimitivesError,
51
+ SpMmrPrimitivesEncodableOpaqueLeaf,
52
+ SpMmrPrimitivesProof,
53
+ SpCoreCryptoKeyTypeId,
54
+ } from './types';
55
+
56
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
57
+ /**
58
+ * @runtimeapi: Core - 0xdf6acb689907609b
59
+ **/
60
+ core: {
61
+ /**
62
+ * Returns the version of the runtime.
63
+ *
64
+ * @callname: Core_version
65
+ **/
66
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
67
+
68
+ /**
69
+ * Execute the given block.
70
+ *
71
+ * @callname: Core_execute_block
72
+ * @param {SpRuntimeBlock} block
73
+ **/
74
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
75
+
76
+ /**
77
+ * Initialize a block with the given header.
78
+ *
79
+ * @callname: Core_initialize_block
80
+ * @param {Header} header
81
+ **/
82
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
83
+
84
+ /**
85
+ * Generic runtime api call
86
+ **/
87
+ [method: string]: GenericRuntimeApiMethod<Rv>;
88
+ };
89
+ /**
90
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
91
+ **/
92
+ metadata: {
93
+ /**
94
+ * Returns the metadata of a runtime.
95
+ *
96
+ * @callname: Metadata_metadata
97
+ **/
98
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
99
+
100
+ /**
101
+ * Returns the metadata at a given version.
102
+ *
103
+ * If the given `version` isn't supported, this will return `None`.
104
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
105
+ *
106
+ * @callname: Metadata_metadata_at_version
107
+ * @param {number} version
108
+ **/
109
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
110
+
111
+ /**
112
+ * Returns the supported metadata versions.
113
+ *
114
+ * This can be used to call `metadata_at_version`.
115
+ *
116
+ * @callname: Metadata_metadata_versions
117
+ **/
118
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
119
+
120
+ /**
121
+ * Generic runtime api call
122
+ **/
123
+ [method: string]: GenericRuntimeApiMethod<Rv>;
124
+ };
125
+ /**
126
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
127
+ **/
128
+ blockBuilder: {
129
+ /**
130
+ * Apply the given extrinsic.
131
+ *
132
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
133
+ * this block or not.
134
+ *
135
+ * @callname: BlockBuilder_apply_extrinsic
136
+ * @param {UncheckedExtrinsicLike} extrinsic
137
+ **/
138
+ applyExtrinsic: GenericRuntimeApiMethod<
139
+ Rv,
140
+ (
141
+ extrinsic: UncheckedExtrinsicLike,
142
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
143
+ >;
144
+
145
+ /**
146
+ * Finish the current block.
147
+ *
148
+ * @callname: BlockBuilder_finalize_block
149
+ **/
150
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
151
+
152
+ /**
153
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
154
+ *
155
+ * @callname: BlockBuilder_inherent_extrinsics
156
+ * @param {SpInherentsInherentData} inherent
157
+ **/
158
+ inherentExtrinsics: GenericRuntimeApiMethod<
159
+ Rv,
160
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
161
+ >;
162
+
163
+ /**
164
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
165
+ *
166
+ * @callname: BlockBuilder_check_inherents
167
+ * @param {SpRuntimeBlock} block
168
+ * @param {SpInherentsInherentData} data
169
+ **/
170
+ checkInherents: GenericRuntimeApiMethod<
171
+ Rv,
172
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
173
+ >;
174
+
175
+ /**
176
+ * Generic runtime api call
177
+ **/
178
+ [method: string]: GenericRuntimeApiMethod<Rv>;
179
+ };
180
+ /**
181
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
182
+ **/
183
+ taggedTransactionQueue: {
184
+ /**
185
+ * Validate the transaction.
186
+ *
187
+ * This method is invoked by the transaction pool to learn details about given transaction.
188
+ * The implementation should make sure to verify the correctness of the transaction
189
+ * against current state. The given `block_hash` corresponds to the hash of the block
190
+ * that is used as current state.
191
+ *
192
+ * Note that this call may be performed by the pool multiple times and transactions
193
+ * might be verified in any possible order.
194
+ *
195
+ * @callname: TaggedTransactionQueue_validate_transaction
196
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
197
+ * @param {UncheckedExtrinsicLike} tx
198
+ * @param {H256} block_hash
199
+ **/
200
+ validateTransaction: GenericRuntimeApiMethod<
201
+ Rv,
202
+ (
203
+ source: SpRuntimeTransactionValidityTransactionSource,
204
+ tx: UncheckedExtrinsicLike,
205
+ blockHash: H256,
206
+ ) => Promise<
207
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
208
+ >
209
+ >;
210
+
211
+ /**
212
+ * Generic runtime api call
213
+ **/
214
+ [method: string]: GenericRuntimeApiMethod<Rv>;
215
+ };
216
+ /**
217
+ * @runtimeapi: ValidateStatement - 0xbe9fb0c91a8046cf
218
+ **/
219
+ validateStatement: {
220
+ /**
221
+ * Validate the statement.
222
+ *
223
+ * @callname: ValidateStatement_validate_statement
224
+ * @param {SpStatementStoreRuntimeApiStatementSource} source
225
+ * @param {SpStatementStoreStatement} statement
226
+ **/
227
+ validateStatement: GenericRuntimeApiMethod<
228
+ Rv,
229
+ (
230
+ source: SpStatementStoreRuntimeApiStatementSource,
231
+ statement: SpStatementStoreStatement,
232
+ ) => Promise<Result<SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement>>
233
+ >;
234
+
235
+ /**
236
+ * Generic runtime api call
237
+ **/
238
+ [method: string]: GenericRuntimeApiMethod<Rv>;
239
+ };
240
+ /**
241
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
242
+ **/
243
+ offchainWorkerApi: {
244
+ /**
245
+ * Starts the off-chain task for given block header.
246
+ *
247
+ * @callname: OffchainWorkerApi_offchain_worker
248
+ * @param {Header} header
249
+ **/
250
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
251
+
252
+ /**
253
+ * Generic runtime api call
254
+ **/
255
+ [method: string]: GenericRuntimeApiMethod<Rv>;
256
+ };
257
+ /**
258
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
259
+ **/
260
+ grandpaApi: {
261
+ /**
262
+ * Get the current GRANDPA authorities and weights. This should not change except
263
+ * for when changes are scheduled and the corresponding delay has passed.
264
+ *
265
+ * When called at block B, it will return the set of authorities that should be
266
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
267
+ * is finalized by the authorities from block B-1.
268
+ *
269
+ * @callname: GrandpaApi_grandpa_authorities
270
+ **/
271
+ grandpaAuthorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
272
+
273
+ /**
274
+ * Submits an unsigned extrinsic to report an equivocation. The caller
275
+ * must provide the equivocation proof and a key ownership proof
276
+ * (should be obtained using `generate_key_ownership_proof`). The
277
+ * extrinsic will be unsigned and should only be accepted for local
278
+ * authorship (not to be broadcast to the network). This method returns
279
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
280
+ * reporting is disabled for the given runtime (i.e. this method is
281
+ * hardcoded to return `None`). Only useful in an offchain context.
282
+ *
283
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
284
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
285
+ * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
286
+ **/
287
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
288
+ Rv,
289
+ (
290
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
291
+ keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof,
292
+ ) => Promise<[] | undefined>
293
+ >;
294
+
295
+ /**
296
+ * Generates a proof of key ownership for the given authority in the
297
+ * given set. An example usage of this module is coupled with the
298
+ * session historical module to prove that a given authority key is
299
+ * tied to a given staking identity during a specific session. Proofs
300
+ * of key ownership are necessary for submitting equivocation reports.
301
+ * NOTE: even though the API takes a `set_id` as parameter the current
302
+ * implementations ignore this parameter and instead rely on this
303
+ * method being called at the correct block height, i.e. any point at
304
+ * which the given set id is live on-chain. Future implementations will
305
+ * instead use indexed data through an offchain worker, not requiring
306
+ * older states to be available.
307
+ *
308
+ * @callname: GrandpaApi_generate_key_ownership_proof
309
+ * @param {bigint} set_id
310
+ * @param {SpConsensusGrandpaAppPublic} authority_id
311
+ **/
312
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
313
+ Rv,
314
+ (
315
+ setId: bigint,
316
+ authorityId: SpConsensusGrandpaAppPublic,
317
+ ) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>
318
+ >;
319
+
320
+ /**
321
+ * Get current GRANDPA authority set id.
322
+ *
323
+ * @callname: GrandpaApi_current_set_id
324
+ **/
325
+ currentSetId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
326
+
327
+ /**
328
+ * Generic runtime api call
329
+ **/
330
+ [method: string]: GenericRuntimeApiMethod<Rv>;
331
+ };
332
+ /**
333
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
334
+ **/
335
+ nominationPoolsApi: {
336
+ /**
337
+ * Returns the pending rewards for the member that the AccountId was given for.
338
+ *
339
+ * @callname: NominationPoolsApi_pending_rewards
340
+ * @param {AccountId32Like} who
341
+ **/
342
+ pendingRewards: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
343
+
344
+ /**
345
+ * Returns the equivalent balance of `points` for a given pool.
346
+ *
347
+ * @callname: NominationPoolsApi_points_to_balance
348
+ * @param {number} pool_id
349
+ * @param {bigint} points
350
+ **/
351
+ pointsToBalance: GenericRuntimeApiMethod<Rv, (poolId: number, points: bigint) => Promise<bigint>>;
352
+
353
+ /**
354
+ * Returns the equivalent points of `new_funds` for a given pool.
355
+ *
356
+ * @callname: NominationPoolsApi_balance_to_points
357
+ * @param {number} pool_id
358
+ * @param {bigint} new_funds
359
+ **/
360
+ balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
361
+
362
+ /**
363
+ * Generic runtime api call
364
+ **/
365
+ [method: string]: GenericRuntimeApiMethod<Rv>;
366
+ };
367
+ /**
368
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
369
+ **/
370
+ stakingApi: {
371
+ /**
372
+ * Returns the nominations quota for a nominator with a given balance.
373
+ *
374
+ * @callname: StakingApi_nominations_quota
375
+ * @param {bigint} balance
376
+ **/
377
+ nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
378
+
379
+ /**
380
+ * Generic runtime api call
381
+ **/
382
+ [method: string]: GenericRuntimeApiMethod<Rv>;
383
+ };
384
+ /**
385
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
386
+ **/
387
+ babeApi: {
388
+ /**
389
+ * Return the configuration for BABE.
390
+ *
391
+ * @callname: BabeApi_configuration
392
+ **/
393
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
394
+
395
+ /**
396
+ * Returns the slot that started the current epoch.
397
+ *
398
+ * @callname: BabeApi_current_epoch_start
399
+ **/
400
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
401
+
402
+ /**
403
+ * Returns information regarding the current epoch.
404
+ *
405
+ * @callname: BabeApi_current_epoch
406
+ **/
407
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
408
+
409
+ /**
410
+ * Returns information regarding the next epoch (which was already
411
+ * previously announced).
412
+ *
413
+ * @callname: BabeApi_next_epoch
414
+ **/
415
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
416
+
417
+ /**
418
+ * Generates a proof of key ownership for the given authority in the
419
+ * current epoch. An example usage of this module is coupled with the
420
+ * session historical module to prove that a given authority key is
421
+ * tied to a given staking identity during a specific session. Proofs
422
+ * of key ownership are necessary for submitting equivocation reports.
423
+ * NOTE: even though the API takes a `slot` as parameter the current
424
+ * implementations ignores this parameter and instead relies on this
425
+ * method being called at the correct block height, i.e. any point at
426
+ * which the epoch for the given slot is live on-chain. Future
427
+ * implementations will instead use indexed data through an offchain
428
+ * worker, not requiring older states to be available.
429
+ *
430
+ * @callname: BabeApi_generate_key_ownership_proof
431
+ * @param {SpConsensusSlotsSlot} slot
432
+ * @param {SpConsensusBabeAppPublic} authority_id
433
+ **/
434
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
435
+ Rv,
436
+ (
437
+ slot: SpConsensusSlotsSlot,
438
+ authorityId: SpConsensusBabeAppPublic,
439
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
440
+ >;
441
+
442
+ /**
443
+ * Submits an unsigned extrinsic to report an equivocation. The caller
444
+ * must provide the equivocation proof and a key ownership proof
445
+ * (should be obtained using `generate_key_ownership_proof`). The
446
+ * extrinsic will be unsigned and should only be accepted for local
447
+ * authorship (not to be broadcast to the network). This method returns
448
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
449
+ * reporting is disabled for the given runtime (i.e. this method is
450
+ * hardcoded to return `None`). Only useful in an offchain context.
451
+ *
452
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
453
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
454
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
455
+ **/
456
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
457
+ Rv,
458
+ (
459
+ equivocationProof: SpConsensusSlotsEquivocationProof,
460
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
461
+ ) => Promise<[] | undefined>
462
+ >;
463
+
464
+ /**
465
+ * Generic runtime api call
466
+ **/
467
+ [method: string]: GenericRuntimeApiMethod<Rv>;
468
+ };
469
+ /**
470
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
471
+ **/
472
+ authorityDiscoveryApi: {
473
+ /**
474
+ * Retrieve authority identifiers of the current and next authority set.
475
+ *
476
+ * @callname: AuthorityDiscoveryApi_authorities
477
+ **/
478
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
479
+
480
+ /**
481
+ * Generic runtime api call
482
+ **/
483
+ [method: string]: GenericRuntimeApiMethod<Rv>;
484
+ };
485
+ /**
486
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
487
+ **/
488
+ accountNonceApi: {
489
+ /**
490
+ * Get current account nonce of given `AccountId`.
491
+ *
492
+ * @callname: AccountNonceApi_account_nonce
493
+ * @param {AccountId32Like} account
494
+ **/
495
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
496
+
497
+ /**
498
+ * Generic runtime api call
499
+ **/
500
+ [method: string]: GenericRuntimeApiMethod<Rv>;
501
+ };
502
+ /**
503
+ * @runtimeapi: AssetsApi - 0x8453b50b22293977
504
+ **/
505
+ assetsApi: {
506
+ /**
507
+ * Returns the list of `AssetId`s and corresponding balance that an `AccountId` has.
508
+ *
509
+ * @callname: AssetsApi_account_balances
510
+ * @param {AccountId32Like} account
511
+ **/
512
+ accountBalances: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<Array<[number, bigint]>>>;
513
+
514
+ /**
515
+ * Generic runtime api call
516
+ **/
517
+ [method: string]: GenericRuntimeApiMethod<Rv>;
518
+ };
519
+ /**
520
+ * @runtimeapi: ContractsApi - 0x68b66ba122c93fa7
521
+ **/
522
+ contractsApi: {
523
+ /**
524
+ * Perform a call from a specified account to a given contract.
525
+ *
526
+ * See [`crate::Pallet::bare_call`].
527
+ *
528
+ * @callname: ContractsApi_call
529
+ * @param {AccountId32Like} origin
530
+ * @param {AccountId32Like} dest
531
+ * @param {bigint} value
532
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
533
+ * @param {bigint | undefined} storage_deposit_limit
534
+ * @param {BytesLike} input_data
535
+ **/
536
+ call: GenericRuntimeApiMethod<
537
+ Rv,
538
+ (
539
+ origin: AccountId32Like,
540
+ dest: AccountId32Like,
541
+ value: bigint,
542
+ gasLimit: SpWeightsWeightV2Weight | undefined,
543
+ storageDepositLimit: bigint | undefined,
544
+ inputData: BytesLike,
545
+ ) => Promise<PalletContractsPrimitivesContractResult>
546
+ >;
547
+
548
+ /**
549
+ * Instantiate a new contract.
550
+ *
551
+ * See `[crate::Pallet::bare_instantiate]`.
552
+ *
553
+ * @callname: ContractsApi_instantiate
554
+ * @param {AccountId32Like} origin
555
+ * @param {bigint} value
556
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
557
+ * @param {bigint | undefined} storage_deposit_limit
558
+ * @param {PalletContractsPrimitivesCode} code
559
+ * @param {BytesLike} data
560
+ * @param {BytesLike} salt
561
+ **/
562
+ instantiate: GenericRuntimeApiMethod<
563
+ Rv,
564
+ (
565
+ origin: AccountId32Like,
566
+ value: bigint,
567
+ gasLimit: SpWeightsWeightV2Weight | undefined,
568
+ storageDepositLimit: bigint | undefined,
569
+ code: PalletContractsPrimitivesCode,
570
+ data: BytesLike,
571
+ salt: BytesLike,
572
+ ) => Promise<PalletContractsPrimitivesContractResultResult>
573
+ >;
574
+
575
+ /**
576
+ * Upload new code without instantiating a contract from it.
577
+ *
578
+ * See [`crate::Pallet::bare_upload_code`].
579
+ *
580
+ * @callname: ContractsApi_upload_code
581
+ * @param {AccountId32Like} origin
582
+ * @param {BytesLike} code
583
+ * @param {bigint | undefined} storage_deposit_limit
584
+ * @param {PalletContractsWasmDeterminism} determinism
585
+ **/
586
+ uploadCode: GenericRuntimeApiMethod<
587
+ Rv,
588
+ (
589
+ origin: AccountId32Like,
590
+ code: BytesLike,
591
+ storageDepositLimit: bigint | undefined,
592
+ determinism: PalletContractsWasmDeterminism,
593
+ ) => Promise<Result<PalletContractsPrimitivesCodeUploadReturnValue, DispatchError>>
594
+ >;
595
+
596
+ /**
597
+ * Query a given storage key in a given contract.
598
+ *
599
+ * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
600
+ * specified account and `Ok(None)` if it doesn't. If the account specified by the address
601
+ * doesn't exist, or doesn't have a contract then `Err` is returned.
602
+ *
603
+ * @callname: ContractsApi_get_storage
604
+ * @param {AccountId32Like} address
605
+ * @param {BytesLike} key
606
+ **/
607
+ getStorage: GenericRuntimeApiMethod<
608
+ Rv,
609
+ (
610
+ address: AccountId32Like,
611
+ key: BytesLike,
612
+ ) => Promise<Result<Bytes | undefined, PalletContractsPrimitivesContractAccessError>>
613
+ >;
614
+
615
+ /**
616
+ * Generic runtime api call
617
+ **/
618
+ [method: string]: GenericRuntimeApiMethod<Rv>;
619
+ };
620
+ /**
621
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
622
+ **/
623
+ transactionPaymentApi: {
624
+ /**
625
+ *
626
+ * @callname: TransactionPaymentApi_query_info
627
+ * @param {UncheckedExtrinsicLike} uxt
628
+ * @param {number} len
629
+ **/
630
+ queryInfo: GenericRuntimeApiMethod<
631
+ Rv,
632
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
633
+ >;
634
+
635
+ /**
636
+ *
637
+ * @callname: TransactionPaymentApi_query_fee_details
638
+ * @param {UncheckedExtrinsicLike} uxt
639
+ * @param {number} len
640
+ **/
641
+ queryFeeDetails: GenericRuntimeApiMethod<
642
+ Rv,
643
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
644
+ >;
645
+
646
+ /**
647
+ *
648
+ * @callname: TransactionPaymentApi_query_weight_to_fee
649
+ * @param {SpWeightsWeightV2Weight} weight
650
+ **/
651
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
652
+
653
+ /**
654
+ *
655
+ * @callname: TransactionPaymentApi_query_length_to_fee
656
+ * @param {number} length
657
+ **/
658
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
659
+
660
+ /**
661
+ * Generic runtime api call
662
+ **/
663
+ [method: string]: GenericRuntimeApiMethod<Rv>;
664
+ };
665
+ /**
666
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
667
+ **/
668
+ assetConversionApi: {
669
+ /**
670
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
671
+ *
672
+ * Note that the price may have changed by the time the transaction is executed.
673
+ * (Use `amount_in_max` to control slippage.)
674
+ *
675
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
676
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
677
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
678
+ * @param {bigint} amount
679
+ * @param {boolean} include_fee
680
+ **/
681
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
682
+ Rv,
683
+ (
684
+ asset1: PalletAssetConversionNativeOrAssetId,
685
+ asset2: PalletAssetConversionNativeOrAssetId,
686
+ amount: bigint,
687
+ includeFee: boolean,
688
+ ) => Promise<bigint | undefined>
689
+ >;
690
+
691
+ /**
692
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
693
+ *
694
+ * Note that the price may have changed by the time the transaction is executed.
695
+ * (Use `amount_out_min` to control slippage.)
696
+ *
697
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
698
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
699
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
700
+ * @param {bigint} amount
701
+ * @param {boolean} include_fee
702
+ **/
703
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
704
+ Rv,
705
+ (
706
+ asset1: PalletAssetConversionNativeOrAssetId,
707
+ asset2: PalletAssetConversionNativeOrAssetId,
708
+ amount: bigint,
709
+ includeFee: boolean,
710
+ ) => Promise<bigint | undefined>
711
+ >;
712
+
713
+ /**
714
+ * Returns the size of the liquidity pool for the given asset pair.
715
+ *
716
+ * @callname: AssetConversionApi_get_reserves
717
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
718
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
719
+ **/
720
+ getReserves: GenericRuntimeApiMethod<
721
+ Rv,
722
+ (
723
+ asset1: PalletAssetConversionNativeOrAssetId,
724
+ asset2: PalletAssetConversionNativeOrAssetId,
725
+ ) => Promise<[bigint, bigint] | undefined>
726
+ >;
727
+
728
+ /**
729
+ * Generic runtime api call
730
+ **/
731
+ [method: string]: GenericRuntimeApiMethod<Rv>;
732
+ };
733
+ /**
734
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
735
+ **/
736
+ transactionPaymentCallApi: {
737
+ /**
738
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
739
+ *
740
+ * @callname: TransactionPaymentCallApi_query_call_info
741
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
742
+ * @param {number} len
743
+ **/
744
+ queryCallInfo: GenericRuntimeApiMethod<
745
+ Rv,
746
+ (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
747
+ >;
748
+
749
+ /**
750
+ * Query fee details of a given encoded `Call`.
751
+ *
752
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
753
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
754
+ * @param {number} len
755
+ **/
756
+ queryCallFeeDetails: GenericRuntimeApiMethod<
757
+ Rv,
758
+ (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
759
+ >;
760
+
761
+ /**
762
+ * Query the output of the current `WeightToFee` given some input.
763
+ *
764
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
765
+ * @param {SpWeightsWeightV2Weight} weight
766
+ **/
767
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
768
+
769
+ /**
770
+ * Query the output of the current `LengthToFee` given some input.
771
+ *
772
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
773
+ * @param {number} length
774
+ **/
775
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
776
+
777
+ /**
778
+ * Generic runtime api call
779
+ **/
780
+ [method: string]: GenericRuntimeApiMethod<Rv>;
781
+ };
782
+ /**
783
+ * @runtimeapi: NftsApi - 0x899a250cbe84f250
784
+ **/
785
+ nftsApi: {
786
+ /**
787
+ *
788
+ * @callname: NftsApi_owner
789
+ * @param {number} collection
790
+ * @param {number} item
791
+ **/
792
+ owner: GenericRuntimeApiMethod<Rv, (collection: number, item: number) => Promise<AccountId32 | undefined>>;
793
+
794
+ /**
795
+ *
796
+ * @callname: NftsApi_collection_owner
797
+ * @param {number} collection
798
+ **/
799
+ collectionOwner: GenericRuntimeApiMethod<Rv, (collection: number) => Promise<AccountId32 | undefined>>;
800
+
801
+ /**
802
+ *
803
+ * @callname: NftsApi_attribute
804
+ * @param {number} collection
805
+ * @param {number} item
806
+ * @param {BytesLike} key
807
+ **/
808
+ attribute: GenericRuntimeApiMethod<
809
+ Rv,
810
+ (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
811
+ >;
812
+
813
+ /**
814
+ *
815
+ * @callname: NftsApi_custom_attribute
816
+ * @param {AccountId32Like} account
817
+ * @param {number} collection
818
+ * @param {number} item
819
+ * @param {BytesLike} key
820
+ **/
821
+ customAttribute: GenericRuntimeApiMethod<
822
+ Rv,
823
+ (account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
824
+ >;
825
+
826
+ /**
827
+ *
828
+ * @callname: NftsApi_system_attribute
829
+ * @param {number} collection
830
+ * @param {number} item
831
+ * @param {BytesLike} key
832
+ **/
833
+ systemAttribute: GenericRuntimeApiMethod<
834
+ Rv,
835
+ (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
836
+ >;
837
+
838
+ /**
839
+ *
840
+ * @callname: NftsApi_collection_attribute
841
+ * @param {number} collection
842
+ * @param {BytesLike} key
843
+ **/
844
+ collectionAttribute: GenericRuntimeApiMethod<
845
+ Rv,
846
+ (collection: number, key: BytesLike) => Promise<Bytes | undefined>
847
+ >;
848
+
849
+ /**
850
+ * Generic runtime api call
851
+ **/
852
+ [method: string]: GenericRuntimeApiMethod<Rv>;
853
+ };
854
+ /**
855
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
856
+ **/
857
+ mmrApi: {
858
+ /**
859
+ * Return the on-chain MMR root hash.
860
+ *
861
+ * @callname: MmrApi_mmr_root
862
+ **/
863
+ mmrRoot: GenericRuntimeApiMethod<Rv, () => Promise<Result<H256, SpMmrPrimitivesError>>>;
864
+
865
+ /**
866
+ * Return the number of MMR blocks in the chain.
867
+ *
868
+ * @callname: MmrApi_mmr_leaf_count
869
+ **/
870
+ mmrLeafCount: GenericRuntimeApiMethod<Rv, () => Promise<Result<bigint, SpMmrPrimitivesError>>>;
871
+
872
+ /**
873
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
874
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
875
+ *
876
+ * @callname: MmrApi_generate_proof
877
+ * @param {Array<number>} block_numbers
878
+ * @param {number | undefined} best_known_block_number
879
+ **/
880
+ generateProof: GenericRuntimeApiMethod<
881
+ Rv,
882
+ (
883
+ blockNumbers: Array<number>,
884
+ bestKnownBlockNumber?: number | undefined,
885
+ ) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>
886
+ >;
887
+
888
+ /**
889
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
890
+ *
891
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
892
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
893
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
894
+ *
895
+ * @callname: MmrApi_verify_proof
896
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
897
+ * @param {SpMmrPrimitivesProof} proof
898
+ **/
899
+ verifyProof: GenericRuntimeApiMethod<
900
+ Rv,
901
+ (
902
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
903
+ proof: SpMmrPrimitivesProof,
904
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
905
+ >;
906
+
907
+ /**
908
+ * Verify MMR proof against given root hash for a batch of leaves.
909
+ *
910
+ * Note this function does not require any on-chain storage - the
911
+ * proof is verified against given MMR root hash.
912
+ *
913
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
914
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
915
+ *
916
+ * @callname: MmrApi_verify_proof_stateless
917
+ * @param {H256} root
918
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
919
+ * @param {SpMmrPrimitivesProof} proof
920
+ **/
921
+ verifyProofStateless: GenericRuntimeApiMethod<
922
+ Rv,
923
+ (
924
+ root: H256,
925
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
926
+ proof: SpMmrPrimitivesProof,
927
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
928
+ >;
929
+
930
+ /**
931
+ * Generic runtime api call
932
+ **/
933
+ [method: string]: GenericRuntimeApiMethod<Rv>;
934
+ };
935
+ /**
936
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
937
+ **/
938
+ sessionKeys: {
939
+ /**
940
+ * Generate a set of session keys with optionally using the given seed.
941
+ * The keys should be stored within the keystore exposed via runtime
942
+ * externalities.
943
+ *
944
+ * The seed needs to be a valid `utf8` string.
945
+ *
946
+ * Returns the concatenated SCALE encoded public keys.
947
+ *
948
+ * @callname: SessionKeys_generate_session_keys
949
+ * @param {BytesLike | undefined} seed
950
+ **/
951
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
952
+
953
+ /**
954
+ * Decode the given public session keys.
955
+ *
956
+ * Returns the list of public raw public keys + key type.
957
+ *
958
+ * @callname: SessionKeys_decode_session_keys
959
+ * @param {BytesLike} encoded
960
+ **/
961
+ decodeSessionKeys: GenericRuntimeApiMethod<
962
+ Rv,
963
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
964
+ >;
965
+
966
+ /**
967
+ * Generic runtime api call
968
+ **/
969
+ [method: string]: GenericRuntimeApiMethod<Rv>;
970
+ };
971
+ }