@dedot/chaintypes 0.102.0 → 0.104.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/astar/query.d.ts CHANGED
@@ -24,6 +24,8 @@ import type {
24
24
  PalletIdentityRegistration,
25
25
  PalletIdentityRegistrarInfo,
26
26
  PalletIdentityAuthorityProperties,
27
+ PalletIdentityUsernameInformation,
28
+ PalletIdentityProvider,
27
29
  PalletMultisigMultisig,
28
30
  PalletProxyProxyDefinition,
29
31
  PalletProxyAnnouncement,
@@ -31,12 +33,12 @@ import type {
31
33
  PalletSchedulerRetryConfig,
32
34
  CumulusPalletParachainSystemUnincludedSegmentAncestor,
33
35
  CumulusPalletParachainSystemUnincludedSegmentSegmentTracker,
34
- PolkadotPrimitivesV7PersistedValidationData,
35
- PolkadotPrimitivesV7UpgradeRestriction,
36
- PolkadotPrimitivesV7UpgradeGoAhead,
36
+ PolkadotPrimitivesV8PersistedValidationData,
37
+ PolkadotPrimitivesV8UpgradeRestriction,
38
+ PolkadotPrimitivesV8UpgradeGoAhead,
37
39
  SpTrieStorageProof,
38
40
  CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot,
39
- PolkadotPrimitivesV7AbridgedHostConfiguration,
41
+ PolkadotPrimitivesV8AbridgedHostConfiguration,
40
42
  CumulusPrimitivesParachainInherentMessageQueueChain,
41
43
  PolkadotParachainPrimitivesPrimitivesId,
42
44
  PolkadotCorePrimitivesOutboundHrmpMessage,
@@ -85,7 +87,7 @@ import type {
85
87
  PalletXcmVersionMigrationStage,
86
88
  PalletXcmRemoteLockedFungibleRecord,
87
89
  XcmVersionedAssetId,
88
- StagingXcmV4Xcm,
90
+ StagingXcmV5Xcm,
89
91
  PalletMessageQueueBookState,
90
92
  CumulusPrimitivesCoreAggregateMessageOrigin,
91
93
  PalletMessageQueuePage,
@@ -277,13 +279,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
277
279
  * TWOX-NOTE: OK ― `AccountId` is a secure hash.
278
280
  *
279
281
  * @param {AccountId32Like} arg
280
- * @param {Callback<[PalletIdentityRegistration, Bytes | undefined] | undefined> =} callback
282
+ * @param {Callback<PalletIdentityRegistration | undefined> =} callback
281
283
  **/
282
- identityOf: GenericStorageQuery<
283
- Rv,
284
- (arg: AccountId32Like) => [PalletIdentityRegistration, Bytes | undefined] | undefined,
285
- AccountId32
286
- >;
284
+ identityOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => PalletIdentityRegistration | undefined, AccountId32>;
285
+
286
+ /**
287
+ * Identifies the primary username of an account.
288
+ *
289
+ * @param {AccountId32Like} arg
290
+ * @param {Callback<Bytes | undefined> =} callback
291
+ **/
292
+ usernameOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => Bytes | undefined, AccountId32>;
287
293
 
288
294
  /**
289
295
  * The super-identity of an alternative "sub" identity together with its name, within that
@@ -319,39 +325,51 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
319
325
  /**
320
326
  * A map of the accounts who are authorized to grant usernames.
321
327
  *
322
- * @param {AccountId32Like} arg
328
+ * @param {BytesLike} arg
323
329
  * @param {Callback<PalletIdentityAuthorityProperties | undefined> =} callback
324
330
  **/
325
- usernameAuthorities: GenericStorageQuery<
326
- Rv,
327
- (arg: AccountId32Like) => PalletIdentityAuthorityProperties | undefined,
328
- AccountId32
329
- >;
331
+ authorityOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityAuthorityProperties | undefined, Bytes>;
330
332
 
331
333
  /**
332
- * Reverse lookup from `username` to the `AccountId` that has registered it. The value should
333
- * be a key in the `IdentityOf` map, but it may not if the user has cleared their identity.
334
+ * Reverse lookup from `username` to the `AccountId` that has registered it and the provider of
335
+ * the username. The `owner` value should be a key in the `UsernameOf` map, but it may not if
336
+ * the user has cleared their username or it has been removed.
334
337
  *
335
- * Multiple usernames may map to the same `AccountId`, but `IdentityOf` will only map to one
338
+ * Multiple usernames may map to the same `AccountId`, but `UsernameOf` will only map to one
336
339
  * primary username.
337
340
  *
338
341
  * @param {BytesLike} arg
339
- * @param {Callback<AccountId32 | undefined> =} callback
342
+ * @param {Callback<PalletIdentityUsernameInformation | undefined> =} callback
340
343
  **/
341
- accountOfUsername: GenericStorageQuery<Rv, (arg: BytesLike) => AccountId32 | undefined, Bytes>;
344
+ usernameInfoOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityUsernameInformation | undefined, Bytes>;
342
345
 
343
346
  /**
344
347
  * Usernames that an authority has granted, but that the account controller has not confirmed
345
348
  * that they want it. Used primarily in cases where the `AccountId` cannot provide a signature
346
349
  * because they are a pure proxy, multisig, etc. In order to confirm it, they should call
347
- * [`Call::accept_username`].
350
+ * [accept_username](`Call::accept_username`).
348
351
  *
349
352
  * First tuple item is the account and second is the acceptance deadline.
350
353
  *
351
354
  * @param {BytesLike} arg
352
- * @param {Callback<[AccountId32, number] | undefined> =} callback
355
+ * @param {Callback<[AccountId32, number, PalletIdentityProvider] | undefined> =} callback
353
356
  **/
354
- pendingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => [AccountId32, number] | undefined, Bytes>;
357
+ pendingUsernames: GenericStorageQuery<
358
+ Rv,
359
+ (arg: BytesLike) => [AccountId32, number, PalletIdentityProvider] | undefined,
360
+ Bytes
361
+ >;
362
+
363
+ /**
364
+ * Usernames for which the authority that granted them has started the removal process by
365
+ * unbinding them. Each unbinding username maps to its grace period expiry, which is the first
366
+ * block in which the username could be deleted through a
367
+ * [remove_username](`Call::remove_username`) call.
368
+ *
369
+ * @param {BytesLike} arg
370
+ * @param {Callback<number | undefined> =} callback
371
+ **/
372
+ unbindingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => number | undefined, Bytes>;
355
373
 
356
374
  /**
357
375
  * Generic pallet storage query
@@ -541,9 +559,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
541
559
  * This value is expected to be set only once per block and it's never stored
542
560
  * in the trie.
543
561
  *
544
- * @param {Callback<PolkadotPrimitivesV7PersistedValidationData | undefined> =} callback
562
+ * @param {Callback<PolkadotPrimitivesV8PersistedValidationData | undefined> =} callback
545
563
  **/
546
- validationData: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7PersistedValidationData | undefined>;
564
+ validationData: GenericStorageQuery<Rv, () => PolkadotPrimitivesV8PersistedValidationData | undefined>;
547
565
 
548
566
  /**
549
567
  * Were the validation data set to notify the relay chain?
@@ -570,9 +588,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
570
588
  * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
571
589
  * set after the inherent.
572
590
  *
573
- * @param {Callback<PolkadotPrimitivesV7UpgradeRestriction | undefined> =} callback
591
+ * @param {Callback<PolkadotPrimitivesV8UpgradeRestriction | undefined> =} callback
574
592
  **/
575
- upgradeRestrictionSignal: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeRestriction | undefined>;
593
+ upgradeRestrictionSignal: GenericStorageQuery<Rv, () => PolkadotPrimitivesV8UpgradeRestriction | undefined>;
576
594
 
577
595
  /**
578
596
  * Optional upgrade go-ahead signal from the relay-chain.
@@ -581,9 +599,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
581
599
  * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
582
600
  * set after the inherent.
583
601
  *
584
- * @param {Callback<PolkadotPrimitivesV7UpgradeGoAhead | undefined> =} callback
602
+ * @param {Callback<PolkadotPrimitivesV8UpgradeGoAhead | undefined> =} callback
585
603
  **/
586
- upgradeGoAhead: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeGoAhead | undefined>;
604
+ upgradeGoAhead: GenericStorageQuery<Rv, () => PolkadotPrimitivesV8UpgradeGoAhead | undefined>;
587
605
 
588
606
  /**
589
607
  * The state proof for the last relay parent block.
@@ -621,9 +639,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
621
639
  *
622
640
  * This data is also absent from the genesis.
623
641
  *
624
- * @param {Callback<PolkadotPrimitivesV7AbridgedHostConfiguration | undefined> =} callback
642
+ * @param {Callback<PolkadotPrimitivesV8AbridgedHostConfiguration | undefined> =} callback
625
643
  **/
626
- hostConfiguration: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7AbridgedHostConfiguration | undefined>;
644
+ hostConfiguration: GenericStorageQuery<Rv, () => PolkadotPrimitivesV8AbridgedHostConfiguration | undefined>;
627
645
 
628
646
  /**
629
647
  * The last downward message queue chain head we have observed.
@@ -1663,9 +1681,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1663
1681
  * Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
1664
1682
  * implementation in the XCM executor configuration.
1665
1683
  *
1666
- * @param {Callback<StagingXcmV4Xcm | undefined> =} callback
1684
+ * @param {Callback<StagingXcmV5Xcm | undefined> =} callback
1667
1685
  **/
1668
- recordedXcm: GenericStorageQuery<Rv, () => StagingXcmV4Xcm | undefined>;
1686
+ recordedXcm: GenericStorageQuery<Rv, () => StagingXcmV5Xcm | undefined>;
1669
1687
 
1670
1688
  /**
1671
1689
  * Generic pallet storage query
@@ -1781,13 +1799,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1781
1799
  **/
1782
1800
  accountStorages: GenericStorageQuery<Rv, (arg: [H160, H256]) => H256, [H160, H256]>;
1783
1801
 
1784
- /**
1785
- *
1786
- * @param {H160} arg
1787
- * @param {Callback<[] | undefined> =} callback
1788
- **/
1789
- suicided: GenericStorageQuery<Rv, (arg: H160) => [] | undefined, H160>;
1790
-
1791
1802
  /**
1792
1803
  * Generic pallet storage query
1793
1804
  **/
@@ -1798,15 +1809,24 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1798
1809
  **/
1799
1810
  ethereum: {
1800
1811
  /**
1801
- * Current building block's transactions and receipts.
1812
+ * Mapping from transaction index to transaction in the current building block.
1802
1813
  *
1803
- * @param {Callback<Array<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>> =} callback
1814
+ * @param {number} arg
1815
+ * @param {Callback<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3] | undefined> =} callback
1804
1816
  **/
1805
1817
  pending: GenericStorageQuery<
1806
1818
  Rv,
1807
- () => Array<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>
1819
+ (arg: number) => [EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3] | undefined,
1820
+ number
1808
1821
  >;
1809
1822
 
1823
+ /**
1824
+ * Counter for the related counted storage map
1825
+ *
1826
+ * @param {Callback<number> =} callback
1827
+ **/
1828
+ counterForPending: GenericStorageQuery<Rv, () => number>;
1829
+
1810
1830
  /**
1811
1831
  * The current Ethereum block.
1812
1832
  *
@@ -2085,6 +2105,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2085
2105
  **/
2086
2106
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => AstarRuntimeRuntimeCall | undefined, H256>;
2087
2107
 
2108
+ /**
2109
+ * Consideration cost created for publishing and storing a proposal.
2110
+ *
2111
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
2112
+ * the proposal count at the time of creation was below threshold N).
2113
+ *
2114
+ * @param {H256} arg
2115
+ * @param {Callback<[AccountId32, []] | undefined> =} callback
2116
+ **/
2117
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, []] | undefined, H256>;
2118
+
2088
2119
  /**
2089
2120
  * Votes on a given proposal, if it is ongoing.
2090
2121
  *
@@ -2138,6 +2169,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2138
2169
  **/
2139
2170
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => AstarRuntimeRuntimeCall | undefined, H256>;
2140
2171
 
2172
+ /**
2173
+ * Consideration cost created for publishing and storing a proposal.
2174
+ *
2175
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
2176
+ * the proposal count at the time of creation was below threshold N).
2177
+ *
2178
+ * @param {H256} arg
2179
+ * @param {Callback<[AccountId32, []] | undefined> =} callback
2180
+ **/
2181
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, []] | undefined, H256>;
2182
+
2141
2183
  /**
2142
2184
  * Votes on a given proposal, if it is ongoing.
2143
2185
  *
@@ -2191,6 +2233,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2191
2233
  **/
2192
2234
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => AstarRuntimeRuntimeCall | undefined, H256>;
2193
2235
 
2236
+ /**
2237
+ * Consideration cost created for publishing and storing a proposal.
2238
+ *
2239
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
2240
+ * the proposal count at the time of creation was below threshold N).
2241
+ *
2242
+ * @param {H256} arg
2243
+ * @param {Callback<[AccountId32, []] | undefined> =} callback
2244
+ **/
2245
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, []] | undefined, H256>;
2246
+
2194
2247
  /**
2195
2248
  * Votes on a given proposal, if it is ongoing.
2196
2249
  *
@@ -56,6 +56,8 @@ import type {
56
56
  XcmRuntimeApisDryRunError,
57
57
  AstarRuntimeOriginCaller,
58
58
  XcmRuntimeApisDryRunXcmDryRunEffects,
59
+ XcmRuntimeApisTrustedQueryError,
60
+ XcmVersionedAsset,
59
61
  } from './types.js';
60
62
 
61
63
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -904,17 +906,19 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
904
906
  **/
905
907
  dryRunApi: {
906
908
  /**
907
- * Dry run call.
909
+ * Dry run call V2.
908
910
  *
909
911
  * @callname: DryRunApi_dry_run_call
910
912
  * @param {AstarRuntimeOriginCaller} origin
911
913
  * @param {AstarRuntimeRuntimeCallLike} call
914
+ * @param {number} result_xcms_version
912
915
  **/
913
916
  dryRunCall: GenericRuntimeApiMethod<
914
917
  Rv,
915
918
  (
916
919
  origin: AstarRuntimeOriginCaller,
917
920
  call: AstarRuntimeRuntimeCallLike,
921
+ resultXcmsVersion: number,
918
922
  ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
919
923
  >;
920
924
 
@@ -938,6 +942,53 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
938
942
  **/
939
943
  [method: string]: GenericRuntimeApiMethod<Rv>;
940
944
  };
945
+ /**
946
+ * @runtimeapi: TrustedQueryApi - 0x2609be83ac4468dc
947
+ **/
948
+ trustedQueryApi: {
949
+ /**
950
+ * Returns if the location is a trusted reserve for the asset.
951
+ *
952
+ * # Arguments
953
+ * * `asset`: `VersionedAsset`.
954
+ * * `location`: `VersionedLocation`.
955
+ *
956
+ * @callname: TrustedQueryApi_is_trusted_reserve
957
+ * @param {XcmVersionedAsset} asset
958
+ * @param {XcmVersionedLocation} location
959
+ **/
960
+ isTrustedReserve: GenericRuntimeApiMethod<
961
+ Rv,
962
+ (
963
+ asset: XcmVersionedAsset,
964
+ location: XcmVersionedLocation,
965
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
966
+ >;
967
+
968
+ /**
969
+ * Returns if the asset can be teleported to the location.
970
+ *
971
+ * # Arguments
972
+ * * `asset`: `VersionedAsset`.
973
+ * * `location`: `VersionedLocation`.
974
+ *
975
+ * @callname: TrustedQueryApi_is_trusted_teleporter
976
+ * @param {XcmVersionedAsset} asset
977
+ * @param {XcmVersionedLocation} location
978
+ **/
979
+ isTrustedTeleporter: GenericRuntimeApiMethod<
980
+ Rv,
981
+ (
982
+ asset: XcmVersionedAsset,
983
+ location: XcmVersionedLocation,
984
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
985
+ >;
986
+
987
+ /**
988
+ * Generic runtime api call
989
+ **/
990
+ [method: string]: GenericRuntimeApiMethod<Rv>;
991
+ };
941
992
  /**
942
993
  * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
943
994
  **/
@@ -946,9 +997,10 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
946
997
  * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
947
998
  * storage.
948
999
  *
949
- * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
950
- * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
951
- * deserialization fails, an error is returned.
1000
+ * In the case of a FRAME-based runtime, this function deserializes the full
1001
+ * `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the
1002
+ * provided JSON blob is incorrect or incomplete or the deserialization fails, an error
1003
+ * is returned.
952
1004
  *
953
1005
  * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
954
1006
  * defaults will be used.
@@ -962,13 +1014,13 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
962
1014
  * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
963
1015
  * `id`.
964
1016
  *
965
- * If `id` is `None` the function returns JSON blob representation of the default
1017
+ * If `id` is `None` the function should return JSON blob representation of the default
966
1018
  * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
967
1019
  * `RuntimeGenesisConfig`.
968
1020
  *
969
1021
  * Otherwise function returns a JSON representation of the built-in, named
970
1022
  * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
971
- * exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
1023
+ * exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
972
1024
  * (potentially nested) key-value pairs that are intended for customizing the default
973
1025
  * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
974
1026
  * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can