augment-api-query.ts 57 KB

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