@dedot/api 0.6.1 → 0.7.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.
@@ -1,6 +1,6 @@
1
- import type { AccountId32, AccountId32Like, Bytes, BytesLike, Data, Digest, FixedBytes, FixedU128, FixedU64, H256, Perbill, Percent, Phase } from '@dedot/codecs';
1
+ import type { AccountId32, AccountId32Like, Bytes, BytesLike, Data, Digest, FixedBytes, FixedU128, FixedU64, H160, H256, Perbill, Percent, Phase } from '@dedot/codecs';
2
2
  import type { GenericChainStorage, GenericStorageQuery, RpcVersion } from '@dedot/types';
3
- import type { FrameSupportDispatchPerDispatchClass, FrameSupportPreimagesBounded, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, KitchensinkRuntimeRuntimeCall, KitchensinkRuntimeRuntimeParametersKey, KitchensinkRuntimeRuntimeParametersValue, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesReserveData, PalletBountiesBounty, PalletBrokerAllowedRenewalId, PalletBrokerAllowedRenewalRecord, PalletBrokerConfigRecord, PalletBrokerContributionRecord, PalletBrokerInstaPoolHistoryRecord, PalletBrokerLeaseRecordItem, PalletBrokerPoolIoRecord, PalletBrokerRegionId, PalletBrokerRegionRecord, PalletBrokerSaleInfoRecord, PalletBrokerScheduleItem, PalletBrokerStatusRecord, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMigrationsMigrationCursor, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsBitFlagsCollectionRole, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletReferendaReferendumInfoTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpConsensusSlotsSlot, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpNposElectionsElectionScore, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata } from './types.js';
3
+ import type { FrameSupportDispatchPerDispatchClass, FrameSupportPreimagesBounded, FrameSupportTokensFungibleHoldConsideration, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensMiscIdAmount, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, KitchensinkRuntimeRuntimeCall, KitchensinkRuntimeRuntimeParametersKey, KitchensinkRuntimeRuntimeParametersValue, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletBrokerAutoRenewalRecord, PalletBrokerConfigRecord, PalletBrokerContributionRecord, PalletBrokerInstaPoolHistoryRecord, PalletBrokerLeaseRecordItem, PalletBrokerOnDemandRevenueRecord, PalletBrokerPoolIoRecord, PalletBrokerPotentialRenewalId, PalletBrokerPotentialRenewalRecord, PalletBrokerRegionId, PalletBrokerRegionRecord, PalletBrokerSaleInfoRecord, PalletBrokerScheduleItem, PalletBrokerStatusRecord, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityProvider, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletIdentityUsernameInformation, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMigrationsMigrationCursor, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsBitFlagsCollectionRole, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletReferendaReferendumInfoTally, PalletReviveStorageContractInfo, PalletReviveStorageDeletionQueueManager, PalletReviveWasmCodeInfo, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpConsensusSlotsSlot, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpNposElectionsElectionScore, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata } from './types.js';
4
4
  export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage<Rv> {
5
5
  /**
6
6
  * Pallet `System`'s storage queries
@@ -395,6 +395,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
395
395
  * Any liquidity locks on some account balances.
396
396
  * NOTE: Should only be accessed when setting, changing and freeing a lock.
397
397
  *
398
+ * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
399
+ *
398
400
  * @param {AccountId32Like} arg
399
401
  * @param {Callback<Array<PalletBalancesBalanceLock>> =} callback
400
402
  **/
@@ -402,6 +404,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
402
404
  /**
403
405
  * Named reserves on some account balances.
404
406
  *
407
+ * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
408
+ *
405
409
  * @param {AccountId32Like} arg
406
410
  * @param {Callback<Array<PalletBalancesReserveData>> =} callback
407
411
  **/
@@ -410,16 +414,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
410
414
  * Holds on account balances.
411
415
  *
412
416
  * @param {AccountId32Like} arg
413
- * @param {Callback<Array<PalletBalancesIdAmount>> =} callback
417
+ * @param {Callback<Array<FrameSupportTokensMiscIdAmount>> =} callback
414
418
  **/
415
- holds: GenericStorageQuery<Rv, (arg: AccountId32Like) => Array<PalletBalancesIdAmount>, AccountId32>;
419
+ holds: GenericStorageQuery<Rv, (arg: AccountId32Like) => Array<FrameSupportTokensMiscIdAmount>, AccountId32>;
416
420
  /**
417
421
  * Freeze locks on account balances.
418
422
  *
419
423
  * @param {AccountId32Like} arg
420
- * @param {Callback<Array<PalletBalancesIdAmountRuntimeFreezeReason>> =} callback
424
+ * @param {Callback<Array<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>> =} callback
421
425
  **/
422
- freezes: GenericStorageQuery<Rv, (arg: AccountId32Like) => Array<PalletBalancesIdAmountRuntimeFreezeReason>, AccountId32>;
426
+ freezes: GenericStorageQuery<Rv, (arg: AccountId32Like) => Array<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>, AccountId32>;
423
427
  /**
424
428
  * Generic pallet storage query
425
429
  **/
@@ -684,6 +688,24 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
684
688
  * @param {Callback<number> =} callback
685
689
  **/
686
690
  counterForNominators: GenericStorageQuery<Rv, () => number>;
691
+ /**
692
+ * Stakers whose funds are managed by other pallets.
693
+ *
694
+ * This pallet does not apply any locks on them, therefore they are only virtually bonded. They
695
+ * are expected to be keyless accounts and hence should not be allowed to mutate their ledger
696
+ * directly via this pallet. Instead, these accounts are managed by other pallets and accessed
697
+ * via low level apis. We keep track of them to do minimal integrity checks.
698
+ *
699
+ * @param {AccountId32Like} arg
700
+ * @param {Callback<[] | undefined> =} callback
701
+ **/
702
+ virtualStakers: GenericStorageQuery<Rv, (arg: AccountId32Like) => [] | undefined, AccountId32>;
703
+ /**
704
+ * Counter for the related counted storage map
705
+ *
706
+ * @param {Callback<number> =} callback
707
+ **/
708
+ counterForVirtualStakers: GenericStorageQuery<Rv, () => number>;
687
709
  /**
688
710
  * The maximum nominator count before we stop allowing new validators to join.
689
711
  *
@@ -940,19 +962,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
940
962
  **/
941
963
  currentPlannedSession: GenericStorageQuery<Rv, () => number>;
942
964
  /**
943
- * Indices of validators that have offended in the active era and whether they are currently
944
- * disabled.
965
+ * Indices of validators that have offended in the active era. The offenders are disabled for a
966
+ * whole era. For this reason they are kept here - only staking pallet knows about eras. The
967
+ * implementor of [`DisablingStrategy`] defines if a validator should be disabled which
968
+ * implicitly means that the implementor also controls the max number of disabled validators.
945
969
  *
946
- * This value should be a superset of disabled validators since not all offences lead to the
947
- * validator being disabled (if there was no slash). This is needed to track the percentage of
948
- * validators that have offended in the current era, ensuring a new era is forced if
949
- * `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find
950
- * whether a given validator has previously offended using binary search. It gets cleared when
951
- * the era ends.
970
+ * The vec is always kept sorted so that we can find whether a given validator has previously
971
+ * offended using binary search.
952
972
  *
953
- * @param {Callback<Array<[number, boolean]>> =} callback
973
+ * @param {Callback<Array<number>> =} callback
954
974
  **/
955
- offendingValidators: GenericStorageQuery<Rv, () => Array<[number, boolean]>>;
975
+ disabledValidators: GenericStorageQuery<Rv, () => Array<number>>;
956
976
  /**
957
977
  * The threshold for when users can start calling `chill_other` for other validators /
958
978
  * nominators. The threshold is compared to the actual number of validators / nominators
@@ -1150,6 +1170,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1150
1170
  * @param {Callback<KitchensinkRuntimeRuntimeCall | undefined> =} callback
1151
1171
  **/
1152
1172
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => KitchensinkRuntimeRuntimeCall | undefined, H256>;
1173
+ /**
1174
+ * Consideration cost created for publishing and storing a proposal.
1175
+ *
1176
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
1177
+ * the proposal count at the time of creation was below threshold N).
1178
+ *
1179
+ * @param {H256} arg
1180
+ * @param {Callback<[AccountId32, FrameSupportTokensFungibleHoldConsideration] | undefined> =} callback
1181
+ **/
1182
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, FrameSupportTokensFungibleHoldConsideration] | undefined, H256>;
1153
1183
  /**
1154
1184
  * Votes on a given proposal, if it is ongoing.
1155
1185
  *
@@ -1170,7 +1200,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1170
1200
  **/
1171
1201
  members: GenericStorageQuery<Rv, () => Array<AccountId32>>;
1172
1202
  /**
1173
- * The prime member that helps determine the default vote behavior in case of absentations.
1203
+ * The prime member that helps determine the default vote behavior in case of abstentions.
1174
1204
  *
1175
1205
  * @param {Callback<AccountId32 | undefined> =} callback
1176
1206
  **/
@@ -1197,6 +1227,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1197
1227
  * @param {Callback<KitchensinkRuntimeRuntimeCall | undefined> =} callback
1198
1228
  **/
1199
1229
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => KitchensinkRuntimeRuntimeCall | undefined, H256>;
1230
+ /**
1231
+ * Consideration cost created for publishing and storing a proposal.
1232
+ *
1233
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
1234
+ * the proposal count at the time of creation was below threshold N).
1235
+ *
1236
+ * @param {H256} arg
1237
+ * @param {Callback<[AccountId32, []] | undefined> =} callback
1238
+ **/
1239
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, []] | undefined, H256>;
1200
1240
  /**
1201
1241
  * Votes on a given proposal, if it is ongoing.
1202
1242
  *
@@ -1217,7 +1257,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1217
1257
  **/
1218
1258
  members: GenericStorageQuery<Rv, () => Array<AccountId32>>;
1219
1259
  /**
1220
- * The prime member that helps determine the default vote behavior in case of absentations.
1260
+ * The prime member that helps determine the default vote behavior in case of abstentions.
1221
1261
  *
1222
1262
  * @param {Callback<AccountId32 | undefined> =} callback
1223
1263
  **/
@@ -1367,12 +1407,18 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1367
1407
  **/
1368
1408
  treasury: {
1369
1409
  /**
1410
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
1411
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
1412
+ *
1370
1413
  * Number of proposals that have been made.
1371
1414
  *
1372
1415
  * @param {Callback<number> =} callback
1373
1416
  **/
1374
1417
  proposalCount: GenericStorageQuery<Rv, () => number>;
1375
1418
  /**
1419
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
1420
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
1421
+ *
1376
1422
  * Proposals that have been made.
1377
1423
  *
1378
1424
  * @param {number} arg
@@ -1386,6 +1432,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1386
1432
  **/
1387
1433
  deactivated: GenericStorageQuery<Rv, () => bigint>;
1388
1434
  /**
1435
+ * DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
1436
+ * Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
1437
+ *
1389
1438
  * Proposal indices that have been approved but not yet awarded.
1390
1439
  *
1391
1440
  * @param {Callback<Array<number>> =} callback
@@ -1404,6 +1453,12 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1404
1453
  * @param {Callback<PalletTreasurySpendStatus | undefined> =} callback
1405
1454
  **/
1406
1455
  spends: GenericStorageQuery<Rv, (arg: number) => PalletTreasurySpendStatus | undefined, number>;
1456
+ /**
1457
+ * The blocknumber for the last triggered spend period.
1458
+ *
1459
+ * @param {Callback<number | undefined> =} callback
1460
+ **/
1461
+ lastSpendPeriod: GenericStorageQuery<Rv, () => number | undefined>;
1407
1462
  /**
1408
1463
  * Generic pallet storage query
1409
1464
  **/
@@ -1418,10 +1473,10 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1418
1473
  *
1419
1474
  * E.g. `native_amount = asset_amount * ConversionRateToNative::<T>::get(asset_kind)`
1420
1475
  *
1421
- * @param {number} arg
1476
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} arg
1422
1477
  * @param {Callback<FixedU128 | undefined> =} callback
1423
1478
  **/
1424
- conversionRateToNative: GenericStorageQuery<Rv, (arg: number) => FixedU128 | undefined, number>;
1479
+ conversionRateToNative: GenericStorageQuery<Rv, (arg: FrameSupportTokensFungibleUnionOfNativeOrWithId) => FixedU128 | undefined, FrameSupportTokensFungibleUnionOfNativeOrWithId>;
1425
1480
  /**
1426
1481
  * Generic pallet storage query
1427
1482
  **/
@@ -1668,9 +1723,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1668
1723
  * TWOX-NOTE: OK ― `AccountId` is a secure hash.
1669
1724
  *
1670
1725
  * @param {AccountId32Like} arg
1671
- * @param {Callback<[PalletIdentityRegistration, Bytes | undefined] | undefined> =} callback
1726
+ * @param {Callback<PalletIdentityRegistration | undefined> =} callback
1727
+ **/
1728
+ identityOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => PalletIdentityRegistration | undefined, AccountId32>;
1729
+ /**
1730
+ * Identifies the primary username of an account.
1731
+ *
1732
+ * @param {AccountId32Like} arg
1733
+ * @param {Callback<Bytes | undefined> =} callback
1672
1734
  **/
1673
- identityOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => [PalletIdentityRegistration, Bytes | undefined] | undefined, AccountId32>;
1735
+ usernameOf: GenericStorageQuery<Rv, (arg: AccountId32Like) => Bytes | undefined, AccountId32>;
1674
1736
  /**
1675
1737
  * The super-identity of an alternative "sub" identity together with its name, within that
1676
1738
  * context. If the account is not some other account's sub-identity, then just `None`.
@@ -1702,33 +1764,44 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1702
1764
  /**
1703
1765
  * A map of the accounts who are authorized to grant usernames.
1704
1766
  *
1705
- * @param {AccountId32Like} arg
1767
+ * @param {BytesLike} arg
1706
1768
  * @param {Callback<PalletIdentityAuthorityProperties | undefined> =} callback
1707
1769
  **/
1708
- usernameAuthorities: GenericStorageQuery<Rv, (arg: AccountId32Like) => PalletIdentityAuthorityProperties | undefined, AccountId32>;
1770
+ authorityOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityAuthorityProperties | undefined, Bytes>;
1709
1771
  /**
1710
- * Reverse lookup from `username` to the `AccountId` that has registered it. The value should
1711
- * be a key in the `IdentityOf` map, but it may not if the user has cleared their identity.
1772
+ * Reverse lookup from `username` to the `AccountId` that has registered it and the provider of
1773
+ * the username. The `owner` value should be a key in the `UsernameOf` map, but it may not if
1774
+ * the user has cleared their username or it has been removed.
1712
1775
  *
1713
- * Multiple usernames may map to the same `AccountId`, but `IdentityOf` will only map to one
1776
+ * Multiple usernames may map to the same `AccountId`, but `UsernameOf` will only map to one
1714
1777
  * primary username.
1715
1778
  *
1716
1779
  * @param {BytesLike} arg
1717
- * @param {Callback<AccountId32 | undefined> =} callback
1780
+ * @param {Callback<PalletIdentityUsernameInformation | undefined> =} callback
1718
1781
  **/
1719
- accountOfUsername: GenericStorageQuery<Rv, (arg: BytesLike) => AccountId32 | undefined, Bytes>;
1782
+ usernameInfoOf: GenericStorageQuery<Rv, (arg: BytesLike) => PalletIdentityUsernameInformation | undefined, Bytes>;
1720
1783
  /**
1721
1784
  * Usernames that an authority has granted, but that the account controller has not confirmed
1722
1785
  * that they want it. Used primarily in cases where the `AccountId` cannot provide a signature
1723
1786
  * because they are a pure proxy, multisig, etc. In order to confirm it, they should call
1724
- * [`Call::accept_username`].
1787
+ * [accept_username](`Call::accept_username`).
1725
1788
  *
1726
1789
  * First tuple item is the account and second is the acceptance deadline.
1727
1790
  *
1728
1791
  * @param {BytesLike} arg
1729
- * @param {Callback<[AccountId32, number] | undefined> =} callback
1792
+ * @param {Callback<[AccountId32, number, PalletIdentityProvider] | undefined> =} callback
1793
+ **/
1794
+ pendingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => [AccountId32, number, PalletIdentityProvider] | undefined, Bytes>;
1795
+ /**
1796
+ * Usernames for which the authority that granted them has started the removal process by
1797
+ * unbinding them. Each unbinding username maps to its grace period expiry, which is the first
1798
+ * block in which the username could be deleted through a
1799
+ * [remove_username](`Call::remove_username`) call.
1800
+ *
1801
+ * @param {BytesLike} arg
1802
+ * @param {Callback<number | undefined> =} callback
1730
1803
  **/
1731
- pendingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => [AccountId32, number] | undefined, Bytes>;
1804
+ unbindingUsernames: GenericStorageQuery<Rv, (arg: BytesLike) => number | undefined, Bytes>;
1732
1805
  /**
1733
1806
  * Generic pallet storage query
1734
1807
  **/
@@ -2005,6 +2078,15 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2005
2078
  * @param {Callback<FixedU64> =} callback
2006
2079
  **/
2007
2080
  storage: GenericStorageQuery<Rv, () => FixedU64>;
2081
+ /**
2082
+ * The proportion of the `block length` to consume on each block.
2083
+ *
2084
+ * `1.0` is mapped to `100%`. Must be at most [`crate::RESOURCE_HARD_LIMIT`]. Setting this to
2085
+ * over `1.0` could stall the chain.
2086
+ *
2087
+ * @param {Callback<FixedU64> =} callback
2088
+ **/
2089
+ length: GenericStorageQuery<Rv, () => FixedU64>;
2008
2090
  /**
2009
2091
  * Storage map used for wasting proof size.
2010
2092
  *
@@ -2204,6 +2286,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2204
2286
  * @param {Callback<PalletAssetsAssetMetadata> =} callback
2205
2287
  **/
2206
2288
  metadata: GenericStorageQuery<Rv, (arg: number) => PalletAssetsAssetMetadata, number>;
2289
+ /**
2290
+ * The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
2291
+ * item has no effect.
2292
+ *
2293
+ * This can be useful for setting up constraints for IDs of the new assets. For example, by
2294
+ * providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
2295
+ * auto-increment model can be applied to all new asset IDs.
2296
+ *
2297
+ * The initial next asset ID can be set using the [`GenesisConfig`] or the
2298
+ * [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
2299
+ *
2300
+ * @param {Callback<number | undefined> =} callback
2301
+ **/
2302
+ nextAssetId: GenericStorageQuery<Rv, () => number | undefined>;
2207
2303
  /**
2208
2304
  * Generic pallet storage query
2209
2305
  **/
@@ -2250,6 +2346,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2250
2346
  * @param {Callback<PalletAssetsAssetMetadata> =} callback
2251
2347
  **/
2252
2348
  metadata: GenericStorageQuery<Rv, (arg: number) => PalletAssetsAssetMetadata, number>;
2349
+ /**
2350
+ * The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
2351
+ * item has no effect.
2352
+ *
2353
+ * This can be useful for setting up constraints for IDs of the new assets. For example, by
2354
+ * providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
2355
+ * auto-increment model can be applied to all new asset IDs.
2356
+ *
2357
+ * The initial next asset ID can be set using the [`GenesisConfig`] or the
2358
+ * [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
2359
+ *
2360
+ * @param {Callback<number | undefined> =} callback
2361
+ **/
2362
+ nextAssetId: GenericStorageQuery<Rv, () => number | undefined>;
2253
2363
  /**
2254
2364
  * Generic pallet storage query
2255
2365
  **/
@@ -2883,19 +2993,27 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2883
2993
  **/
2884
2994
  childBounties: {
2885
2995
  /**
2886
- * Number of total child bounties.
2996
+ * DEPRECATED: Replaced with `ParentTotalChildBounties` storage item keeping dedicated counts
2997
+ * for each parent bounty. Number of total child bounties. Will be removed in May 2025.
2887
2998
  *
2888
2999
  * @param {Callback<number> =} callback
2889
3000
  **/
2890
3001
  childBountyCount: GenericStorageQuery<Rv, () => number>;
2891
3002
  /**
2892
- * Number of child bounties per parent bounty.
3003
+ * Number of active child bounties per parent bounty.
2893
3004
  * Map of parent bounty index to number of child bounties.
2894
3005
  *
2895
3006
  * @param {number} arg
2896
3007
  * @param {Callback<number> =} callback
2897
3008
  **/
2898
3009
  parentChildBounties: GenericStorageQuery<Rv, (arg: number) => number, number>;
3010
+ /**
3011
+ * Number of total child bounties per parent bounty, including completed bounties.
3012
+ *
3013
+ * @param {number} arg
3014
+ * @param {Callback<number> =} callback
3015
+ **/
3016
+ parentTotalChildBounties: GenericStorageQuery<Rv, (arg: number) => number, number>;
2899
3017
  /**
2900
3018
  * Child bounties that have been added.
2901
3019
  *
@@ -2907,12 +3025,25 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2907
3025
  number
2908
3026
  ]>;
2909
3027
  /**
2910
- * The description of each child-bounty.
3028
+ * The description of each child-bounty. Indexed by `(parent_id, child_id)`.
2911
3029
  *
2912
- * @param {number} arg
3030
+ * This item replaces the `ChildBountyDescriptions` storage item from the V0 storage version.
3031
+ *
3032
+ * @param {[number, number]} arg
2913
3033
  * @param {Callback<Bytes | undefined> =} callback
2914
3034
  **/
2915
- childBountyDescriptions: GenericStorageQuery<Rv, (arg: number) => Bytes | undefined, number>;
3035
+ childBountyDescriptionsV1: GenericStorageQuery<Rv, (arg: [number, number]) => Bytes | undefined, [number, number]>;
3036
+ /**
3037
+ * The mapping of the child bounty ids from storage version `V0` to the new `V1` version.
3038
+ *
3039
+ * The `V0` ids based on total child bounty count [`ChildBountyCount`]`. The `V1` version ids
3040
+ * based on the child bounty count per parent bounty [`ParentTotalChildBounties`].
3041
+ * The item intended solely for client convenience and not used in the pallet's core logic.
3042
+ *
3043
+ * @param {number} arg
3044
+ * @param {Callback<[number, number] | undefined> =} callback
3045
+ **/
3046
+ v0ToV1ChildBountyIds: GenericStorageQuery<Rv, (arg: number) => [number, number] | undefined, number>;
2916
3047
  /**
2917
3048
  * The cumulative child-bounty curator fee for each parent bounty.
2918
3049
  *
@@ -3037,6 +3168,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3037
3168
  * @param {Callback<KitchensinkRuntimeRuntimeCall | undefined> =} callback
3038
3169
  **/
3039
3170
  proposalOf: GenericStorageQuery<Rv, (arg: H256) => KitchensinkRuntimeRuntimeCall | undefined, H256>;
3171
+ /**
3172
+ * Consideration cost created for publishing and storing a proposal.
3173
+ *
3174
+ * Determined by [Config::Consideration] and may be not present for certain proposals (e.g. if
3175
+ * the proposal count at the time of creation was below threshold N).
3176
+ *
3177
+ * @param {H256} arg
3178
+ * @param {Callback<[AccountId32, []] | undefined> =} callback
3179
+ **/
3180
+ costOf: GenericStorageQuery<Rv, (arg: H256) => [AccountId32, []] | undefined, H256>;
3040
3181
  /**
3041
3182
  * Votes on a given proposal, if it is ongoing.
3042
3183
  *
@@ -3057,7 +3198,7 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3057
3198
  **/
3058
3199
  members: GenericStorageQuery<Rv, () => Array<AccountId32>>;
3059
3200
  /**
3060
- * The prime member that helps determine the default vote behavior in case of absentations.
3201
+ * The prime member that helps determine the default vote behavior in case of abstentions.
3061
3202
  *
3062
3203
  * @param {Callback<AccountId32 | undefined> =} callback
3063
3204
  **/
@@ -3682,14 +3823,16 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3682
3823
  **/
3683
3824
  saleInfo: GenericStorageQuery<Rv, () => PalletBrokerSaleInfoRecord | undefined>;
3684
3825
  /**
3685
- * Records of allowed renewals.
3826
+ * Records of potential renewals.
3827
+ *
3828
+ * Renewals will only actually be allowed if `CompletionStatus` is actually `Complete`.
3686
3829
  *
3687
- * @param {PalletBrokerAllowedRenewalId} arg
3688
- * @param {Callback<PalletBrokerAllowedRenewalRecord | undefined> =} callback
3830
+ * @param {PalletBrokerPotentialRenewalId} arg
3831
+ * @param {Callback<PalletBrokerPotentialRenewalRecord | undefined> =} callback
3689
3832
  **/
3690
- allowedRenewals: GenericStorageQuery<Rv, (arg: PalletBrokerAllowedRenewalId) => PalletBrokerAllowedRenewalRecord | undefined, PalletBrokerAllowedRenewalId>;
3833
+ potentialRenewals: GenericStorageQuery<Rv, (arg: PalletBrokerPotentialRenewalId) => PalletBrokerPotentialRenewalRecord | undefined, PalletBrokerPotentialRenewalId>;
3691
3834
  /**
3692
- * The current (unassigned) Regions.
3835
+ * The current (unassigned or provisionally assigend) Regions.
3693
3836
  *
3694
3837
  * @param {PalletBrokerRegionId} arg
3695
3838
  * @param {Callback<PalletBrokerRegionRecord | undefined> =} callback
@@ -3739,6 +3882,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3739
3882
  * @param {Callback<number | undefined> =} callback
3740
3883
  **/
3741
3884
  coreCountInbox: GenericStorageQuery<Rv, () => number | undefined>;
3885
+ /**
3886
+ * Keeping track of cores which have auto-renewal enabled.
3887
+ *
3888
+ * Sorted by `CoreIndex` to make the removal of cores from auto-renewal more efficient.
3889
+ *
3890
+ * @param {Callback<Array<PalletBrokerAutoRenewalRecord>> =} callback
3891
+ **/
3892
+ autoRenewals: GenericStorageQuery<Rv, () => Array<PalletBrokerAutoRenewalRecord>>;
3893
+ /**
3894
+ * Received revenue info from the relay chain.
3895
+ *
3896
+ * @param {Callback<PalletBrokerOnDemandRevenueRecord | undefined> =} callback
3897
+ **/
3898
+ revenueInbox: GenericStorageQuery<Rv, () => PalletBrokerOnDemandRevenueRecord | undefined>;
3742
3899
  /**
3743
3900
  * Generic pallet storage query
3744
3901
  **/
@@ -3826,4 +3983,85 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
3826
3983
  **/
3827
3984
  [storage: string]: GenericStorageQuery<Rv>;
3828
3985
  };
3986
+ /**
3987
+ * Pallet `PalletExampleMbms`'s storage queries
3988
+ **/
3989
+ palletExampleMbms: {
3990
+ /**
3991
+ * Define a storage item to illustrate multi-block migrations.
3992
+ *
3993
+ * @param {number} arg
3994
+ * @param {Callback<bigint | undefined> =} callback
3995
+ **/
3996
+ myMap: GenericStorageQuery<Rv, (arg: number) => bigint | undefined, number>;
3997
+ /**
3998
+ * Generic pallet storage query
3999
+ **/
4000
+ [storage: string]: GenericStorageQuery<Rv>;
4001
+ };
4002
+ /**
4003
+ * Pallet `Revive`'s storage queries
4004
+ **/
4005
+ revive: {
4006
+ /**
4007
+ * A mapping from a contract's code hash to its code.
4008
+ *
4009
+ * @param {H256} arg
4010
+ * @param {Callback<Bytes | undefined> =} callback
4011
+ **/
4012
+ pristineCode: GenericStorageQuery<Rv, (arg: H256) => Bytes | undefined, H256>;
4013
+ /**
4014
+ * A mapping from a contract's code hash to its code info.
4015
+ *
4016
+ * @param {H256} arg
4017
+ * @param {Callback<PalletReviveWasmCodeInfo | undefined> =} callback
4018
+ **/
4019
+ codeInfoOf: GenericStorageQuery<Rv, (arg: H256) => PalletReviveWasmCodeInfo | undefined, H256>;
4020
+ /**
4021
+ * The code associated with a given account.
4022
+ *
4023
+ * @param {H160} arg
4024
+ * @param {Callback<PalletReviveStorageContractInfo | undefined> =} callback
4025
+ **/
4026
+ contractInfoOf: GenericStorageQuery<Rv, (arg: H160) => PalletReviveStorageContractInfo | undefined, H160>;
4027
+ /**
4028
+ * The immutable data associated with a given account.
4029
+ *
4030
+ * @param {H160} arg
4031
+ * @param {Callback<Bytes | undefined> =} callback
4032
+ **/
4033
+ immutableDataOf: GenericStorageQuery<Rv, (arg: H160) => Bytes | undefined, H160>;
4034
+ /**
4035
+ * Evicted contracts that await child trie deletion.
4036
+ *
4037
+ * Child trie deletion is a heavy operation depending on the amount of storage items
4038
+ * stored in said trie. Therefore this operation is performed lazily in `on_idle`.
4039
+ *
4040
+ * @param {number} arg
4041
+ * @param {Callback<Bytes | undefined> =} callback
4042
+ **/
4043
+ deletionQueue: GenericStorageQuery<Rv, (arg: number) => Bytes | undefined, number>;
4044
+ /**
4045
+ * A pair of monotonic counters used to track the latest contract marked for deletion
4046
+ * and the latest deleted contract in queue.
4047
+ *
4048
+ * @param {Callback<PalletReviveStorageDeletionQueueManager> =} callback
4049
+ **/
4050
+ deletionQueueCounter: GenericStorageQuery<Rv, () => PalletReviveStorageDeletionQueueManager>;
4051
+ /**
4052
+ * Map a Ethereum address to its original `AccountId32`.
4053
+ *
4054
+ * Stores the last 12 byte for addresses that were originally an `AccountId32` instead
4055
+ * of an `H160`. Register your `AccountId32` using [`Pallet::map_account`] in order to
4056
+ * use it with this pallet.
4057
+ *
4058
+ * @param {H160} arg
4059
+ * @param {Callback<FixedBytes<12> | undefined> =} callback
4060
+ **/
4061
+ addressSuffix: GenericStorageQuery<Rv, (arg: H160) => FixedBytes<12> | undefined, H160>;
4062
+ /**
4063
+ * Generic pallet storage query
4064
+ **/
4065
+ [storage: string]: GenericStorageQuery<Rv>;
4066
+ };
3829
4067
  }