@dedot/chaintypes 0.13.0 → 0.14.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/moonbeam/consts.d.ts +29 -4
- package/moonbeam/errors.d.ts +16 -11
- package/moonbeam/events.d.ts +47 -2
- package/moonbeam/index.d.ts +1 -1
- package/moonbeam/query.d.ts +38 -14
- package/moonbeam/runtime.d.ts +125 -15
- package/moonbeam/tx.d.ts +2233 -253
- package/moonbeam/types.d.ts +4110 -583
- package/package.json +2 -2
package/moonbeam/consts.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
FrameSystemLimitsBlockWeights,
|
|
7
7
|
FrameSystemLimitsBlockLength,
|
|
8
8
|
SpWeightsRuntimeDbWeight,
|
|
9
|
+
PolkadotParachainPrimitivesPrimitivesId,
|
|
9
10
|
SpWeightsWeightV2Weight,
|
|
10
11
|
PalletReferendaTrackInfo,
|
|
11
12
|
FrameSupportPalletId,
|
|
@@ -38,7 +39,7 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
38
39
|
dbWeight: SpWeightsRuntimeDbWeight;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
|
-
* Get the chain's
|
|
42
|
+
* Get the chain's in-code version.
|
|
42
43
|
**/
|
|
43
44
|
version: RuntimeVersion;
|
|
44
45
|
|
|
@@ -60,6 +61,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
60
61
|
* Pallet `ParachainSystem`'s constants
|
|
61
62
|
**/
|
|
62
63
|
parachainSystem: {
|
|
64
|
+
/**
|
|
65
|
+
* Returns the parachain ID we are running with.
|
|
66
|
+
**/
|
|
67
|
+
selfParaId: PolkadotParachainPrimitivesPrimitivesId;
|
|
68
|
+
|
|
63
69
|
/**
|
|
64
70
|
* Generic pallet constant
|
|
65
71
|
**/
|
|
@@ -121,11 +127,15 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
121
127
|
/**
|
|
122
128
|
* The maximum number of locks that should exist on an account.
|
|
123
129
|
* Not strictly enforced, but used for weight estimation.
|
|
130
|
+
*
|
|
131
|
+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
124
132
|
**/
|
|
125
133
|
maxLocks: number;
|
|
126
134
|
|
|
127
135
|
/**
|
|
128
136
|
* The maximum number of named reserves that can exist on an account.
|
|
137
|
+
*
|
|
138
|
+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
129
139
|
**/
|
|
130
140
|
maxReserves: number;
|
|
131
141
|
|
|
@@ -438,7 +448,7 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
438
448
|
maxSubAccounts: number;
|
|
439
449
|
|
|
440
450
|
/**
|
|
441
|
-
*
|
|
451
|
+
* Maximum number of registrars allowed in the system. Needed to bound the complexity
|
|
442
452
|
* of, e.g., updating judgements.
|
|
443
453
|
**/
|
|
444
454
|
maxRegistrars: number;
|
|
@@ -877,6 +887,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
877
887
|
**/
|
|
878
888
|
baseXcmWeight: SpWeightsWeightV2Weight;
|
|
879
889
|
|
|
890
|
+
/**
|
|
891
|
+
* The id of the RateLimiter.
|
|
892
|
+
**/
|
|
893
|
+
rateLimiterId: [];
|
|
894
|
+
|
|
880
895
|
/**
|
|
881
896
|
* Generic pallet constant
|
|
882
897
|
**/
|
|
@@ -943,13 +958,23 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
943
958
|
|
|
944
959
|
/**
|
|
945
960
|
* The amount of weight (if any) which should be provided to the message queue for
|
|
946
|
-
* servicing enqueued items
|
|
961
|
+
* servicing enqueued items `on_initialize`.
|
|
947
962
|
*
|
|
948
963
|
* This may be legitimately `None` in the case that you will call
|
|
949
|
-
* `ServiceQueues::service_queues` manually
|
|
964
|
+
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
|
|
965
|
+
* it run in `on_idle`.
|
|
950
966
|
**/
|
|
951
967
|
serviceWeight: SpWeightsWeightV2Weight | undefined;
|
|
952
968
|
|
|
969
|
+
/**
|
|
970
|
+
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
|
|
971
|
+
* should be provided to the message queue for servicing enqueued items `on_idle`.
|
|
972
|
+
* Useful for parachains to process messages at the same block they are received.
|
|
973
|
+
*
|
|
974
|
+
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
|
|
975
|
+
**/
|
|
976
|
+
idleMaxServiceWeight: SpWeightsWeightV2Weight | undefined;
|
|
977
|
+
|
|
953
978
|
/**
|
|
954
979
|
* Generic pallet constant
|
|
955
980
|
**/
|
package/moonbeam/errors.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
41
41
|
**/
|
|
42
42
|
CallFiltered: GenericPalletError<Rv>;
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* A multi-block migration is ongoing and prevents the current code from being replaced.
|
|
46
|
+
**/
|
|
47
|
+
MultiBlockMigrationsOngoing: GenericPalletError<Rv>;
|
|
48
|
+
|
|
44
49
|
/**
|
|
45
50
|
* No upgrade authorized.
|
|
46
51
|
**/
|
|
@@ -785,11 +790,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
785
790
|
**/
|
|
786
791
|
TransactionMustComeFromEOA: GenericPalletError<Rv>;
|
|
787
792
|
|
|
788
|
-
/**
|
|
789
|
-
* Invalid Transaction
|
|
790
|
-
**/
|
|
791
|
-
InvalidTransaction: GenericPalletError<Rv>;
|
|
792
|
-
|
|
793
793
|
/**
|
|
794
794
|
* Undefined error.
|
|
795
795
|
**/
|
|
@@ -933,7 +933,7 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
933
933
|
|
|
934
934
|
/**
|
|
935
935
|
* The account currently has votes attached to it and the operation cannot succeed until
|
|
936
|
-
* these are removed
|
|
936
|
+
* these are removed through `remove_vote`.
|
|
937
937
|
**/
|
|
938
938
|
AlreadyVoting: GenericPalletError<Rv>;
|
|
939
939
|
|
|
@@ -1041,6 +1041,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1041
1041
|
**/
|
|
1042
1042
|
PreimageNotExist: GenericPalletError<Rv>;
|
|
1043
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* The preimage is stored with a different length than the one provided.
|
|
1046
|
+
**/
|
|
1047
|
+
PreimageStoredWithDifferentLength: GenericPalletError<Rv>;
|
|
1048
|
+
|
|
1044
1049
|
/**
|
|
1045
1050
|
* Generic pallet error
|
|
1046
1051
|
**/
|
|
@@ -1498,11 +1503,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1498
1503
|
**/
|
|
1499
1504
|
InUse: GenericPalletError<Rv>;
|
|
1500
1505
|
|
|
1501
|
-
/**
|
|
1502
|
-
* Invalid non-concrete asset.
|
|
1503
|
-
**/
|
|
1504
|
-
InvalidAssetNotConcrete: GenericPalletError<Rv>;
|
|
1505
|
-
|
|
1506
1506
|
/**
|
|
1507
1507
|
* Invalid asset, reserve chain could not be determined for it.
|
|
1508
1508
|
**/
|
|
@@ -1760,6 +1760,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1760
1760
|
**/
|
|
1761
1761
|
MinXcmFeeNotDefined: GenericPalletError<Rv>;
|
|
1762
1762
|
|
|
1763
|
+
/**
|
|
1764
|
+
* Asset transfer is limited by RateLimiter.
|
|
1765
|
+
**/
|
|
1766
|
+
RateLimited: GenericPalletError<Rv>;
|
|
1767
|
+
|
|
1763
1768
|
/**
|
|
1764
1769
|
* Generic pallet error
|
|
1765
1770
|
**/
|
package/moonbeam/events.d.ts
CHANGED
|
@@ -1252,6 +1252,26 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
1252
1252
|
{ task: [number, number]; id?: FixedBytes<32> | undefined; result: Result<[], DispatchError> }
|
|
1253
1253
|
>;
|
|
1254
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* Set a retry configuration for some task.
|
|
1257
|
+
**/
|
|
1258
|
+
RetrySet: GenericPalletEvent<
|
|
1259
|
+
Rv,
|
|
1260
|
+
'Scheduler',
|
|
1261
|
+
'RetrySet',
|
|
1262
|
+
{ task: [number, number]; id?: FixedBytes<32> | undefined; period: number; retries: number }
|
|
1263
|
+
>;
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Cancel a retry configuration for some task.
|
|
1267
|
+
**/
|
|
1268
|
+
RetryCancelled: GenericPalletEvent<
|
|
1269
|
+
Rv,
|
|
1270
|
+
'Scheduler',
|
|
1271
|
+
'RetryCancelled',
|
|
1272
|
+
{ task: [number, number]; id?: FixedBytes<32> | undefined }
|
|
1273
|
+
>;
|
|
1274
|
+
|
|
1255
1275
|
/**
|
|
1256
1276
|
* The call for the provided hash was not found so the task has been aborted.
|
|
1257
1277
|
**/
|
|
@@ -1272,6 +1292,17 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
1272
1292
|
{ task: [number, number]; id?: FixedBytes<32> | undefined }
|
|
1273
1293
|
>;
|
|
1274
1294
|
|
|
1295
|
+
/**
|
|
1296
|
+
* The given task was unable to be retried since the agenda is full at that block or there
|
|
1297
|
+
* was not enough weight to reschedule it.
|
|
1298
|
+
**/
|
|
1299
|
+
RetryFailed: GenericPalletEvent<
|
|
1300
|
+
Rv,
|
|
1301
|
+
'Scheduler',
|
|
1302
|
+
'RetryFailed',
|
|
1303
|
+
{ task: [number, number]; id?: FixedBytes<32> | undefined }
|
|
1304
|
+
>;
|
|
1305
|
+
|
|
1275
1306
|
/**
|
|
1276
1307
|
* The given task can never be executed since it is overweight.
|
|
1277
1308
|
**/
|
|
@@ -2589,10 +2620,10 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2589
2620
|
/**
|
|
2590
2621
|
* Changed the xcm type mapping for a given asset id
|
|
2591
2622
|
**/
|
|
2592
|
-
|
|
2623
|
+
ForeignAssetXcmLocationChanged: GenericPalletEvent<
|
|
2593
2624
|
Rv,
|
|
2594
2625
|
'AssetManager',
|
|
2595
|
-
'
|
|
2626
|
+
'ForeignAssetXcmLocationChanged',
|
|
2596
2627
|
{ assetId: bigint; newAssetType: MoonbeamRuntimeXcmConfigAssetType }
|
|
2597
2628
|
>;
|
|
2598
2629
|
|
|
@@ -2760,6 +2791,20 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2760
2791
|
**/
|
|
2761
2792
|
[prop: string]: GenericPalletEvent<Rv>;
|
|
2762
2793
|
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Pallet `EthereumXcm`'s events
|
|
2796
|
+
**/
|
|
2797
|
+
ethereumXcm: {
|
|
2798
|
+
/**
|
|
2799
|
+
* Ethereum transaction executed from XCM
|
|
2800
|
+
**/
|
|
2801
|
+
ExecutedFromXcm: GenericPalletEvent<Rv, 'EthereumXcm', 'ExecutedFromXcm', { xcmMsgHash: H256; ethTxHash: H256 }>;
|
|
2802
|
+
|
|
2803
|
+
/**
|
|
2804
|
+
* Generic pallet event
|
|
2805
|
+
**/
|
|
2806
|
+
[prop: string]: GenericPalletEvent<Rv>;
|
|
2807
|
+
};
|
|
2763
2808
|
/**
|
|
2764
2809
|
* Pallet `MessageQueue`'s events
|
|
2765
2810
|
**/
|
package/moonbeam/index.d.ts
CHANGED
package/moonbeam/query.d.ts
CHANGED
|
@@ -25,12 +25,12 @@ import type {
|
|
|
25
25
|
FrameSystemCodeUpgradeAuthorization,
|
|
26
26
|
CumulusPalletParachainSystemUnincludedSegmentAncestor,
|
|
27
27
|
CumulusPalletParachainSystemUnincludedSegmentSegmentTracker,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
PolkadotPrimitivesV7PersistedValidationData,
|
|
29
|
+
PolkadotPrimitivesV7UpgradeRestriction,
|
|
30
|
+
PolkadotPrimitivesV7UpgradeGoAhead,
|
|
31
31
|
SpTrieStorageProof,
|
|
32
32
|
CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot,
|
|
33
|
-
|
|
33
|
+
PolkadotPrimitivesV7AbridgedHostConfiguration,
|
|
34
34
|
CumulusPrimitivesParachainInherentMessageQueueChain,
|
|
35
35
|
PolkadotParachainPrimitivesPrimitivesId,
|
|
36
36
|
PolkadotCorePrimitivesOutboundHrmpMessage,
|
|
@@ -69,6 +69,7 @@ import type {
|
|
|
69
69
|
EthereumReceiptReceiptV3,
|
|
70
70
|
EthereumBlock,
|
|
71
71
|
PalletSchedulerScheduled,
|
|
72
|
+
PalletSchedulerRetryConfig,
|
|
72
73
|
PalletPreimageOldRequestStatus,
|
|
73
74
|
PalletPreimageRequestStatus,
|
|
74
75
|
PalletConvictionVotingVoteVoting,
|
|
@@ -122,6 +123,13 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
122
123
|
**/
|
|
123
124
|
extrinsicCount: GenericStorageQuery<Rv, () => number | undefined>;
|
|
124
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Whether all inherents have been applied.
|
|
128
|
+
*
|
|
129
|
+
* @param {Callback<boolean> =} callback
|
|
130
|
+
**/
|
|
131
|
+
inherentsApplied: GenericStorageQuery<Rv, () => boolean>;
|
|
132
|
+
|
|
125
133
|
/**
|
|
126
134
|
* The current weight for the block.
|
|
127
135
|
*
|
|
@@ -307,9 +315,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
307
315
|
* This value is expected to be set only once per block and it's never stored
|
|
308
316
|
* in the trie.
|
|
309
317
|
*
|
|
310
|
-
* @param {Callback<
|
|
318
|
+
* @param {Callback<PolkadotPrimitivesV7PersistedValidationData | undefined> =} callback
|
|
311
319
|
**/
|
|
312
|
-
validationData: GenericStorageQuery<Rv, () =>
|
|
320
|
+
validationData: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7PersistedValidationData | undefined>;
|
|
313
321
|
|
|
314
322
|
/**
|
|
315
323
|
* Were the validation data set to notify the relay chain?
|
|
@@ -336,9 +344,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
336
344
|
* relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
|
|
337
345
|
* set after the inherent.
|
|
338
346
|
*
|
|
339
|
-
* @param {Callback<
|
|
347
|
+
* @param {Callback<PolkadotPrimitivesV7UpgradeRestriction | undefined> =} callback
|
|
340
348
|
**/
|
|
341
|
-
upgradeRestrictionSignal: GenericStorageQuery<Rv, () =>
|
|
349
|
+
upgradeRestrictionSignal: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeRestriction | undefined>;
|
|
342
350
|
|
|
343
351
|
/**
|
|
344
352
|
* Optional upgrade go-ahead signal from the relay-chain.
|
|
@@ -347,9 +355,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
347
355
|
* relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
|
|
348
356
|
* set after the inherent.
|
|
349
357
|
*
|
|
350
|
-
* @param {Callback<
|
|
358
|
+
* @param {Callback<PolkadotPrimitivesV7UpgradeGoAhead | undefined> =} callback
|
|
351
359
|
**/
|
|
352
|
-
upgradeGoAhead: GenericStorageQuery<Rv, () =>
|
|
360
|
+
upgradeGoAhead: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeGoAhead | undefined>;
|
|
353
361
|
|
|
354
362
|
/**
|
|
355
363
|
* The state proof for the last relay parent block.
|
|
@@ -387,9 +395,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
387
395
|
*
|
|
388
396
|
* This data is also absent from the genesis.
|
|
389
397
|
*
|
|
390
|
-
* @param {Callback<
|
|
398
|
+
* @param {Callback<PolkadotPrimitivesV7AbridgedHostConfiguration | undefined> =} callback
|
|
391
399
|
**/
|
|
392
|
-
hostConfiguration: GenericStorageQuery<Rv, () =>
|
|
400
|
+
hostConfiguration: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7AbridgedHostConfiguration | undefined>;
|
|
393
401
|
|
|
394
402
|
/**
|
|
395
403
|
* The last downward message queue chain head we have observed.
|
|
@@ -605,6 +613,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
605
613
|
* Any liquidity locks on some account balances.
|
|
606
614
|
* NOTE: Should only be accessed when setting, changing and freeing a lock.
|
|
607
615
|
*
|
|
616
|
+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
617
|
+
*
|
|
608
618
|
* @param {AccountId20Like} arg
|
|
609
619
|
* @param {Callback<Array<PalletBalancesBalanceLock>> =} callback
|
|
610
620
|
**/
|
|
@@ -613,6 +623,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
613
623
|
/**
|
|
614
624
|
* Named reserves on some account balances.
|
|
615
625
|
*
|
|
626
|
+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
|
627
|
+
*
|
|
616
628
|
* @param {AccountId20Like} arg
|
|
617
629
|
* @param {Callback<Array<PalletBalancesReserveData>> =} callback
|
|
618
630
|
**/
|
|
@@ -1350,6 +1362,18 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1350
1362
|
**/
|
|
1351
1363
|
agenda: GenericStorageQuery<Rv, (arg: number) => Array<PalletSchedulerScheduled | undefined>, number>;
|
|
1352
1364
|
|
|
1365
|
+
/**
|
|
1366
|
+
* Retry configurations for items to be executed, indexed by task address.
|
|
1367
|
+
*
|
|
1368
|
+
* @param {[number, number]} arg
|
|
1369
|
+
* @param {Callback<PalletSchedulerRetryConfig | undefined> =} callback
|
|
1370
|
+
**/
|
|
1371
|
+
retries: GenericStorageQuery<
|
|
1372
|
+
Rv,
|
|
1373
|
+
(arg: [number, number]) => PalletSchedulerRetryConfig | undefined,
|
|
1374
|
+
[number, number]
|
|
1375
|
+
>;
|
|
1376
|
+
|
|
1353
1377
|
/**
|
|
1354
1378
|
* Lookup from a name to the block number and index of the task.
|
|
1355
1379
|
*
|
|
@@ -1544,7 +1568,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1544
1568
|
members: GenericStorageQuery<Rv, () => Array<AccountId20>>;
|
|
1545
1569
|
|
|
1546
1570
|
/**
|
|
1547
|
-
* The prime member that helps determine the default vote behavior in case of
|
|
1571
|
+
* The prime member that helps determine the default vote behavior in case of abstentions.
|
|
1548
1572
|
*
|
|
1549
1573
|
* @param {Callback<AccountId20 | undefined> =} callback
|
|
1550
1574
|
**/
|
|
@@ -1597,7 +1621,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1597
1621
|
members: GenericStorageQuery<Rv, () => Array<AccountId20>>;
|
|
1598
1622
|
|
|
1599
1623
|
/**
|
|
1600
|
-
* The prime member that helps determine the default vote behavior in case of
|
|
1624
|
+
* The prime member that helps determine the default vote behavior in case of abstentions.
|
|
1601
1625
|
*
|
|
1602
1626
|
* @param {Callback<AccountId20 | undefined> =} callback
|
|
1603
1627
|
**/
|
package/moonbeam/runtime.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
FpSelfContainedUncheckedExtrinsic,
|
|
22
22
|
SpConsensusSlotsSlot,
|
|
23
23
|
SpRuntimeBlock,
|
|
24
|
+
SpRuntimeExtrinsicInclusionMode,
|
|
24
25
|
SpCoreOpaqueMetadata,
|
|
25
26
|
SpInherentsInherentData,
|
|
26
27
|
SpInherentsCheckInherentsResult,
|
|
@@ -39,6 +40,11 @@ import type {
|
|
|
39
40
|
NimbusPrimitivesNimbusCryptoPublic,
|
|
40
41
|
CumulusPrimitivesCoreCollationInfo,
|
|
41
42
|
SessionKeysPrimitivesVrfVrfCryptoPublic,
|
|
43
|
+
XcmVersionedAssetId,
|
|
44
|
+
XcmFeePaymentRuntimeApiError,
|
|
45
|
+
XcmVersionedXcm,
|
|
46
|
+
XcmVersionedAssets,
|
|
47
|
+
XcmVersionedLocation,
|
|
42
48
|
} from './types';
|
|
43
49
|
|
|
44
50
|
export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
|
|
@@ -125,12 +131,12 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
125
131
|
executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
|
|
126
132
|
|
|
127
133
|
/**
|
|
128
|
-
* Initialize a block with the given header.
|
|
134
|
+
* Initialize a block with the given header and return the runtime executive mode.
|
|
129
135
|
*
|
|
130
136
|
* @callname: Core_initialize_block
|
|
131
137
|
* @param {Header} header
|
|
132
138
|
**/
|
|
133
|
-
initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<
|
|
139
|
+
initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
|
|
134
140
|
|
|
135
141
|
/**
|
|
136
142
|
* Generic runtime api call
|
|
@@ -286,28 +292,51 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
286
292
|
**/
|
|
287
293
|
genesisBuilder: {
|
|
288
294
|
/**
|
|
289
|
-
*
|
|
295
|
+
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
|
|
296
|
+
* storage.
|
|
290
297
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
298
|
+
* In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
|
|
299
|
+
* puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
|
|
300
|
+
* deserialization fails, an error is returned.
|
|
293
301
|
*
|
|
294
|
-
*
|
|
302
|
+
* Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
|
|
303
|
+
* defaults will be used.
|
|
304
|
+
*
|
|
305
|
+
* @callname: GenesisBuilder_build_state
|
|
306
|
+
* @param {BytesLike} json
|
|
295
307
|
**/
|
|
296
|
-
|
|
308
|
+
buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
|
|
297
309
|
|
|
298
310
|
/**
|
|
299
|
-
*
|
|
311
|
+
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
|
|
312
|
+
* `id`.
|
|
300
313
|
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
314
|
+
* If `id` is `None` the function returns JSON blob representation of the default
|
|
315
|
+
* `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
|
|
316
|
+
* `RuntimeGenesisConfig`.
|
|
304
317
|
*
|
|
305
|
-
*
|
|
318
|
+
* Otherwise function returns a JSON representation of the built-in, named
|
|
319
|
+
* `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
|
|
320
|
+
* exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
|
|
321
|
+
* (potentially nested) key-value pairs that are intended for customizing the default
|
|
322
|
+
* runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
|
|
323
|
+
* of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
|
|
324
|
+
* be used in `build_state` method.
|
|
306
325
|
*
|
|
307
|
-
* @callname:
|
|
308
|
-
* @param {
|
|
326
|
+
* @callname: GenesisBuilder_get_preset
|
|
327
|
+
* @param {string | undefined} id
|
|
309
328
|
**/
|
|
310
|
-
|
|
329
|
+
getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
|
|
333
|
+
*
|
|
334
|
+
* The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
|
|
335
|
+
* no named presets are provided by the runtime the list is empty.
|
|
336
|
+
*
|
|
337
|
+
* @callname: GenesisBuilder_preset_names
|
|
338
|
+
**/
|
|
339
|
+
presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
|
|
311
340
|
|
|
312
341
|
/**
|
|
313
342
|
* Generic runtime api call
|
|
@@ -746,6 +775,87 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
746
775
|
(nimbusId: NimbusPrimitivesNimbusCryptoPublic) => Promise<SessionKeysPrimitivesVrfVrfCryptoPublic | undefined>
|
|
747
776
|
>;
|
|
748
777
|
|
|
778
|
+
/**
|
|
779
|
+
* Generic runtime api call
|
|
780
|
+
**/
|
|
781
|
+
[method: string]: GenericRuntimeApiMethod<Rv>;
|
|
782
|
+
};
|
|
783
|
+
/**
|
|
784
|
+
* @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
|
|
785
|
+
**/
|
|
786
|
+
xcmPaymentApi: {
|
|
787
|
+
/**
|
|
788
|
+
* Returns a list of acceptable payment assets.
|
|
789
|
+
*
|
|
790
|
+
* # Arguments
|
|
791
|
+
*
|
|
792
|
+
* * `xcm_version`: Version.
|
|
793
|
+
*
|
|
794
|
+
* @callname: XcmPaymentApi_query_acceptable_payment_assets
|
|
795
|
+
* @param {number} xcm_version
|
|
796
|
+
**/
|
|
797
|
+
queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
|
|
798
|
+
Rv,
|
|
799
|
+
(xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmFeePaymentRuntimeApiError>>
|
|
800
|
+
>;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Returns a weight needed to execute a XCM.
|
|
804
|
+
*
|
|
805
|
+
* # Arguments
|
|
806
|
+
*
|
|
807
|
+
* * `message`: `VersionedXcm`.
|
|
808
|
+
*
|
|
809
|
+
* @callname: XcmPaymentApi_query_xcm_weight
|
|
810
|
+
* @param {XcmVersionedXcm} message
|
|
811
|
+
**/
|
|
812
|
+
queryXcmWeight: GenericRuntimeApiMethod<
|
|
813
|
+
Rv,
|
|
814
|
+
(message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmFeePaymentRuntimeApiError>>
|
|
815
|
+
>;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Converts a weight into a fee for the specified `AssetId`.
|
|
819
|
+
*
|
|
820
|
+
* # Arguments
|
|
821
|
+
*
|
|
822
|
+
* * `weight`: convertible `Weight`.
|
|
823
|
+
* * `asset`: `VersionedAssetId`.
|
|
824
|
+
*
|
|
825
|
+
* @callname: XcmPaymentApi_query_weight_to_asset_fee
|
|
826
|
+
* @param {SpWeightsWeightV2Weight} weight
|
|
827
|
+
* @param {XcmVersionedAssetId} asset
|
|
828
|
+
**/
|
|
829
|
+
queryWeightToAssetFee: GenericRuntimeApiMethod<
|
|
830
|
+
Rv,
|
|
831
|
+
(
|
|
832
|
+
weight: SpWeightsWeightV2Weight,
|
|
833
|
+
asset: XcmVersionedAssetId,
|
|
834
|
+
) => Promise<Result<bigint, XcmFeePaymentRuntimeApiError>>
|
|
835
|
+
>;
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Get delivery fees for sending a specific `message` to a `destination`.
|
|
839
|
+
* These always come in a specific asset, defined by the chain.
|
|
840
|
+
*
|
|
841
|
+
* # Arguments
|
|
842
|
+
* * `message`: The message that'll be sent, necessary because most delivery fees are based on the
|
|
843
|
+
* size of the message.
|
|
844
|
+
* * `destination`: The destination to send the message to. Different destinations may use
|
|
845
|
+
* different senders that charge different fees.
|
|
846
|
+
*
|
|
847
|
+
* @callname: XcmPaymentApi_query_delivery_fees
|
|
848
|
+
* @param {XcmVersionedLocation} destination
|
|
849
|
+
* @param {XcmVersionedXcm} message
|
|
850
|
+
**/
|
|
851
|
+
queryDeliveryFees: GenericRuntimeApiMethod<
|
|
852
|
+
Rv,
|
|
853
|
+
(
|
|
854
|
+
destination: XcmVersionedLocation,
|
|
855
|
+
message: XcmVersionedXcm,
|
|
856
|
+
) => Promise<Result<XcmVersionedAssets, XcmFeePaymentRuntimeApiError>>
|
|
857
|
+
>;
|
|
858
|
+
|
|
749
859
|
/**
|
|
750
860
|
* Generic runtime api call
|
|
751
861
|
**/
|