augment-api-query.ts 53 KB

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