augment-api-query.ts 53 KB

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