augment-api-query.ts 58 KB

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