augment-api-query.ts 52 KB

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