augment-api-query.ts 51 KB

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