augment-api-query.ts 57 KB

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