augment-api-query.ts 51 KB

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