augment-api-query.ts 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189
  1. // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
  2. /* eslint-disable */
  3. import type { Bytes, Option, Vec, bool, u32, u64 } from '@polkadot/types';
  4. import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
  5. import type { Application, ApplicationId, ApplicationOf, Category, CategoryId, Channel, ChannelId, Class, ClassId, ClassOf, ClassPermissionsType, ContentId, Credential, Curator, CuratorApplication, CuratorApplicationId, CuratorGroup, CuratorGroupId, CuratorId, CuratorOpening, CuratorOpeningId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, ElectionStage, ElectionStake, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, HiringApplicationId, InputValidationLengthConstraint, Lead, LeadId, MemberId, Membership, MemoText, Mint, MintId, Opening, OpeningId, OpeningOf, PaidMembershipTerms, PaidTermId, Post, PostId, Principal, PrincipalId, PropertyId, ProposalDetailsOf, ProposalId, ProposalOf, Recipient, RecipientId, RewardRelationship, RewardRelationshipId, SealedVote, Seats, ServiceProviderRecord, Stake, StakeId, StorageProviderId, Thread, ThreadCounter, ThreadId, TransferableStake, Url, VoteKind, WorkerId, WorkerOf, WorkingGroupUnstaker } from './all';
  6. import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
  7. import type { BabeAuthorityWeight, MaybeRandomness, NextConfigDescriptor, Randomness } from '@polkadot/types/interfaces/babe';
  8. import type { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances';
  9. import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
  10. import type { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
  11. import type { AuthIndex } from '@polkadot/types/interfaces/imOnline';
  12. import type { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
  13. import type { AccountId, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, Perbill, Releases, ValidatorId } from '@polkadot/types/interfaces/runtime';
  14. import type { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
  15. import type { ActiveEraInfo, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
  16. import type { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
  17. import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
  18. import type { ApiTypes } from '@polkadot/api/types';
  19. declare module '@polkadot/api/types/storage' {
  20. export interface AugmentedQueries<ApiType> {
  21. authorship: {
  22. /**
  23. * Author of current block.
  24. **/
  25. author: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>, []>;
  26. /**
  27. * Whether uncles were already set in this block.
  28. **/
  29. didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  30. /**
  31. * Uncles
  32. **/
  33. uncles: AugmentedQuery<ApiType, () => Observable<Vec<UncleEntryItem>>, []>;
  34. };
  35. babe: {
  36. /**
  37. * Current epoch authorities.
  38. **/
  39. authorities: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>>, []>;
  40. /**
  41. * Current slot number.
  42. **/
  43. currentSlot: AugmentedQuery<ApiType, () => Observable<u64>, []>;
  44. /**
  45. * Current epoch index.
  46. **/
  47. epochIndex: AugmentedQuery<ApiType, () => Observable<u64>, []>;
  48. /**
  49. * The slot at which the first epoch actually started. This is 0
  50. * until the first block of the chain.
  51. **/
  52. genesisSlot: AugmentedQuery<ApiType, () => Observable<u64>, []>;
  53. /**
  54. * Temporary value (cleared at block finalization) which is `Some`
  55. * if per-block initialization has already been called for current block.
  56. **/
  57. initialized: AugmentedQuery<ApiType, () => Observable<Option<MaybeRandomness>>, []>;
  58. /**
  59. * How late the current block is compared to its parent.
  60. *
  61. * This entry is populated as part of block execution and is cleaned up
  62. * on block finalization. Querying this storage entry outside of block
  63. * execution context should always yield zero.
  64. **/
  65. lateness: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  66. /**
  67. * Next epoch configuration, if changed.
  68. **/
  69. nextEpochConfig: AugmentedQuery<ApiType, () => Observable<Option<NextConfigDescriptor>>, []>;
  70. /**
  71. * Next epoch randomness.
  72. **/
  73. nextRandomness: AugmentedQuery<ApiType, () => Observable<Randomness>, []>;
  74. /**
  75. * The epoch randomness for the *current* epoch.
  76. *
  77. * # Security
  78. *
  79. * This MUST NOT be used for gambling, as it can be influenced by a
  80. * malicious validator in the short term. It MAY be used in many
  81. * cryptographic protocols, however, so long as one remembers that this
  82. * (like everything else on-chain) it is public. For example, it can be
  83. * used where a number is needed that cannot have been chosen by an
  84. * adversary, for purposes such as public-coin zero-knowledge proofs.
  85. **/
  86. randomness: AugmentedQuery<ApiType, () => Observable<Randomness>, []>;
  87. /**
  88. * Randomness under construction.
  89. *
  90. * We make a tradeoff between storage accesses and list length.
  91. * We store the under-construction randomness in segments of up to
  92. * `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.
  93. *
  94. * Once a segment reaches this length, we begin the next one.
  95. * We reset all segments and return to `0` at the beginning of every
  96. * epoch.
  97. **/
  98. segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  99. /**
  100. * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
  101. **/
  102. underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Randomness>>, [u32]>;
  103. };
  104. balances: {
  105. /**
  106. * The balance of an account.
  107. *
  108. * NOTE: This is only used in the case that this module is used to store balances.
  109. **/
  110. account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>, [AccountId]>;
  111. /**
  112. * Any liquidity locks on some account balances.
  113. * NOTE: Should only be accessed when setting, changing and freeing a lock.
  114. **/
  115. locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<BalanceLock>>, [AccountId]>;
  116. /**
  117. * Storage version of the pallet.
  118. *
  119. * This is set to v2.0.0 for new networks.
  120. **/
  121. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
  122. /**
  123. * The total units issued in the system.
  124. **/
  125. totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>, []>;
  126. };
  127. contentDirectory: {
  128. /**
  129. * Map, representing ClassId -> Class relation
  130. **/
  131. classById: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<ClassOf>, [ClassId]>;
  132. /**
  133. * Map, representing CuratorGroupId -> CuratorGroup relation
  134. **/
  135. curatorGroupById: AugmentedQuery<ApiType, (arg: CuratorGroupId | AnyNumber | Uint8Array) => Observable<CuratorGroup>, [CuratorGroupId]>;
  136. /**
  137. * Map, representing EntityId -> Entity relation
  138. **/
  139. entityById: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<EntityOf>, [EntityId]>;
  140. entityCreationVouchers: AugmentedQueryDoubleMap<ApiType, (key1: ClassId | AnyNumber | Uint8Array, key2: EntityController | { Maintainers: any } | { Member: any } | { Lead: any } | string | Uint8Array) => Observable<EntityCreationVoucher>, [ClassId, EntityController]>;
  141. /**
  142. * Next runtime storage values used to maintain next id value, used on creation of respective curator groups, classes and entities
  143. **/
  144. nextClassId: AugmentedQuery<ApiType, () => Observable<ClassId>, []>;
  145. nextCuratorGroupId: AugmentedQuery<ApiType, () => Observable<CuratorGroupId>, []>;
  146. nextEntityId: AugmentedQuery<ApiType, () => Observable<EntityId>, []>;
  147. /**
  148. * Mapping of class id and its property id to the respective entity id and property value hash.
  149. **/
  150. uniquePropertyValueHashes: AugmentedQueryDoubleMap<ApiType, (key1: ITuple<[ClassId, PropertyId]> | [ClassId | AnyNumber | Uint8Array, PropertyId | AnyNumber | Uint8Array], key2: Hash | string | Uint8Array) => Observable<ITuple<[]>>, [ITuple<[ClassId, PropertyId]>, Hash]>;
  151. };
  152. contentDirectoryWorkingGroup: {
  153. /**
  154. * Count of active workers.
  155. **/
  156. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  157. /**
  158. * Maps identifier to worker application on opening.
  159. **/
  160. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<ApplicationOf>, [ApplicationId]>;
  161. /**
  162. * The current lead.
  163. **/
  164. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>, []>;
  165. /**
  166. * Map member id by hiring application id.
  167. * Required by StakingEventsHandler callback call to refund the balance on unstaking.
  168. **/
  169. memberIdByHiringApplicationId: AugmentedQuery<ApiType, (arg: HiringApplicationId | AnyNumber | Uint8Array) => Observable<MemberId>, [HiringApplicationId]>;
  170. /**
  171. * The mint currently funding the rewards for this module.
  172. **/
  173. mint: AugmentedQuery<ApiType, () => Observable<MintId>, []>;
  174. /**
  175. * Next identifier value for new worker application.
  176. **/
  177. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>, []>;
  178. /**
  179. * Next identifier value for new worker opening.
  180. **/
  181. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>, []>;
  182. /**
  183. * Next identifier for new worker.
  184. **/
  185. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>, []>;
  186. /**
  187. * Maps identifier to worker opening.
  188. **/
  189. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<OpeningOf>, [OpeningId]>;
  190. /**
  191. * Opening human readable text length limits
  192. **/
  193. openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  194. /**
  195. * Worker application human readable text length limits
  196. **/
  197. workerApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  198. /**
  199. * Maps identifier to corresponding worker.
  200. **/
  201. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<WorkerOf>, [WorkerId]>;
  202. /**
  203. * Worker exit rationale text length limits.
  204. **/
  205. workerExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  206. };
  207. contentWorkingGroup: {
  208. channelAvatarConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  209. channelBannerConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  210. /**
  211. * Maps identifier to corresponding channel.
  212. **/
  213. channelById: AugmentedQuery<ApiType, (arg: ChannelId | AnyNumber | Uint8Array) => Observable<Channel>, [ChannelId]>;
  214. /**
  215. * Whether it is currently possible to create a channel via `create_channel` extrinsic.
  216. **/
  217. channelCreationEnabled: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  218. channelDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  219. channelHandleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  220. /**
  221. * Maps (unique) channel handle to the corresponding identifier for the channel.
  222. * Mapping is required to allow efficient (O(log N)) on-chain verification that a proposed handle is indeed unique
  223. * at the time it is being proposed.
  224. **/
  225. channelIdByHandle: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<ChannelId>, [Bytes]>;
  226. channelTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  227. /**
  228. * Maps identifier to curator application on opening.
  229. **/
  230. curatorApplicationById: AugmentedQuery<ApiType, (arg: CuratorApplicationId | AnyNumber | Uint8Array) => Observable<CuratorApplication>, [CuratorApplicationId]>;
  231. curatorApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  232. /**
  233. * Maps identifier to corresponding curator.
  234. **/
  235. curatorById: AugmentedQuery<ApiType, (arg: CuratorId | AnyNumber | Uint8Array) => Observable<Curator>, [CuratorId]>;
  236. curatorExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  237. /**
  238. * Maps identifeir to curator opening.
  239. **/
  240. curatorOpeningById: AugmentedQuery<ApiType, (arg: CuratorOpeningId | AnyNumber | Uint8Array) => Observable<CuratorOpening>, [CuratorOpeningId]>;
  241. /**
  242. * The current lead.
  243. **/
  244. currentLeadId: AugmentedQuery<ApiType, () => Observable<Option<LeadId>>, []>;
  245. /**
  246. * Maps identifier to corresponding lead.
  247. **/
  248. leadById: AugmentedQuery<ApiType, (arg: LeadId | AnyNumber | Uint8Array) => Observable<Lead>, [LeadId]>;
  249. /**
  250. * The mint currently funding the rewards for this module.
  251. **/
  252. mint: AugmentedQuery<ApiType, () => Observable<MintId>, []>;
  253. /**
  254. * Identifier to be used by the next channel introduced.
  255. **/
  256. nextChannelId: AugmentedQuery<ApiType, () => Observable<ChannelId>, []>;
  257. /**
  258. * Next identifier value for new curator application.
  259. **/
  260. nextCuratorApplicationId: AugmentedQuery<ApiType, () => Observable<CuratorApplicationId>, []>;
  261. /**
  262. * Next identifier for new curator.
  263. **/
  264. nextCuratorId: AugmentedQuery<ApiType, () => Observable<CuratorId>, []>;
  265. /**
  266. * Next identifier valuefor new curator opening.
  267. **/
  268. nextCuratorOpeningId: AugmentedQuery<ApiType, () => Observable<CuratorOpeningId>, []>;
  269. /**
  270. * Next identifier for new current lead.
  271. **/
  272. nextLeadId: AugmentedQuery<ApiType, () => Observable<LeadId>, []>;
  273. /**
  274. * Next identifier for
  275. **/
  276. nextPrincipalId: AugmentedQuery<ApiType, () => Observable<PrincipalId>, []>;
  277. openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  278. /**
  279. * Maps identifier to principal.
  280. **/
  281. principalById: AugmentedQuery<ApiType, (arg: PrincipalId | AnyNumber | Uint8Array) => Observable<Principal>, [PrincipalId]>;
  282. /**
  283. * Recover curator by the role stake which is currently unstaking.
  284. **/
  285. unstakerByStakeId: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<WorkingGroupUnstaker>, [StakeId]>;
  286. };
  287. council: {
  288. activeCouncil: AugmentedQuery<ApiType, () => Observable<Seats>, []>;
  289. /**
  290. * Reward amount paid out at each PayoutInterval
  291. **/
  292. amountPerPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
  293. /**
  294. * The mint that funds council member rewards and spending proposals budget
  295. **/
  296. councilMint: AugmentedQuery<ApiType, () => Observable<MintId>, []>;
  297. /**
  298. * How many blocks after the reward is created, the first payout will be made
  299. **/
  300. firstPayoutAfterRewardCreated: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  301. /**
  302. * Optional interval in blocks on which a reward payout will be made to each council member
  303. **/
  304. payoutInterval: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>, []>;
  305. /**
  306. * The reward relationships currently in place. There may not necessarily be a 1-1 correspondance with
  307. * the active council, since there are multiple ways of setting/adding/removing council members, some of which
  308. * do not involve creating a relationship.
  309. **/
  310. rewardRelationships: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardRelationshipId>, [AccountId]>;
  311. termEndsAt: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  312. };
  313. councilElection: {
  314. announcingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  315. applicants: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>, []>;
  316. applicantStakes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ElectionStake>, [AccountId]>;
  317. autoStart: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  318. candidacyLimit: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  319. commitments: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>, []>;
  320. councilSize: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  321. existingStakeHolders: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>, []>;
  322. minCouncilStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
  323. minVotingStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
  324. newTermDuration: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  325. revealingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  326. round: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  327. stage: AugmentedQuery<ApiType, () => Observable<Option<ElectionStage>>, []>;
  328. transferableStakes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<TransferableStake>, [AccountId]>;
  329. votes: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<SealedVote>, [Hash]>;
  330. votingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  331. };
  332. dataDirectory: {
  333. /**
  334. * Maps data objects by their content id.
  335. **/
  336. dataObjectByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Option<DataObject>>, [ContentId]>;
  337. /**
  338. * List of ids known to the frame_system.
  339. **/
  340. knownContentIds: AugmentedQuery<ApiType, () => Observable<Vec<ContentId>>, []>;
  341. };
  342. dataObjectStorageRegistry: {
  343. /**
  344. * Defines first relationship id.
  345. **/
  346. firstRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>, []>;
  347. /**
  348. * Defines next relationship id.
  349. **/
  350. nextRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>, []>;
  351. /**
  352. * Mapping of Data object types
  353. **/
  354. relationships: AugmentedQuery<ApiType, (arg: DataObjectStorageRelationshipId | AnyNumber | Uint8Array) => Observable<Option<DataObjectStorageRelationship>>, [DataObjectStorageRelationshipId]>;
  355. /**
  356. * Keeps a list of storage relationships per content id.
  357. **/
  358. relationshipsByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Vec<DataObjectStorageRelationshipId>>, [ContentId]>;
  359. };
  360. dataObjectTypeRegistry: {
  361. /**
  362. * Mapping of Data object types.
  363. **/
  364. dataObjectTypes: AugmentedQuery<ApiType, (arg: DataObjectTypeId | AnyNumber | Uint8Array) => Observable<Option<DataObjectType>>, [DataObjectTypeId]>;
  365. /**
  366. * Data object type ids should start at this value.
  367. **/
  368. firstDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>, []>;
  369. /**
  370. * Provides id counter for the data object types.
  371. **/
  372. nextDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>, []>;
  373. };
  374. discovery: {
  375. /**
  376. * Mapping of service providers' storage provider id to their ServiceProviderRecord
  377. **/
  378. accountInfoByStorageProviderId: AugmentedQuery<ApiType, (arg: StorageProviderId | AnyNumber | Uint8Array) => Observable<ServiceProviderRecord>, [StorageProviderId]>;
  379. /**
  380. * Bootstrap endpoints maintained by root
  381. **/
  382. bootstrapEndpoints: AugmentedQuery<ApiType, () => Observable<Vec<Url>>, []>;
  383. /**
  384. * Lifetime of an ServiceProviderRecord record in AccountInfoByAccountId map
  385. **/
  386. defaultLifetime: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  387. };
  388. forum: {
  389. /**
  390. * Map category identifier to corresponding category.
  391. **/
  392. categoryById: AugmentedQuery<ApiType, (arg: CategoryId | AnyNumber | Uint8Array) => Observable<Category>, [CategoryId]>;
  393. categoryDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  394. /**
  395. * Input constraints
  396. * These are all forward looking, that is they are enforced on all
  397. * future calls.
  398. **/
  399. categoryTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  400. /**
  401. * Account of forum sudo.
  402. **/
  403. forumSudo: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>, []>;
  404. /**
  405. * Category identifier value to be used for the next Category created.
  406. **/
  407. nextCategoryId: AugmentedQuery<ApiType, () => Observable<CategoryId>, []>;
  408. /**
  409. * Post identifier value to be used for for next post created.
  410. **/
  411. nextPostId: AugmentedQuery<ApiType, () => Observable<PostId>, []>;
  412. /**
  413. * Thread identifier value to be used for next Thread in threadById.
  414. **/
  415. nextThreadId: AugmentedQuery<ApiType, () => Observable<ThreadId>, []>;
  416. /**
  417. * Map post identifier to corresponding post.
  418. **/
  419. postById: AugmentedQuery<ApiType, (arg: PostId | AnyNumber | Uint8Array) => Observable<Post>, [PostId]>;
  420. postModerationRationaleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  421. postTextConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  422. /**
  423. * Map thread identifier to corresponding thread.
  424. **/
  425. threadById: AugmentedQuery<ApiType, (arg: ThreadId | AnyNumber | Uint8Array) => Observable<Thread>, [ThreadId]>;
  426. threadModerationRationaleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  427. threadTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  428. };
  429. grandpa: {
  430. /**
  431. * The number of changes (both in terms of keys and underlying economic responsibilities)
  432. * in the "set" of Grandpa validators from genesis.
  433. **/
  434. currentSetId: AugmentedQuery<ApiType, () => Observable<SetId>, []>;
  435. /**
  436. * next block number where we can force a change.
  437. **/
  438. nextForced: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>, []>;
  439. /**
  440. * Pending change: (signaled at, scheduled change).
  441. **/
  442. pendingChange: AugmentedQuery<ApiType, () => Observable<Option<StoredPendingChange>>, []>;
  443. /**
  444. * A mapping from grandpa set ID to the index of the *most recent* session for which its
  445. * members were responsible.
  446. *
  447. * TWOX-NOTE: `SetId` is not under user control.
  448. **/
  449. setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>, [SetId]>;
  450. /**
  451. * `true` if we are currently stalled.
  452. **/
  453. stalled: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[BlockNumber, BlockNumber]>>>, []>;
  454. /**
  455. * State of the current authority set.
  456. **/
  457. state: AugmentedQuery<ApiType, () => Observable<StoredState>, []>;
  458. };
  459. hiring: {
  460. /**
  461. * Applications
  462. **/
  463. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>, [ApplicationId]>;
  464. /**
  465. * Internal purpose of given stake, i.e. fro what application, and whether for the role or for the application.
  466. **/
  467. applicationIdByStakingId: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<ApplicationId>, [StakeId]>;
  468. /**
  469. * Identifier for next application to be added.
  470. **/
  471. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>, []>;
  472. /**
  473. * Identifier for next opening to be added.
  474. **/
  475. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>, []>;
  476. /**
  477. * Openings.
  478. **/
  479. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>, [OpeningId]>;
  480. };
  481. imOnline: {
  482. /**
  483. * For each session index, we keep a mapping of `T::ValidatorId` to the
  484. * number of blocks authored by the given authority.
  485. **/
  486. authoredBlocks: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<u32>, [SessionIndex, ValidatorId]>;
  487. /**
  488. * The block number after which it's ok to send heartbeats in current session.
  489. *
  490. * At the beginning of each session we set this to a value that should
  491. * fall roughly in the middle of the session duration.
  492. * The idea is to first wait for the validators to produce a block
  493. * in the current session, so that the heartbeat later on will not be necessary.
  494. **/
  495. heartbeatAfter: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  496. /**
  497. * The current set of keys that may issue a heartbeat.
  498. **/
  499. keys: AugmentedQuery<ApiType, () => Observable<Vec<AuthorityId>>, []>;
  500. /**
  501. * For each session index, we keep a mapping of `AuthIndex` to
  502. * `offchain::OpaqueNetworkState`.
  503. **/
  504. receivedHeartbeats: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [SessionIndex, AuthIndex]>;
  505. };
  506. members: {
  507. /**
  508. * Active Paid membership terms
  509. **/
  510. activePaidMembershipTerms: AugmentedQuery<ApiType, () => Observable<Vec<PaidTermId>>, []>;
  511. maxAboutTextLength: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  512. maxAvatarUriLength: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  513. maxHandleLength: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  514. /**
  515. * Registered unique handles and their mapping to their owner
  516. **/
  517. memberIdByHandle: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<MemberId>, [Bytes]>;
  518. /**
  519. * Mapping of a controller account id to vector of member ids it controls
  520. **/
  521. memberIdsByControllerAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>, [AccountId]>;
  522. /**
  523. * Mapping of a root account id to vector of member ids it controls.
  524. **/
  525. memberIdsByRootAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>, [AccountId]>;
  526. /**
  527. * Mapping of member's id to their membership profile
  528. **/
  529. membershipById: AugmentedQuery<ApiType, (arg: MemberId | AnyNumber | Uint8Array) => Observable<Membership>, [MemberId]>;
  530. minHandleLength: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  531. /**
  532. * Is the platform is accepting new members or not
  533. **/
  534. newMembershipsAllowed: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  535. /**
  536. * MemberId to assign to next member that is added to the registry, and is also the
  537. * total number of members created. MemberIds start at Zero.
  538. **/
  539. nextMemberId: AugmentedQuery<ApiType, () => Observable<MemberId>, []>;
  540. /**
  541. * Next paid membership terms id
  542. **/
  543. nextPaidMembershipTermsId: AugmentedQuery<ApiType, () => Observable<PaidTermId>, []>;
  544. /**
  545. * Paid membership terms record
  546. **/
  547. paidMembershipTermsById: AugmentedQuery<ApiType, (arg: PaidTermId | AnyNumber | Uint8Array) => Observable<PaidMembershipTerms>, [PaidTermId]>;
  548. screeningAuthority: AugmentedQuery<ApiType, () => Observable<AccountId>, []>;
  549. };
  550. memo: {
  551. maxMemoLength: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  552. memo: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<MemoText>, [AccountId]>;
  553. };
  554. minting: {
  555. /**
  556. * Mints
  557. **/
  558. mints: AugmentedQuery<ApiType, (arg: MintId | AnyNumber | Uint8Array) => Observable<Mint>, [MintId]>;
  559. /**
  560. * The number of mints created.
  561. **/
  562. mintsCreated: AugmentedQuery<ApiType, () => Observable<MintId>, []>;
  563. };
  564. offences: {
  565. /**
  566. * A vector of reports of the same kind that happened at the same time slot.
  567. **/
  568. concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>, [Kind, OpaqueTimeSlot]>;
  569. /**
  570. * Deferred reports that have been rejected by the offence handler and need to be submitted
  571. * at a later time.
  572. **/
  573. deferredOffences: AugmentedQuery<ApiType, () => Observable<Vec<DeferredOffenceOf>>, []>;
  574. /**
  575. * The primary structure that holds all offence records keyed by report identifiers.
  576. **/
  577. reports: AugmentedQuery<ApiType, (arg: ReportIdOf | string | Uint8Array) => Observable<Option<OffenceDetails>>, [ReportIdOf]>;
  578. /**
  579. * Enumerates all reports of a kind along with the time they happened.
  580. *
  581. * All reports are sorted by the time of offence.
  582. *
  583. * Note that the actual type of this mapping is `Vec<u8>`, this is because values of
  584. * different types are not supported at the moment so we are doing the manual serialization.
  585. **/
  586. reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>, [Kind]>;
  587. };
  588. proposalsCodex: {
  589. /**
  590. * Grace period for the 'add working group opening' proposal
  591. **/
  592. addWorkingGroupOpeningProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  593. /**
  594. * Voting period for the 'add working group opening' proposal
  595. **/
  596. addWorkingGroupOpeningProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  597. /**
  598. * Grace period for the 'begin review working group leader applications' proposal
  599. **/
  600. beginReviewWorkingGroupLeaderApplicationsProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  601. /**
  602. * Voting period for the 'begin review working group leader applications' proposal
  603. **/
  604. beginReviewWorkingGroupLeaderApplicationsProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  605. /**
  606. * Grace period for the 'decrease working group leader stake' proposal
  607. **/
  608. decreaseWorkingGroupLeaderStakeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  609. /**
  610. * Voting period for the 'decrease working group leader stake' proposal
  611. **/
  612. decreaseWorkingGroupLeaderStakeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  613. /**
  614. * Grace period for the 'fill working group leader opening' proposal
  615. **/
  616. fillWorkingGroupLeaderOpeningProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  617. /**
  618. * Voting period for the 'fill working group leader opening' proposal
  619. **/
  620. fillWorkingGroupLeaderOpeningProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  621. /**
  622. * Map proposal id to proposal details
  623. **/
  624. proposalDetailsByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalDetailsOf>, [ProposalId]>;
  625. /**
  626. * Grace period for the 'runtime upgrade' proposal
  627. **/
  628. runtimeUpgradeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  629. /**
  630. * Voting period for the 'runtime upgrade' proposal
  631. **/
  632. runtimeUpgradeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  633. /**
  634. * Grace period for the 'set election parameters' proposal
  635. **/
  636. setElectionParametersProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  637. /**
  638. * Voting period for the 'set election parameters' proposal
  639. **/
  640. setElectionParametersProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  641. /**
  642. * Grace period for the 'set validator count' proposal
  643. **/
  644. setValidatorCountProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  645. /**
  646. * Voting period for the 'set validator count' proposal
  647. **/
  648. setValidatorCountProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  649. /**
  650. * Grace period for the 'set working group leader reward' proposal
  651. **/
  652. setWorkingGroupLeaderRewardProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  653. /**
  654. * Voting period for the 'set working group leader reward' proposal
  655. **/
  656. setWorkingGroupLeaderRewardProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  657. /**
  658. * Grace period for the 'set working group mint capacity' proposal
  659. **/
  660. setWorkingGroupMintCapacityProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  661. /**
  662. * Voting period for the 'set working group mint capacity' proposal
  663. **/
  664. setWorkingGroupMintCapacityProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  665. /**
  666. * Grace period for the 'slash working group leader stake' proposal
  667. **/
  668. slashWorkingGroupLeaderStakeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  669. /**
  670. * Voting period for the 'slash working group leader stake' proposal
  671. **/
  672. slashWorkingGroupLeaderStakeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  673. /**
  674. * Grace period for the 'spending' proposal
  675. **/
  676. spendingProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  677. /**
  678. * Voting period for the 'spending' proposal
  679. **/
  680. spendingProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  681. /**
  682. * Grace period for the 'terminate working group leader role' proposal
  683. **/
  684. terminateWorkingGroupLeaderRoleProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  685. /**
  686. * Voting period for the 'terminate working group leader role' proposal
  687. **/
  688. terminateWorkingGroupLeaderRoleProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  689. /**
  690. * Grace period for the 'text' proposal
  691. **/
  692. textProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  693. /**
  694. * Voting period for the 'text' proposal
  695. **/
  696. textProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  697. /**
  698. * Map proposal id to its discussion thread id
  699. **/
  700. threadIdByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ThreadId>, [ProposalId]>;
  701. };
  702. proposalsDiscussion: {
  703. /**
  704. * Last author thread counter (part of the antispam mechanism)
  705. **/
  706. lastThreadAuthorCounter: AugmentedQuery<ApiType, () => Observable<Option<ThreadCounter>>, []>;
  707. /**
  708. * Count of all posts that have been created.
  709. **/
  710. postCount: AugmentedQuery<ApiType, () => Observable<u64>, []>;
  711. /**
  712. * Map thread id and post id to corresponding post.
  713. **/
  714. postThreadIdByPostId: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: PostId | AnyNumber | Uint8Array) => Observable<DiscussionPost>, [ThreadId, PostId]>;
  715. /**
  716. * Map thread identifier to corresponding thread.
  717. **/
  718. threadById: AugmentedQuery<ApiType, (arg: ThreadId | AnyNumber | Uint8Array) => Observable<DiscussionThread>, [ThreadId]>;
  719. /**
  720. * Count of all threads that have been created.
  721. **/
  722. threadCount: AugmentedQuery<ApiType, () => Observable<u64>, []>;
  723. };
  724. proposalsEngine: {
  725. /**
  726. * Count of active proposals.
  727. **/
  728. activeProposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  729. /**
  730. * Ids of proposals that are open for voting (have not been finalized yet).
  731. **/
  732. activeProposalIds: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ITuple<[]>>, [ProposalId]>;
  733. /**
  734. * Map proposal executable code by proposal id.
  735. **/
  736. dispatchableCallCode: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<Bytes>, [ProposalId]>;
  737. /**
  738. * Ids of proposals that were approved and theirs grace period was not expired.
  739. **/
  740. pendingExecutionProposalIds: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ITuple<[]>>, [ProposalId]>;
  741. /**
  742. * Count of all proposals that have been created.
  743. **/
  744. proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  745. /**
  746. * Map proposal by its id.
  747. **/
  748. proposals: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalOf>, [ProposalId]>;
  749. /**
  750. * Map proposal id by stake id. Required by StakingEventsHandler callback call
  751. **/
  752. stakesProposals: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<ProposalId>, [StakeId]>;
  753. /**
  754. * Double map for preventing duplicate votes. Should be cleaned after usage.
  755. **/
  756. voteExistsByProposalByVoter: AugmentedQueryDoubleMap<ApiType, (key1: ProposalId | AnyNumber | Uint8Array, key2: MemberId | AnyNumber | Uint8Array) => Observable<VoteKind>, [ProposalId, MemberId]>;
  757. };
  758. randomnessCollectiveFlip: {
  759. /**
  760. * Series of block headers from the last 81 blocks that acts as random seed material. This
  761. * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
  762. * the oldest hash.
  763. **/
  764. randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>, []>;
  765. };
  766. recurringRewards: {
  767. recipients: AugmentedQuery<ApiType, (arg: RecipientId | AnyNumber | Uint8Array) => Observable<Recipient>, [RecipientId]>;
  768. recipientsCreated: AugmentedQuery<ApiType, () => Observable<RecipientId>, []>;
  769. rewardRelationships: AugmentedQuery<ApiType, (arg: RewardRelationshipId | AnyNumber | Uint8Array) => Observable<RewardRelationship>, [RewardRelationshipId]>;
  770. rewardRelationshipsCreated: AugmentedQuery<ApiType, () => Observable<RewardRelationshipId>, []>;
  771. };
  772. session: {
  773. /**
  774. * Current index of the session.
  775. **/
  776. currentIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>, []>;
  777. /**
  778. * Indices of disabled validators.
  779. *
  780. * The set is cleared when `on_session_ending` returns a new set of identities.
  781. **/
  782. disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []>;
  783. /**
  784. * The owner of a key. The key is the `KeyTypeId` + the encoded key.
  785. **/
  786. keyOwner: AugmentedQuery<ApiType, (arg: ITuple<[KeyTypeId, Bytes]> | [KeyTypeId | AnyNumber | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<ValidatorId>>, [ITuple<[KeyTypeId, Bytes]>]>;
  787. /**
  788. * The next session keys for a validator.
  789. **/
  790. nextKeys: AugmentedQuery<ApiType, (arg: ValidatorId | string | Uint8Array) => Observable<Option<Keys>>, [ValidatorId]>;
  791. /**
  792. * True if the underlying economic identities or weighting behind the validators
  793. * has changed in the queued validator set.
  794. **/
  795. queuedChanged: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  796. /**
  797. * The queued keys for the next session. When the next session begins, these keys
  798. * will be used to determine the validator's session keys.
  799. **/
  800. queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[ValidatorId, Keys]>>>, []>;
  801. /**
  802. * The current set of validators.
  803. **/
  804. validators: AugmentedQuery<ApiType, () => Observable<Vec<ValidatorId>>, []>;
  805. };
  806. stake: {
  807. /**
  808. * Maps identifiers to a stake.
  809. **/
  810. stakes: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<Stake>, [StakeId]>;
  811. /**
  812. * Identifier value for next stake, and count of total stakes created (not necessarily the number of current
  813. * stakes in the Stakes map as stakes can be removed.)
  814. **/
  815. stakesCreated: AugmentedQuery<ApiType, () => Observable<StakeId>, []>;
  816. };
  817. staking: {
  818. /**
  819. * The active era information, it holds index and start.
  820. *
  821. * The active era is the era currently rewarded.
  822. * Validator set of this era must be equal to `SessionInterface::validators`.
  823. **/
  824. activeEra: AugmentedQuery<ApiType, () => Observable<Option<ActiveEraInfo>>, []>;
  825. /**
  826. * Map from all locked "stash" accounts to the controller account.
  827. **/
  828. bonded: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>, [AccountId]>;
  829. /**
  830. * A mapping from still-bonded eras to the first session index of that era.
  831. *
  832. * Must contains information for eras for the range:
  833. * `[active_era - bounding_duration; active_era]`
  834. **/
  835. bondedEras: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EraIndex, SessionIndex]>>>, []>;
  836. /**
  837. * The amount of currency given to reporters of a slash event which was
  838. * canceled by extraordinary circumstances (e.g. governance).
  839. **/
  840. canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
  841. /**
  842. * The current era index.
  843. *
  844. * This is the latest planned era, depending on how the Session pallet queues the validator
  845. * set, it might be active or not.
  846. **/
  847. currentEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>, []>;
  848. /**
  849. * The earliest era for which we have a pending, unapplied slash.
  850. **/
  851. earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>, []>;
  852. /**
  853. * Flag to control the execution of the offchain election. When `Open(_)`, we accept
  854. * solutions to be submitted.
  855. **/
  856. eraElectionStatus: AugmentedQuery<ApiType, () => Observable<ElectionStatus>, []>;
  857. /**
  858. * Rewards for the last `HISTORY_DEPTH` eras.
  859. * If reward hasn't been set or has been removed then 0 reward is returned.
  860. **/
  861. erasRewardPoints: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<EraRewardPoints>, [EraIndex]>;
  862. /**
  863. * Exposure of validator at era.
  864. *
  865. * This is keyed first by the era index to allow bulk deletion and then the stash account.
  866. *
  867. * Is it removed after `HISTORY_DEPTH` eras.
  868. * If stakers hasn't been set or has been removed then empty exposure is returned.
  869. **/
  870. erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]>;
  871. /**
  872. * Clipped Exposure of validator at era.
  873. *
  874. * This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the
  875. * `T::MaxNominatorRewardedPerValidator` biggest stakers.
  876. * (Note: the field `total` and `own` of the exposure remains unchanged).
  877. * This is used to limit the i/o cost for the nominator payout.
  878. *
  879. * This is keyed fist by the era index to allow bulk deletion and then the stash account.
  880. *
  881. * Is it removed after `HISTORY_DEPTH` eras.
  882. * If stakers hasn't been set or has been removed then empty exposure is returned.
  883. **/
  884. erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>, [EraIndex, AccountId]>;
  885. /**
  886. * The session index at which the era start for the last `HISTORY_DEPTH` eras.
  887. **/
  888. erasStartSessionIndex: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>, [EraIndex]>;
  889. /**
  890. * The total amount staked for the last `HISTORY_DEPTH` eras.
  891. * If total hasn't been set or has been removed then 0 stake is returned.
  892. **/
  893. erasTotalStake: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<BalanceOf>, [EraIndex]>;
  894. /**
  895. * Similar to `ErasStakers`, this holds the preferences of validators.
  896. *
  897. * This is keyed first by the era index to allow bulk deletion and then the stash account.
  898. *
  899. * Is it removed after `HISTORY_DEPTH` eras.
  900. **/
  901. erasValidatorPrefs: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>, [EraIndex, AccountId]>;
  902. /**
  903. * The total validator era payout for the last `HISTORY_DEPTH` eras.
  904. *
  905. * Eras that haven't finished yet or has been removed doesn't have reward.
  906. **/
  907. erasValidatorReward: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<BalanceOf>>, [EraIndex]>;
  908. /**
  909. * Mode of era forcing.
  910. **/
  911. forceEra: AugmentedQuery<ApiType, () => Observable<Forcing>, []>;
  912. /**
  913. * Number of eras to keep in history.
  914. *
  915. * Information is kept for eras in `[current_era - history_depth; current_era]`.
  916. *
  917. * Must be more than the number of eras delayed by session otherwise. I.e. active era must
  918. * always be in history. I.e. `active_era > current_era - history_depth` must be
  919. * guaranteed.
  920. **/
  921. historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  922. /**
  923. * Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
  924. * easy to initialize and the performance hit is minimal (we expect no more than four
  925. * invulnerables) and restricted to testnets.
  926. **/
  927. invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>, []>;
  928. /**
  929. * True if the current **planned** session is final. Note that this does not take era
  930. * forcing into account.
  931. **/
  932. isCurrentSessionFinal: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  933. /**
  934. * Map from all (unlocked) "controller" accounts to the info regarding the staking.
  935. **/
  936. ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>, [AccountId]>;
  937. /**
  938. * Minimum number of staking participants before emergency conditions are imposed.
  939. **/
  940. minimumValidatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  941. /**
  942. * The map from nominator stash key to the set of stash keys of all validators to nominate.
  943. **/
  944. nominators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Nominations>>, [AccountId]>;
  945. /**
  946. * All slashing events on nominators, mapped by era to the highest slash value of the era.
  947. **/
  948. nominatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>, [EraIndex, AccountId]>;
  949. /**
  950. * Where the reward payment should be made. Keyed by stash.
  951. **/
  952. payee: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardDestination>, [AccountId]>;
  953. /**
  954. * The next validator set. At the end of an era, if this is available (potentially from the
  955. * result of an offchain worker), it is immediately used. Otherwise, the on-chain election
  956. * is executed.
  957. **/
  958. queuedElected: AugmentedQuery<ApiType, () => Observable<Option<ElectionResult>>, []>;
  959. /**
  960. * The score of the current [`QueuedElected`].
  961. **/
  962. queuedScore: AugmentedQuery<ApiType, () => Observable<Option<ElectionScore>>, []>;
  963. /**
  964. * Slashing spans for stash accounts.
  965. **/
  966. slashingSpans: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<SlashingSpans>>, [AccountId]>;
  967. /**
  968. * The percentage of the slash that is distributed to reporters.
  969. *
  970. * The rest of the slashed value is handled by the `Slash`.
  971. **/
  972. slashRewardFraction: AugmentedQuery<ApiType, () => Observable<Perbill>, []>;
  973. /**
  974. * Snapshot of nominators at the beginning of the current election window. This should only
  975. * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
  976. **/
  977. snapshotNominators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>, []>;
  978. /**
  979. * Snapshot of validators at the beginning of the current election window. This should only
  980. * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
  981. **/
  982. snapshotValidators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>, []>;
  983. /**
  984. * Records information about the maximum slash of a stash within a slashing span,
  985. * as well as how much reward has been paid out.
  986. **/
  987. spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId, SpanIndex]> | [AccountId | string | Uint8Array, SpanIndex | AnyNumber | Uint8Array]) => Observable<SpanRecord>, [ITuple<[AccountId, SpanIndex]>]>;
  988. /**
  989. * True if network has been upgraded to this version.
  990. * Storage version of the pallet.
  991. *
  992. * This is set to v3.0.0 for new networks.
  993. **/
  994. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
  995. /**
  996. * All unapplied slashes that are queued for later.
  997. **/
  998. unappliedSlashes: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Vec<UnappliedSlash>>, [EraIndex]>;
  999. /**
  1000. * The ideal number of staking participants.
  1001. **/
  1002. validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  1003. /**
  1004. * The map from (wannabe) validator stash key to the preferences of that validator.
  1005. **/
  1006. validators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>, [AccountId]>;
  1007. /**
  1008. * All slashing events on validators, mapped by era to the highest slash proportion
  1009. * and slash value of the era.
  1010. **/
  1011. validatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>, [EraIndex, AccountId]>;
  1012. };
  1013. storageWorkingGroup: {
  1014. /**
  1015. * Count of active workers.
  1016. **/
  1017. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;
  1018. /**
  1019. * Maps identifier to worker application on opening.
  1020. **/
  1021. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<ApplicationOf>, [ApplicationId]>;
  1022. /**
  1023. * The current lead.
  1024. **/
  1025. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>, []>;
  1026. /**
  1027. * Map member id by hiring application id.
  1028. * Required by StakingEventsHandler callback call to refund the balance on unstaking.
  1029. **/
  1030. memberIdByHiringApplicationId: AugmentedQuery<ApiType, (arg: HiringApplicationId | AnyNumber | Uint8Array) => Observable<MemberId>, [HiringApplicationId]>;
  1031. /**
  1032. * The mint currently funding the rewards for this module.
  1033. **/
  1034. mint: AugmentedQuery<ApiType, () => Observable<MintId>, []>;
  1035. /**
  1036. * Next identifier value for new worker application.
  1037. **/
  1038. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>, []>;
  1039. /**
  1040. * Next identifier value for new worker opening.
  1041. **/
  1042. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>, []>;
  1043. /**
  1044. * Next identifier for new worker.
  1045. **/
  1046. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>, []>;
  1047. /**
  1048. * Maps identifier to worker opening.
  1049. **/
  1050. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<OpeningOf>, [OpeningId]>;
  1051. /**
  1052. * Opening human readable text length limits
  1053. **/
  1054. openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1055. /**
  1056. * Worker application human readable text length limits
  1057. **/
  1058. workerApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1059. /**
  1060. * Maps identifier to corresponding worker.
  1061. **/
  1062. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<WorkerOf>, [WorkerId]>;
  1063. /**
  1064. * Worker exit rationale text length limits.
  1065. **/
  1066. workerExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1067. };
  1068. sudo: {
  1069. /**
  1070. * The `AccountId` of the sudo key.
  1071. **/
  1072. key: AugmentedQuery<ApiType, () => Observable<AccountId>, []>;
  1073. };
  1074. system: {
  1075. /**
  1076. * The full account information for a particular account ID.
  1077. **/
  1078. account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountInfo>, [AccountId]>;
  1079. /**
  1080. * Total length (in bytes) for all extrinsics put together, for the current block.
  1081. **/
  1082. allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;
  1083. /**
  1084. * Map of block numbers to block hashes.
  1085. **/
  1086. blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>, [BlockNumber]>;
  1087. /**
  1088. * The current weight for the block.
  1089. **/
  1090. blockWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>, []>;
  1091. /**
  1092. * Digest of the current block, also part of the block header.
  1093. **/
  1094. digest: AugmentedQuery<ApiType, () => Observable<DigestOf>, []>;
  1095. /**
  1096. * The number of events in the `Events<T>` list.
  1097. **/
  1098. eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>, []>;
  1099. /**
  1100. * Events deposited for the current block.
  1101. **/
  1102. events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>, []>;
  1103. /**
  1104. * Mapping between a topic (represented by T::Hash) and a vector of indexes
  1105. * of events in the `<Events<T>>` list.
  1106. *
  1107. * All topic vectors have deterministic storage locations depending on the topic. This
  1108. * allows light-clients to leverage the changes trie storage tracking mechanism and
  1109. * in case of changes fetch the list of events of interest.
  1110. *
  1111. * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
  1112. * the `EventIndex` then in case if the topic has the same contents on the next block
  1113. * no notification will be triggered thus the event might be lost.
  1114. **/
  1115. eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>, [Hash]>;
  1116. /**
  1117. * The execution phase of the block.
  1118. **/
  1119. executionPhase: AugmentedQuery<ApiType, () => Observable<Option<Phase>>, []>;
  1120. /**
  1121. * Total extrinsics count for the current block.
  1122. **/
  1123. extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;
  1124. /**
  1125. * Extrinsics data for the current block (maps an extrinsic's index to its data).
  1126. **/
  1127. extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]>;
  1128. /**
  1129. * Extrinsics root of the current block, also part of the block header.
  1130. **/
  1131. extrinsicsRoot: AugmentedQuery<ApiType, () => Observable<Hash>, []>;
  1132. /**
  1133. * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
  1134. **/
  1135. lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<LastRuntimeUpgradeInfo>>, []>;
  1136. /**
  1137. * The current block number being processed. Set by `execute_block`.
  1138. **/
  1139. number: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
  1140. /**
  1141. * Hash of the previous block.
  1142. **/
  1143. parentHash: AugmentedQuery<ApiType, () => Observable<Hash>, []>;
  1144. /**
  1145. * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
  1146. **/
  1147. upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  1148. };
  1149. timestamp: {
  1150. /**
  1151. * Did the timestamp get updated in this block?
  1152. **/
  1153. didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []>;
  1154. /**
  1155. * Current time for the current block.
  1156. **/
  1157. now: AugmentedQuery<ApiType, () => Observable<Moment>, []>;
  1158. };
  1159. transactionPayment: {
  1160. nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>, []>;
  1161. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
  1162. };
  1163. versionedStore: {
  1164. classById: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<Class>, [ClassId]>;
  1165. classDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1166. classNameConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1167. entityById: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<Entity>, [EntityId]>;
  1168. nextClassId: AugmentedQuery<ApiType, () => Observable<ClassId>, []>;
  1169. nextEntityId: AugmentedQuery<ApiType, () => Observable<EntityId>, []>;
  1170. propertyDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1171. propertyNameConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>, []>;
  1172. };
  1173. versionedStorePermissions: {
  1174. /**
  1175. * ClassPermissions of corresponding Classes in the versioned store
  1176. **/
  1177. classPermissionsByClassId: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<ClassPermissionsType>, [ClassId]>;
  1178. /**
  1179. * Owner of an entity in the versioned store. If it is None then it is owned by the frame_system.
  1180. **/
  1181. entityMaintainerByEntityId: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<Option<Credential>>, [EntityId]>;
  1182. };
  1183. }
  1184. export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
  1185. }
  1186. }