augment-api-query.ts 57 KB

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