augment-api-query.ts 60 KB

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