@dedot/chaintypes 0.40.0 → 0.41.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.
@@ -58,6 +58,8 @@ import type {
58
58
  PalletIdentityRegistration,
59
59
  PalletIdentityRegistrarInfo,
60
60
  PalletIdentityAuthorityProperties,
61
+ PalletIdentityUsernameInformation,
62
+ PalletIdentityProvider,
61
63
  PalletRecoveryRecoveryConfig,
62
64
  PalletRecoveryActiveRecovery,
63
65
  PalletVestingVestingInfo,
@@ -96,9 +98,8 @@ import type {
96
98
  PolkadotRuntimeParachainsInclusionCandidatePendingAvailability,
97
99
  PolkadotParachainPrimitivesPrimitivesId,
98
100
  PolkadotPrimitivesVstagingScrapedOnChainVotes,
99
- PolkadotRuntimeParachainsSchedulerPalletCoreOccupied,
100
101
  PolkadotPrimitivesV8CoreIndex,
101
- PolkadotRuntimeParachainsSchedulerPalletParasEntry,
102
+ PolkadotRuntimeParachainsSchedulerCommonAssignment,
102
103
  PolkadotRuntimeParachainsParasPvfCheckActiveVoteState,
103
104
  PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
104
105
  PolkadotRuntimeParachainsParasParaLifecycle,
@@ -128,13 +129,14 @@ import type {
128
129
  PolkadotRuntimeCommonParasRegistrarParaInfo,
129
130
  PolkadotRuntimeCommonCrowdloanFundInfo,
130
131
  PolkadotRuntimeCommonAssignedSlotsParachainTemporarySlot,
132
+ PalletMigrationsMigrationCursor,
131
133
  PalletXcmQueryStatus,
132
134
  XcmVersionedLocation,
133
135
  SpWeightsWeightV2Weight,
134
136
  PalletXcmVersionMigrationStage,
135
137
  PalletXcmRemoteLockedFungibleRecord,
136
138
  XcmVersionedAssetId,
137
- StagingXcmV4Xcm,
139
+ StagingXcmV5Xcm,
138
140
  PalletMessageQueueBookState,
139
141
  PolkadotRuntimeParachainsInclusionAggregateMessageOrigin,
140
142
  PalletMessageQueuePage,
@@ -1372,13 +1374,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1372
1374
  * TWOX-NOTE: OK ― `AccountId` is a secure hash.
1373
1375
  *
1374
1376
  * @param {AccountId32Like} arg
1375
- * @param {Callback<[PalletIdentityRegistration, Bytes | undefined] | undefined> =} callback
1377
+ * @param {Callback<PalletIdentityRegistration | undefined> =} callback
1376
1378
  **/
1377
- identityOf: GenericStorageQuery<
1378
- Rv,
1379
- (arg: AccountId32Like) => [PalletIdentityRegistration, Bytes | undefined] | undefined,
1380
- AccountId32
1381
- >;
1379
+ identityOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => PalletIdentityRegistration | undefined, AccountId32>;
1380
+
1381
+ /**
1382
+ * Identifies the primary username of an account.
1383
+ *
1384
+ * @param {AccountId32Like} arg
1385
+ * @param {Callback<Bytes | undefined> =} callback
1386
+ **/
1387
+ usernameOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => Bytes | undefined, AccountId32>;
1382
1388
 
1383
1389
  /**
1384
1390
  * The super-identity of an alternative "sub" identity together with its name, within that
@@ -1414,39 +1420,51 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1414
1420
  /**
1415
1421
  * A map of the accounts who are authorized to grant usernames.
1416
1422
  *
1417
- * @param {AccountId32Like} arg
1423
+ * @param {BytesLike} arg
1418
1424
  * @param {Callback<PalletIdentityAuthorityProperties | undefined> =} callback
1419
1425
  **/
1420
- usernameAuthorities: GenericStorageQuery<
1421
- Rv,
1422
- (arg: AccountId32Like) => PalletIdentityAuthorityProperties | undefined,
1423
- AccountId32
1424
- >;
1426
+ authorityOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityAuthorityProperties | undefined, Bytes>;
1425
1427
 
1426
1428
  /**
1427
- * Reverse lookup from `username` to the `AccountId` that has registered it. The value should
1428
- * be a key in the `IdentityOf` map, but it may not if the user has cleared their identity.
1429
+ * Reverse lookup from `username` to the `AccountId` that has registered it and the provider of
1430
+ * the username. The `owner` value should be a key in the `UsernameOf` map, but it may not if
1431
+ * the user has cleared their username or it has been removed.
1429
1432
  *
1430
- * Multiple usernames may map to the same `AccountId`, but `IdentityOf` will only map to one
1433
+ * Multiple usernames may map to the same `AccountId`, but `UsernameOf` will only map to one
1431
1434
  * primary username.
1432
1435
  *
1433
1436
  * @param {BytesLike} arg
1434
- * @param {Callback<AccountId32 | undefined> =} callback
1437
+ * @param {Callback<PalletIdentityUsernameInformation | undefined> =} callback
1435
1438
  **/
1436
- accountOfUsername: GenericStorageQuery<Rv, (arg: BytesLike) => AccountId32 | undefined, Bytes>;
1439
+ usernameInfoOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityUsernameInformation | undefined, Bytes>;
1437
1440
 
1438
1441
  /**
1439
1442
  * Usernames that an authority has granted, but that the account controller has not confirmed
1440
1443
  * that they want it. Used primarily in cases where the `AccountId` cannot provide a signature
1441
1444
  * because they are a pure proxy, multisig, etc. In order to confirm it, they should call
1442
- * [`Call::accept_username`].
1445
+ * [accept_username](`Call::accept_username`).
1443
1446
  *
1444
1447
  * First tuple item is the account and second is the acceptance deadline.
1445
1448
  *
1446
1449
  * @param {BytesLike} arg
1447
- * @param {Callback<[AccountId32, number] | undefined> =} callback
1450
+ * @param {Callback<[AccountId32, number, PalletIdentityProvider] | undefined> =} callback
1451
+ **/
1452
+ pendingUsernames: GenericStorageQuery<
1453
+ Rv,
1454
+ (arg: BytesLike) => [AccountId32, number, PalletIdentityProvider] | undefined,
1455
+ Bytes
1456
+ >;
1457
+
1458
+ /**
1459
+ * Usernames for which the authority that granted them has started the removal process by
1460
+ * unbinding them. Each unbinding username maps to its grace period expiry, which is the first
1461
+ * block in which the username could be deleted through a
1462
+ * [remove_username](`Call::remove_username`) call.
1463
+ *
1464
+ * @param {BytesLike} arg
1465
+ * @param {Callback<number | undefined> =} callback
1448
1466
  **/
1449
- pendingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => [AccountId32, number] | undefined, Bytes>;
1467
+ unbindingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => number | undefined, Bytes>;
1450
1468
 
1451
1469
  /**
1452
1470
  * Generic pallet storage query
@@ -2187,6 +2205,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2187
2205
  **/
2188
2206
  treasury: {
2189
2207
  /**
2208
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
2209
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
2210
+ *
2190
2211
  * Number of proposals that have been made.
2191
2212
  *
2192
2213
  * @param {Callback<number> =} callback
@@ -2194,6 +2215,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2194
2215
  proposalCount: GenericStorageQuery<Rv, () => number>;
2195
2216
 
2196
2217
  /**
2218
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
2219
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
2220
+ *
2197
2221
  * Proposals that have been made.
2198
2222
  *
2199
2223
  * @param {number} arg
@@ -2209,6 +2233,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2209
2233
  deactivated: GenericStorageQuery<Rv, () => bigint>;
2210
2234
 
2211
2235
  /**
2236
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
2237
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
2238
+ *
2212
2239
  * Proposal indices that have been approved but not yet awarded.
2213
2240
  *
2214
2241
  * @param {Callback<Array<number>> =} callback
@@ -2230,6 +2257,13 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2230
2257
  **/
2231
2258
  spends: GenericStorageQuery<Rv, (arg: number) => PalletTreasurySpendStatus | undefined, number>;
2232
2259
 
2260
+ /**
2261
+ * The blocknumber for the last triggered spend period.
2262
+ *
2263
+ * @param {Callback<number | undefined> =} callback
2264
+ **/
2265
+ lastSpendPeriod: GenericStorageQuery<Rv, () => number | undefined>;
2266
+
2233
2267
  /**
2234
2268
  * Generic pallet storage query
2235
2269
  **/
@@ -2436,18 +2470,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2436
2470
  **/
2437
2471
  validatorGroups: GenericStorageQuery<Rv, () => Array<Array<PolkadotPrimitivesV8ValidatorIndex>>>;
2438
2472
 
2439
- /**
2440
- * One entry for each availability core. The i'th parachain belongs to the i'th core, with the
2441
- * remaining cores all being on demand parachain multiplexers.
2442
- *
2443
- * Bounded by the maximum of either of these two values:
2444
- * * The number of parachains and parathread multiplexers
2445
- * * The number of validators divided by `configuration.max_validators_per_core`.
2446
- *
2447
- * @param {Callback<Array<PolkadotRuntimeParachainsSchedulerPalletCoreOccupied>> =} callback
2448
- **/
2449
- availabilityCores: GenericStorageQuery<Rv, () => Array<PolkadotRuntimeParachainsSchedulerPalletCoreOccupied>>;
2450
-
2451
2473
  /**
2452
2474
  * The block number where the session start occurred. Used to track how many group rotations
2453
2475
  * have occurred.
@@ -2463,14 +2485,13 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2463
2485
 
2464
2486
  /**
2465
2487
  * One entry for each availability core. The `VecDeque` represents the assignments to be
2466
- * scheduled on that core. The value contained here will not be valid after the end of
2467
- * a block. Runtime APIs should be used to determine scheduled cores for the upcoming block.
2488
+ * scheduled on that core.
2468
2489
  *
2469
- * @param {Callback<Array<[PolkadotPrimitivesV8CoreIndex, Array<PolkadotRuntimeParachainsSchedulerPalletParasEntry>]>> =} callback
2490
+ * @param {Callback<Array<[PolkadotPrimitivesV8CoreIndex, Array<PolkadotRuntimeParachainsSchedulerCommonAssignment>]>> =} callback
2470
2491
  **/
2471
2492
  claimQueue: GenericStorageQuery<
2472
2493
  Rv,
2473
- () => Array<[PolkadotPrimitivesV8CoreIndex, Array<PolkadotRuntimeParachainsSchedulerPalletParasEntry>]>
2494
+ () => Array<[PolkadotPrimitivesV8CoreIndex, Array<PolkadotRuntimeParachainsSchedulerCommonAssignment>]>
2474
2495
  >;
2475
2496
 
2476
2497
  /**
@@ -2794,7 +2815,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2794
2815
  hasInitialized: GenericStorageQuery<Rv, () => [] | undefined>;
2795
2816
 
2796
2817
  /**
2797
- * Buffered session changes along with the block number at which they should be applied.
2818
+ * Buffered session changes.
2798
2819
  *
2799
2820
  * Typically this will be empty or one element long. Apart from that this item never hits
2800
2821
  * the storage.
@@ -3545,6 +3566,35 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3545
3566
  **/
3546
3567
  [storage: string]: GenericStorageQuery<Rv>;
3547
3568
  };
3569
+ /**
3570
+ * Pallet `MultiBlockMigrations`'s storage queries
3571
+ **/
3572
+ multiBlockMigrations: {
3573
+ /**
3574
+ * The currently active migration to run and its cursor.
3575
+ *
3576
+ * `None` indicates that no migration is running.
3577
+ *
3578
+ * @param {Callback<PalletMigrationsMigrationCursor | undefined> =} callback
3579
+ **/
3580
+ cursor: GenericStorageQuery<Rv, () => PalletMigrationsMigrationCursor | undefined>;
3581
+
3582
+ /**
3583
+ * Set of all successfully executed migrations.
3584
+ *
3585
+ * This is used as blacklist, to not re-execute migrations that have not been removed from the
3586
+ * codebase yet. Governance can regularly clear this out via `clear_historic`.
3587
+ *
3588
+ * @param {BytesLike} arg
3589
+ * @param {Callback<[] | undefined> =} callback
3590
+ **/
3591
+ historic: GenericStorageQuery<Rv, (arg: BytesLike) => [] | undefined, Bytes>;
3592
+
3593
+ /**
3594
+ * Generic pallet storage query
3595
+ **/
3596
+ [storage: string]: GenericStorageQuery<Rv>;
3597
+ };
3548
3598
  /**
3549
3599
  * Pallet `XcmPallet`'s storage queries
3550
3600
  **/
@@ -3688,9 +3738,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3688
3738
  * Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
3689
3739
  * implementation in the XCM executor configuration.
3690
3740
  *
3691
- * @param {Callback<StagingXcmV4Xcm | undefined> =} callback
3741
+ * @param {Callback<StagingXcmV5Xcm | undefined> =} callback
3692
3742
  **/
3693
- recordedXcm: GenericStorageQuery<Rv, () => StagingXcmV4Xcm | undefined>;
3743
+ recordedXcm: GenericStorageQuery<Rv, () => StagingXcmV5Xcm | undefined>;
3694
3744
 
3695
3745
  /**
3696
3746
  * Generic pallet storage query
@@ -86,6 +86,8 @@ import type {
86
86
  WestendRuntimeOriginCaller,
87
87
  XcmRuntimeApisDryRunXcmDryRunEffects,
88
88
  XcmRuntimeApisConversionsError,
89
+ XcmRuntimeApisTrustedQueryError,
90
+ XcmVersionedAsset,
89
91
  } from './types';
90
92
 
91
93
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -573,12 +575,12 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
573
575
  * Returns the state of parachain backing for a given para.
574
576
  *
575
577
  * @callname: ParachainHost_para_backing_state
576
- * @param {PolkadotParachainPrimitivesPrimitivesId} _
578
+ * @param {PolkadotParachainPrimitivesPrimitivesId} __runtime_api_generated_name_0__
577
579
  **/
578
580
  paraBackingState: GenericRuntimeApiMethod<
579
581
  Rv,
580
582
  (
581
- undefined: PolkadotParachainPrimitivesPrimitivesId,
583
+ runtimeApiGeneratedName0: PolkadotParachainPrimitivesPrimitivesId,
582
584
  ) => Promise<PolkadotPrimitivesVstagingAsyncBackingBackingState | undefined>
583
585
  >;
584
586
 
@@ -1415,6 +1417,14 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
1415
1417
  **/
1416
1418
  poolBalance: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
1417
1419
 
1420
+ /**
1421
+ * Returns the bonded account and reward account associated with the pool_id.
1422
+ *
1423
+ * @callname: NominationPoolsApi_pool_accounts
1424
+ * @param {number} pool_id
1425
+ **/
1426
+ poolAccounts: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<[AccountId32, AccountId32]>>;
1427
+
1418
1428
  /**
1419
1429
  * Generic runtime api call
1420
1430
  **/
@@ -1463,9 +1473,10 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
1463
1473
  * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
1464
1474
  * storage.
1465
1475
  *
1466
- * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
1467
- * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
1468
- * deserialization fails, an error is returned.
1476
+ * In the case of a FRAME-based runtime, this function deserializes the full
1477
+ * `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the
1478
+ * provided JSON blob is incorrect or incomplete or the deserialization fails, an error
1479
+ * is returned.
1469
1480
  *
1470
1481
  * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
1471
1482
  * defaults will be used.
@@ -1479,7 +1490,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
1479
1490
  * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
1480
1491
  * `id`.
1481
1492
  *
1482
- * If `id` is `None` the function returns JSON blob representation of the default
1493
+ * If `id` is `None` the function should return JSON blob representation of the default
1483
1494
  * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
1484
1495
  * `RuntimeGenesisConfig`.
1485
1496
  *
@@ -1506,6 +1517,53 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
1506
1517
  **/
1507
1518
  presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
1508
1519
 
1520
+ /**
1521
+ * Generic runtime api call
1522
+ **/
1523
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1524
+ };
1525
+ /**
1526
+ * @runtimeapi: TrustedQueryApi - 0x2609be83ac4468dc
1527
+ **/
1528
+ trustedQueryApi: {
1529
+ /**
1530
+ * Returns if the location is a trusted reserve for the asset.
1531
+ *
1532
+ * # Arguments
1533
+ * * `asset`: `VersionedAsset`.
1534
+ * * `location`: `VersionedLocation`.
1535
+ *
1536
+ * @callname: TrustedQueryApi_is_trusted_reserve
1537
+ * @param {XcmVersionedAsset} asset
1538
+ * @param {XcmVersionedLocation} location
1539
+ **/
1540
+ isTrustedReserve: GenericRuntimeApiMethod<
1541
+ Rv,
1542
+ (
1543
+ asset: XcmVersionedAsset,
1544
+ location: XcmVersionedLocation,
1545
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
1546
+ >;
1547
+
1548
+ /**
1549
+ * Returns if the asset can be teleported to the location.
1550
+ *
1551
+ * # Arguments
1552
+ * * `asset`: `VersionedAsset`.
1553
+ * * `location`: `VersionedLocation`.
1554
+ *
1555
+ * @callname: TrustedQueryApi_is_trusted_teleporter
1556
+ * @param {XcmVersionedAsset} asset
1557
+ * @param {XcmVersionedLocation} location
1558
+ **/
1559
+ isTrustedTeleporter: GenericRuntimeApiMethod<
1560
+ Rv,
1561
+ (
1562
+ asset: XcmVersionedAsset,
1563
+ location: XcmVersionedLocation,
1564
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
1565
+ >;
1566
+
1509
1567
  /**
1510
1568
  * Generic runtime api call
1511
1569
  **/