augment-api-query.ts 57 KB

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