augment-api-query.ts 56 KB

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