@dedot/chaintypes 0.205.0 → 0.206.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.
- package/basilisk/consts.d.ts +86 -19
- package/basilisk/errors.d.ts +66 -24
- package/basilisk/events.d.ts +211 -51
- package/basilisk/index.d.ts +1 -1
- package/basilisk/query.d.ts +120 -61
- package/basilisk/runtime.d.ts +389 -84
- package/basilisk/tx.d.ts +404 -48
- package/basilisk/types.d.ts +1068 -386
- package/package.json +2 -2
- package/paseo-hydration/events.d.ts +10 -12
- package/paseo-hydration/index.d.ts +1 -1
- package/paseo-hydration/query.d.ts +9 -0
- package/paseo-hydration/tx.d.ts +14 -21
- package/paseo-hydration/types.d.ts +20 -28
package/basilisk/runtime.d.ts
CHANGED
|
@@ -2,59 +2,112 @@
|
|
|
2
2
|
|
|
3
3
|
import type { GenericRuntimeApis, GenericRuntimeApiMethod } from 'dedot/types';
|
|
4
4
|
import type {
|
|
5
|
-
|
|
6
|
-
OpaqueMetadata,
|
|
7
|
-
ApplyExtrinsicResult,
|
|
8
|
-
OpaqueExtrinsicLike,
|
|
9
|
-
CheckInherentsResult,
|
|
10
|
-
Block,
|
|
11
|
-
InherentData,
|
|
12
|
-
OpaqueExtrinsic,
|
|
5
|
+
RuntimeVersion,
|
|
13
6
|
Header,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
DispatchError,
|
|
8
|
+
Result,
|
|
9
|
+
UncheckedExtrinsicLike,
|
|
10
|
+
UncheckedExtrinsic,
|
|
11
|
+
H256,
|
|
17
12
|
Bytes,
|
|
18
13
|
BytesLike,
|
|
19
|
-
KeyTypeId,
|
|
20
|
-
Nonce,
|
|
21
14
|
AccountId32Like,
|
|
22
|
-
|
|
23
|
-
FeeDetails,
|
|
24
|
-
Balance,
|
|
25
|
-
Weight,
|
|
26
|
-
Result,
|
|
27
|
-
Text,
|
|
15
|
+
AccountId32,
|
|
28
16
|
} from 'dedot/codecs';
|
|
17
|
+
import type {
|
|
18
|
+
SpRuntimeBlock,
|
|
19
|
+
SpRuntimeExtrinsicInclusionMode,
|
|
20
|
+
SpCoreOpaqueMetadata,
|
|
21
|
+
SpRuntimeTransactionValidityTransactionValidityError,
|
|
22
|
+
SpInherentsInherentData,
|
|
23
|
+
SpInherentsCheckInherentsResult,
|
|
24
|
+
SpRuntimeTransactionValidityValidTransaction,
|
|
25
|
+
SpRuntimeTransactionValidityTransactionSource,
|
|
26
|
+
SpCoreCryptoKeyTypeId,
|
|
27
|
+
SpConsensusSlotsSlotDuration,
|
|
28
|
+
SpConsensusAuraSr25519AppSr25519Public,
|
|
29
|
+
CumulusPrimitivesCoreCollationInfo,
|
|
30
|
+
PalletTransactionPaymentRuntimeDispatchInfo,
|
|
31
|
+
PalletTransactionPaymentFeeDetails,
|
|
32
|
+
SpWeightsWeightV2Weight,
|
|
33
|
+
XcmVersionedAssetId,
|
|
34
|
+
XcmRuntimeApisFeesError,
|
|
35
|
+
XcmVersionedXcm,
|
|
36
|
+
XcmVersionedAssets,
|
|
37
|
+
XcmVersionedLocation,
|
|
38
|
+
XcmRuntimeApisDryRunCallDryRunEffects,
|
|
39
|
+
XcmRuntimeApisDryRunError,
|
|
40
|
+
BasiliskRuntimeOriginCaller,
|
|
41
|
+
BasiliskRuntimeRuntimeCallLike,
|
|
42
|
+
XcmRuntimeApisDryRunXcmDryRunEffects,
|
|
43
|
+
XcmRuntimeApisConversionsError,
|
|
44
|
+
SpConsensusSlotsSlot,
|
|
45
|
+
} from './types.js';
|
|
29
46
|
|
|
30
47
|
export interface RuntimeApis extends GenericRuntimeApis {
|
|
48
|
+
/**
|
|
49
|
+
* @runtimeapi: Core - 0xdf6acb689907609b
|
|
50
|
+
**/
|
|
51
|
+
core: {
|
|
52
|
+
/**
|
|
53
|
+
* Returns the version of the runtime.
|
|
54
|
+
*
|
|
55
|
+
* @callname: Core_version
|
|
56
|
+
**/
|
|
57
|
+
version: GenericRuntimeApiMethod<() => Promise<RuntimeVersion>>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Execute the given block.
|
|
61
|
+
*
|
|
62
|
+
* @callname: Core_execute_block
|
|
63
|
+
* @param {SpRuntimeBlock} block
|
|
64
|
+
**/
|
|
65
|
+
executeBlock: GenericRuntimeApiMethod<(block: SpRuntimeBlock) => Promise<[]>>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Initialize a block with the given header and return the runtime executive mode.
|
|
69
|
+
*
|
|
70
|
+
* @callname: Core_initialize_block
|
|
71
|
+
* @param {Header} header
|
|
72
|
+
**/
|
|
73
|
+
initializeBlock: GenericRuntimeApiMethod<(header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Generic runtime api call
|
|
77
|
+
**/
|
|
78
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
79
|
+
};
|
|
31
80
|
/**
|
|
32
81
|
* @runtimeapi: Metadata - 0x37e397fc7c91f5e4
|
|
33
|
-
* @version: 2
|
|
34
82
|
**/
|
|
35
83
|
metadata: {
|
|
84
|
+
/**
|
|
85
|
+
* Returns the metadata of a runtime.
|
|
86
|
+
*
|
|
87
|
+
* @callname: Metadata_metadata
|
|
88
|
+
**/
|
|
89
|
+
metadata: GenericRuntimeApiMethod<() => Promise<SpCoreOpaqueMetadata>>;
|
|
90
|
+
|
|
36
91
|
/**
|
|
37
92
|
* Returns the metadata at a given version.
|
|
38
93
|
*
|
|
94
|
+
* If the given `version` isn't supported, this will return `None`.
|
|
95
|
+
* Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
|
96
|
+
*
|
|
39
97
|
* @callname: Metadata_metadata_at_version
|
|
40
98
|
* @param {number} version
|
|
41
99
|
**/
|
|
42
|
-
metadataAtVersion: GenericRuntimeApiMethod<(version: number) => Promise<
|
|
100
|
+
metadataAtVersion: GenericRuntimeApiMethod<(version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
|
|
43
101
|
|
|
44
102
|
/**
|
|
45
103
|
* Returns the supported metadata versions.
|
|
46
104
|
*
|
|
105
|
+
* This can be used to call `metadata_at_version`.
|
|
106
|
+
*
|
|
47
107
|
* @callname: Metadata_metadata_versions
|
|
48
108
|
**/
|
|
49
109
|
metadataVersions: GenericRuntimeApiMethod<() => Promise<Array<number>>>;
|
|
50
110
|
|
|
51
|
-
/**
|
|
52
|
-
* Returns the metadata of a runtime.
|
|
53
|
-
*
|
|
54
|
-
* @callname: Metadata_metadata
|
|
55
|
-
**/
|
|
56
|
-
metadata: GenericRuntimeApiMethod<() => Promise<OpaqueMetadata>>;
|
|
57
|
-
|
|
58
111
|
/**
|
|
59
112
|
* Generic runtime api call
|
|
60
113
|
**/
|
|
@@ -62,36 +115,50 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
62
115
|
};
|
|
63
116
|
/**
|
|
64
117
|
* @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
|
|
65
|
-
* @version: 6
|
|
66
118
|
**/
|
|
67
119
|
blockBuilder: {
|
|
68
120
|
/**
|
|
121
|
+
* Apply the given extrinsic.
|
|
122
|
+
*
|
|
123
|
+
* Returns an inclusion outcome which specifies if this extrinsic is included in
|
|
124
|
+
* this block or not.
|
|
69
125
|
*
|
|
70
126
|
* @callname: BlockBuilder_apply_extrinsic
|
|
71
|
-
* @param {
|
|
127
|
+
* @param {UncheckedExtrinsicLike} extrinsic
|
|
72
128
|
**/
|
|
73
|
-
applyExtrinsic: GenericRuntimeApiMethod<
|
|
129
|
+
applyExtrinsic: GenericRuntimeApiMethod<
|
|
130
|
+
(
|
|
131
|
+
extrinsic: UncheckedExtrinsicLike,
|
|
132
|
+
) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
|
|
133
|
+
>;
|
|
74
134
|
|
|
75
135
|
/**
|
|
136
|
+
* Finish the current block.
|
|
76
137
|
*
|
|
77
|
-
* @callname:
|
|
78
|
-
* @param {Block} block
|
|
79
|
-
* @param {InherentData} data
|
|
138
|
+
* @callname: BlockBuilder_finalize_block
|
|
80
139
|
**/
|
|
81
|
-
|
|
140
|
+
finalizeBlock: GenericRuntimeApiMethod<() => Promise<Header>>;
|
|
82
141
|
|
|
83
142
|
/**
|
|
143
|
+
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
|
84
144
|
*
|
|
85
145
|
* @callname: BlockBuilder_inherent_extrinsics
|
|
86
|
-
* @param {
|
|
146
|
+
* @param {SpInherentsInherentData} inherent
|
|
87
147
|
**/
|
|
88
|
-
inherentExtrinsics: GenericRuntimeApiMethod<
|
|
148
|
+
inherentExtrinsics: GenericRuntimeApiMethod<
|
|
149
|
+
(inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
|
|
150
|
+
>;
|
|
89
151
|
|
|
90
152
|
/**
|
|
153
|
+
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
|
91
154
|
*
|
|
92
|
-
* @callname:
|
|
155
|
+
* @callname: BlockBuilder_check_inherents
|
|
156
|
+
* @param {SpRuntimeBlock} block
|
|
157
|
+
* @param {SpInherentsInherentData} data
|
|
93
158
|
**/
|
|
94
|
-
|
|
159
|
+
checkInherents: GenericRuntimeApiMethod<
|
|
160
|
+
(block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
|
|
161
|
+
>;
|
|
95
162
|
|
|
96
163
|
/**
|
|
97
164
|
* Generic runtime api call
|
|
@@ -100,19 +167,32 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
100
167
|
};
|
|
101
168
|
/**
|
|
102
169
|
* @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
|
|
103
|
-
* @version: 3
|
|
104
170
|
**/
|
|
105
171
|
taggedTransactionQueue: {
|
|
106
172
|
/**
|
|
107
173
|
* Validate the transaction.
|
|
108
174
|
*
|
|
175
|
+
* This method is invoked by the transaction pool to learn details about given transaction.
|
|
176
|
+
* The implementation should make sure to verify the correctness of the transaction
|
|
177
|
+
* against current state. The given `block_hash` corresponds to the hash of the block
|
|
178
|
+
* that is used as current state.
|
|
179
|
+
*
|
|
180
|
+
* Note that this call may be performed by the pool multiple times and transactions
|
|
181
|
+
* might be verified in any possible order.
|
|
182
|
+
*
|
|
109
183
|
* @callname: TaggedTransactionQueue_validate_transaction
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
184
|
+
* @param {SpRuntimeTransactionValidityTransactionSource} source
|
|
185
|
+
* @param {UncheckedExtrinsicLike} tx
|
|
186
|
+
* @param {H256} block_hash
|
|
113
187
|
**/
|
|
114
188
|
validateTransaction: GenericRuntimeApiMethod<
|
|
115
|
-
(
|
|
189
|
+
(
|
|
190
|
+
source: SpRuntimeTransactionValidityTransactionSource,
|
|
191
|
+
tx: UncheckedExtrinsicLike,
|
|
192
|
+
blockHash: H256,
|
|
193
|
+
) => Promise<
|
|
194
|
+
Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
|
|
195
|
+
>
|
|
116
196
|
>;
|
|
117
197
|
|
|
118
198
|
/**
|
|
@@ -122,7 +202,6 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
122
202
|
};
|
|
123
203
|
/**
|
|
124
204
|
* @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
|
|
125
|
-
* @version: 2
|
|
126
205
|
**/
|
|
127
206
|
offchainWorkerApi: {
|
|
128
207
|
/**
|
|
@@ -140,7 +219,6 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
140
219
|
};
|
|
141
220
|
/**
|
|
142
221
|
* @runtimeapi: SessionKeys - 0xab3c0572291feb8b
|
|
143
|
-
* @version: 1
|
|
144
222
|
**/
|
|
145
223
|
sessionKeys: {
|
|
146
224
|
/**
|
|
@@ -153,19 +231,66 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
153
231
|
* Returns the concatenated SCALE encoded public keys.
|
|
154
232
|
*
|
|
155
233
|
* @callname: SessionKeys_generate_session_keys
|
|
156
|
-
* @param {
|
|
234
|
+
* @param {BytesLike | undefined} seed
|
|
157
235
|
**/
|
|
158
|
-
generateSessionKeys: GenericRuntimeApiMethod<(seed?:
|
|
236
|
+
generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
|
|
159
237
|
|
|
160
238
|
/**
|
|
161
|
-
* Decode the given public session
|
|
239
|
+
* Decode the given public session keys.
|
|
162
240
|
*
|
|
163
|
-
* Returns the list of public raw public keys + key
|
|
241
|
+
* Returns the list of public raw public keys + key type.
|
|
164
242
|
*
|
|
165
243
|
* @callname: SessionKeys_decode_session_keys
|
|
166
244
|
* @param {BytesLike} encoded
|
|
167
245
|
**/
|
|
168
|
-
decodeSessionKeys: GenericRuntimeApiMethod<
|
|
246
|
+
decodeSessionKeys: GenericRuntimeApiMethod<
|
|
247
|
+
(encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
|
|
248
|
+
>;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Generic runtime api call
|
|
252
|
+
**/
|
|
253
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* @runtimeapi: AuraApi - 0xdd718d5cc53262d4
|
|
257
|
+
**/
|
|
258
|
+
auraApi: {
|
|
259
|
+
/**
|
|
260
|
+
* Returns the slot duration for Aura.
|
|
261
|
+
*
|
|
262
|
+
* Currently, only the value provided by this type at genesis will be used.
|
|
263
|
+
*
|
|
264
|
+
* @callname: AuraApi_slot_duration
|
|
265
|
+
**/
|
|
266
|
+
slotDuration: GenericRuntimeApiMethod<() => Promise<SpConsensusSlotsSlotDuration>>;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Return the current set of authorities.
|
|
270
|
+
*
|
|
271
|
+
* @callname: AuraApi_authorities
|
|
272
|
+
**/
|
|
273
|
+
authorities: GenericRuntimeApiMethod<() => Promise<Array<SpConsensusAuraSr25519AppSr25519Public>>>;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Generic runtime api call
|
|
277
|
+
**/
|
|
278
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* @runtimeapi: CollectCollationInfo - 0xea93e3f16f3d6962
|
|
282
|
+
**/
|
|
283
|
+
collectCollationInfo: {
|
|
284
|
+
/**
|
|
285
|
+
* Collect information about a collation.
|
|
286
|
+
*
|
|
287
|
+
* The given `header` is the header of the built block for that
|
|
288
|
+
* we are collecting the collation info for.
|
|
289
|
+
*
|
|
290
|
+
* @callname: CollectCollationInfo_collect_collation_info
|
|
291
|
+
* @param {Header} header
|
|
292
|
+
**/
|
|
293
|
+
collectCollationInfo: GenericRuntimeApiMethod<(header: Header) => Promise<CumulusPrimitivesCoreCollationInfo>>;
|
|
169
294
|
|
|
170
295
|
/**
|
|
171
296
|
* Generic runtime api call
|
|
@@ -174,16 +299,15 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
174
299
|
};
|
|
175
300
|
/**
|
|
176
301
|
* @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
|
|
177
|
-
* @version: 1
|
|
178
302
|
**/
|
|
179
303
|
accountNonceApi: {
|
|
180
304
|
/**
|
|
181
|
-
*
|
|
305
|
+
* Get current account nonce of given `AccountId`.
|
|
182
306
|
*
|
|
183
307
|
* @callname: AccountNonceApi_account_nonce
|
|
184
|
-
* @param {AccountId32Like}
|
|
308
|
+
* @param {AccountId32Like} account
|
|
185
309
|
**/
|
|
186
|
-
accountNonce: GenericRuntimeApiMethod<(
|
|
310
|
+
accountNonce: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<number>>;
|
|
187
311
|
|
|
188
312
|
/**
|
|
189
313
|
* Generic runtime api call
|
|
@@ -192,42 +316,41 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
192
316
|
};
|
|
193
317
|
/**
|
|
194
318
|
* @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
|
|
195
|
-
* @version: 4
|
|
196
319
|
**/
|
|
197
320
|
transactionPaymentApi: {
|
|
198
321
|
/**
|
|
199
|
-
* The transaction info
|
|
200
322
|
*
|
|
201
323
|
* @callname: TransactionPaymentApi_query_info
|
|
202
|
-
* @param {
|
|
324
|
+
* @param {UncheckedExtrinsicLike} uxt
|
|
203
325
|
* @param {number} len
|
|
204
326
|
**/
|
|
205
|
-
queryInfo: GenericRuntimeApiMethod<
|
|
327
|
+
queryInfo: GenericRuntimeApiMethod<
|
|
328
|
+
(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
|
|
329
|
+
>;
|
|
206
330
|
|
|
207
331
|
/**
|
|
208
|
-
* The transaction fee details
|
|
209
332
|
*
|
|
210
333
|
* @callname: TransactionPaymentApi_query_fee_details
|
|
211
|
-
* @param {
|
|
334
|
+
* @param {UncheckedExtrinsicLike} uxt
|
|
212
335
|
* @param {number} len
|
|
213
336
|
**/
|
|
214
|
-
queryFeeDetails: GenericRuntimeApiMethod<
|
|
337
|
+
queryFeeDetails: GenericRuntimeApiMethod<
|
|
338
|
+
(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
|
|
339
|
+
>;
|
|
215
340
|
|
|
216
341
|
/**
|
|
217
|
-
* Query the output of the current LengthToFee given some input
|
|
218
342
|
*
|
|
219
|
-
* @callname:
|
|
220
|
-
* @param {
|
|
343
|
+
* @callname: TransactionPaymentApi_query_weight_to_fee
|
|
344
|
+
* @param {SpWeightsWeightV2Weight} weight
|
|
221
345
|
**/
|
|
222
|
-
|
|
346
|
+
queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
|
|
223
347
|
|
|
224
348
|
/**
|
|
225
|
-
* Query the output of the current WeightToFee given some input
|
|
226
349
|
*
|
|
227
|
-
* @callname:
|
|
228
|
-
* @param {
|
|
350
|
+
* @callname: TransactionPaymentApi_query_length_to_fee
|
|
351
|
+
* @param {number} length
|
|
229
352
|
**/
|
|
230
|
-
|
|
353
|
+
queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
|
|
231
354
|
|
|
232
355
|
/**
|
|
233
356
|
* Generic runtime api call
|
|
@@ -236,32 +359,214 @@ export interface RuntimeApis extends GenericRuntimeApis {
|
|
|
236
359
|
};
|
|
237
360
|
/**
|
|
238
361
|
* @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
|
|
239
|
-
* @version: 1
|
|
240
362
|
**/
|
|
241
363
|
genesisBuilder: {
|
|
242
364
|
/**
|
|
243
|
-
*
|
|
365
|
+
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
|
|
366
|
+
* storage.
|
|
367
|
+
*
|
|
368
|
+
* In the case of a FRAME-based runtime, this function deserializes the full
|
|
369
|
+
* `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the
|
|
370
|
+
* provided JSON blob is incorrect or incomplete or the deserialization fails, an error
|
|
371
|
+
* is returned.
|
|
244
372
|
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
373
|
+
* Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
|
|
374
|
+
* defaults will be used.
|
|
247
375
|
*
|
|
248
|
-
* @callname:
|
|
376
|
+
* @callname: GenesisBuilder_build_state
|
|
377
|
+
* @param {BytesLike} json
|
|
249
378
|
**/
|
|
250
|
-
|
|
379
|
+
buildState: GenericRuntimeApiMethod<(json: BytesLike) => Promise<Result<[], string>>>;
|
|
251
380
|
|
|
252
381
|
/**
|
|
253
|
-
*
|
|
382
|
+
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
|
|
383
|
+
* `id`.
|
|
254
384
|
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
385
|
+
* If `id` is `None` the function should return JSON blob representation of the default
|
|
386
|
+
* `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
|
|
387
|
+
* `RuntimeGenesisConfig`.
|
|
258
388
|
*
|
|
259
|
-
*
|
|
389
|
+
* Otherwise function returns a JSON representation of the built-in, named
|
|
390
|
+
* `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
|
|
391
|
+
* exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
|
|
392
|
+
* (potentially nested) key-value pairs that are intended for customizing the default
|
|
393
|
+
* runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
|
|
394
|
+
* of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
|
|
395
|
+
* be used in `build_state` method.
|
|
260
396
|
*
|
|
261
|
-
* @callname:
|
|
262
|
-
* @param {
|
|
397
|
+
* @callname: GenesisBuilder_get_preset
|
|
398
|
+
* @param {string | undefined} id
|
|
399
|
+
**/
|
|
400
|
+
getPreset: GenericRuntimeApiMethod<(id?: string | undefined) => Promise<Bytes | undefined>>;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
|
|
404
|
+
*
|
|
405
|
+
* The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
|
|
406
|
+
* no named presets are provided by the runtime the list is empty.
|
|
407
|
+
*
|
|
408
|
+
* @callname: GenesisBuilder_preset_names
|
|
409
|
+
**/
|
|
410
|
+
presetNames: GenericRuntimeApiMethod<() => Promise<Array<string>>>;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Generic runtime api call
|
|
414
|
+
**/
|
|
415
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
|
|
419
|
+
**/
|
|
420
|
+
xcmPaymentApi: {
|
|
421
|
+
/**
|
|
422
|
+
* Returns a list of acceptable payment assets.
|
|
423
|
+
*
|
|
424
|
+
* # Arguments
|
|
425
|
+
*
|
|
426
|
+
* * `xcm_version`: Version.
|
|
427
|
+
*
|
|
428
|
+
* @callname: XcmPaymentApi_query_acceptable_payment_assets
|
|
429
|
+
* @param {number} xcm_version
|
|
430
|
+
**/
|
|
431
|
+
queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
|
|
432
|
+
(xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
|
|
433
|
+
>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Returns a weight needed to execute a XCM.
|
|
437
|
+
*
|
|
438
|
+
* # Arguments
|
|
439
|
+
*
|
|
440
|
+
* * `message`: `VersionedXcm`.
|
|
441
|
+
*
|
|
442
|
+
* @callname: XcmPaymentApi_query_xcm_weight
|
|
443
|
+
* @param {XcmVersionedXcm} message
|
|
444
|
+
**/
|
|
445
|
+
queryXcmWeight: GenericRuntimeApiMethod<
|
|
446
|
+
(message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
|
|
447
|
+
>;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Converts a weight into a fee for the specified `AssetId`.
|
|
451
|
+
*
|
|
452
|
+
* # Arguments
|
|
453
|
+
*
|
|
454
|
+
* * `weight`: convertible `Weight`.
|
|
455
|
+
* * `asset`: `VersionedAssetId`.
|
|
456
|
+
*
|
|
457
|
+
* @callname: XcmPaymentApi_query_weight_to_asset_fee
|
|
458
|
+
* @param {SpWeightsWeightV2Weight} weight
|
|
459
|
+
* @param {XcmVersionedAssetId} asset
|
|
460
|
+
**/
|
|
461
|
+
queryWeightToAssetFee: GenericRuntimeApiMethod<
|
|
462
|
+
(weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
|
|
463
|
+
>;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Get delivery fees for sending a specific `message` to a `destination`.
|
|
467
|
+
* These always come in a specific asset, defined by the chain.
|
|
468
|
+
*
|
|
469
|
+
* # Arguments
|
|
470
|
+
* * `message`: The message that'll be sent, necessary because most delivery fees are based on the
|
|
471
|
+
* size of the message.
|
|
472
|
+
* * `destination`: The destination to send the message to. Different destinations may use
|
|
473
|
+
* different senders that charge different fees.
|
|
474
|
+
*
|
|
475
|
+
* @callname: XcmPaymentApi_query_delivery_fees
|
|
476
|
+
* @param {XcmVersionedLocation} destination
|
|
477
|
+
* @param {XcmVersionedXcm} message
|
|
478
|
+
**/
|
|
479
|
+
queryDeliveryFees: GenericRuntimeApiMethod<
|
|
480
|
+
(
|
|
481
|
+
destination: XcmVersionedLocation,
|
|
482
|
+
message: XcmVersionedXcm,
|
|
483
|
+
) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
|
|
484
|
+
>;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Generic runtime api call
|
|
488
|
+
**/
|
|
489
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
|
|
493
|
+
**/
|
|
494
|
+
dryRunApi: {
|
|
495
|
+
/**
|
|
496
|
+
* Dry run call V2.
|
|
497
|
+
*
|
|
498
|
+
* @callname: DryRunApi_dry_run_call
|
|
499
|
+
* @param {BasiliskRuntimeOriginCaller} origin
|
|
500
|
+
* @param {BasiliskRuntimeRuntimeCallLike} call
|
|
501
|
+
* @param {number} result_xcms_version
|
|
502
|
+
**/
|
|
503
|
+
dryRunCall: GenericRuntimeApiMethod<
|
|
504
|
+
(
|
|
505
|
+
origin: BasiliskRuntimeOriginCaller,
|
|
506
|
+
call: BasiliskRuntimeRuntimeCallLike,
|
|
507
|
+
resultXcmsVersion: number,
|
|
508
|
+
) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
|
|
509
|
+
>;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Dry run XCM program
|
|
513
|
+
*
|
|
514
|
+
* @callname: DryRunApi_dry_run_xcm
|
|
515
|
+
* @param {XcmVersionedLocation} origin_location
|
|
516
|
+
* @param {XcmVersionedXcm} xcm
|
|
517
|
+
**/
|
|
518
|
+
dryRunXcm: GenericRuntimeApiMethod<
|
|
519
|
+
(
|
|
520
|
+
originLocation: XcmVersionedLocation,
|
|
521
|
+
xcm: XcmVersionedXcm,
|
|
522
|
+
) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
|
|
523
|
+
>;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Generic runtime api call
|
|
527
|
+
**/
|
|
528
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
|
|
532
|
+
**/
|
|
533
|
+
locationToAccountApi: {
|
|
534
|
+
/**
|
|
535
|
+
* Converts `Location` to `AccountId`.
|
|
536
|
+
*
|
|
537
|
+
* @callname: LocationToAccountApi_convert_location
|
|
538
|
+
* @param {XcmVersionedLocation} location
|
|
539
|
+
**/
|
|
540
|
+
convertLocation: GenericRuntimeApiMethod<
|
|
541
|
+
(location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
|
|
542
|
+
>;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Generic runtime api call
|
|
546
|
+
**/
|
|
547
|
+
[method: string]: GenericRuntimeApiMethod;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
|
|
551
|
+
**/
|
|
552
|
+
auraUnincludedSegmentApi: {
|
|
553
|
+
/**
|
|
554
|
+
* Whether it is legal to extend the chain, assuming the given block is the most
|
|
555
|
+
* recently included one as-of the relay parent that will be built against, and
|
|
556
|
+
* the given relay chain slot.
|
|
557
|
+
*
|
|
558
|
+
* This should be consistent with the logic the runtime uses when validating blocks to
|
|
559
|
+
* avoid issues.
|
|
560
|
+
*
|
|
561
|
+
* When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block
|
|
562
|
+
* whose state we are querying against, this must always return `true` as long as the slot
|
|
563
|
+
* is more recent than the included block itself.
|
|
564
|
+
*
|
|
565
|
+
* @callname: AuraUnincludedSegmentApi_can_build_upon
|
|
566
|
+
* @param {H256} included_hash
|
|
567
|
+
* @param {SpConsensusSlotsSlot} slot
|
|
263
568
|
**/
|
|
264
|
-
|
|
569
|
+
canBuildUpon: GenericRuntimeApiMethod<(includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
|
|
265
570
|
|
|
266
571
|
/**
|
|
267
572
|
* Generic runtime api call
|