augment-api-query.ts 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  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, u8 } from '@polkadot/types/primitive';
  6. import { Application, ApplicationId, BountyActor, BountyId, Candidate, CastVoteOf, Category, CategoryId, ClassId, ClassOf, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStageUpdate, CuratorGroup, CuratorGroupId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, EntityController, EntityCreationVoucher, EntityId, EntityOf, Entry, EntryId, ForumUserId, MemberId, Membership, MemoText, ModeratorId, Opening, OpeningId, Post, PostId, PropertyId, ProposalId, ProposalOf, ReferendumStage, Reply, ReplyId, ServiceProviderRecord, StakingAccountMemberBinding, StorageProviderId, ThreadId, ThreadOf, Url, VoteKind, Worker, WorkerId } 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 { Bounty } from '@polkadot/types/interfaces/treasury';
  19. import { Multiplier } from '@polkadot/types/interfaces/txpayment';
  20. import { ApiTypes } from '@polkadot/api/types';
  21. declare module '@polkadot/api/types/storage' {
  22. export interface AugmentedQueries<ApiType> {
  23. authorship: {
  24. /**
  25. * Author of current block.
  26. **/
  27. author: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>>;
  28. /**
  29. * Whether uncles were already set in this block.
  30. **/
  31. didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>>;
  32. /**
  33. * Uncles
  34. **/
  35. uncles: AugmentedQuery<ApiType, () => Observable<Vec<UncleEntryItem>>>;
  36. };
  37. babe: {
  38. /**
  39. * Current epoch authorities.
  40. **/
  41. authorities: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>>>;
  42. /**
  43. * Current slot number.
  44. **/
  45. currentSlot: AugmentedQuery<ApiType, () => Observable<u64>>;
  46. /**
  47. * Current epoch index.
  48. **/
  49. epochIndex: AugmentedQuery<ApiType, () => Observable<u64>>;
  50. /**
  51. * The slot at which the first epoch actually started. This is 0
  52. * until the first block of the chain.
  53. **/
  54. genesisSlot: AugmentedQuery<ApiType, () => Observable<u64>>;
  55. /**
  56. * Temporary value (cleared at block finalization) which is `Some`
  57. * if per-block initialization has already been called for current block.
  58. **/
  59. initialized: AugmentedQuery<ApiType, () => Observable<Option<MaybeRandomness>>>;
  60. /**
  61. * How late the current block is compared to its parent.
  62. *
  63. * This entry is populated as part of block execution and is cleaned up
  64. * on block finalization. Querying this storage entry outside of block
  65. * execution context should always yield zero.
  66. **/
  67. lateness: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  68. /**
  69. * Next epoch configuration, if changed.
  70. **/
  71. nextEpochConfig: AugmentedQuery<ApiType, () => Observable<Option<NextConfigDescriptor>>>;
  72. /**
  73. * Next epoch randomness.
  74. **/
  75. nextRandomness: AugmentedQuery<ApiType, () => Observable<Randomness>>;
  76. /**
  77. * The epoch randomness for the *current* epoch.
  78. *
  79. * # Security
  80. *
  81. * This MUST NOT be used for gambling, as it can be influenced by a
  82. * malicious validator in the short term. It MAY be used in many
  83. * cryptographic protocols, however, so long as one remembers that this
  84. * (like everything else on-chain) it is public. For example, it can be
  85. * used where a number is needed that cannot have been chosen by an
  86. * adversary, for purposes such as public-coin zero-knowledge proofs.
  87. **/
  88. randomness: AugmentedQuery<ApiType, () => Observable<Randomness>>;
  89. /**
  90. * Randomness under construction.
  91. *
  92. * We make a tradeoff between storage accesses and list length.
  93. * We store the under-construction randomness in segments of up to
  94. * `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.
  95. *
  96. * Once a segment reaches this length, we begin the next one.
  97. * We reset all segments and return to `0` at the beginning of every
  98. * epoch.
  99. **/
  100. segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>>;
  101. /**
  102. * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
  103. **/
  104. underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Randomness>>>;
  105. };
  106. balances: {
  107. /**
  108. * The balance of an account.
  109. *
  110. * NOTE: This is only used in the case that this module is used to store balances.
  111. **/
  112. account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>>;
  113. /**
  114. * Any liquidity locks on some account balances.
  115. * NOTE: Should only be accessed when setting, changing and freeing a lock.
  116. **/
  117. locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<BalanceLock>>>;
  118. /**
  119. * Storage version of the pallet.
  120. *
  121. * This is set to v2.0.0 for new networks.
  122. **/
  123. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
  124. /**
  125. * The total units issued in the system.
  126. **/
  127. totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>>;
  128. };
  129. blog: {
  130. /**
  131. * Post by unique blog and post identificators
  132. **/
  133. postById: AugmentedQuery<ApiType, (arg: PostId | AnyNumber | Uint8Array) => Observable<Post>>;
  134. /**
  135. * Maps, representing id => item relationship for blogs, posts and replies related structures
  136. * Post count
  137. **/
  138. postCount: AugmentedQuery<ApiType, () => Observable<PostId>>;
  139. /**
  140. * Reply by unique blog, post and reply identificators
  141. **/
  142. replyById: AugmentedQueryDoubleMap<ApiType, (key1: PostId | AnyNumber | Uint8Array, key2: ReplyId | AnyNumber | Uint8Array) => Observable<Reply>>;
  143. };
  144. bounty: {
  145. /**
  146. * Bounty storage.
  147. **/
  148. bounties: AugmentedQuery<ApiType, (arg: BountyId | AnyNumber | Uint8Array) => Observable<Bounty>>;
  149. /**
  150. * Double map for bounty funding. It stores a member or council funding for bounties.
  151. **/
  152. bountyContributions: AugmentedQueryDoubleMap<ApiType, (key1: BountyId | AnyNumber | Uint8Array, key2: BountyActor | { Council: any } | { Member: any } | string | Uint8Array) => Observable<BalanceOf>>;
  153. /**
  154. * Count of all bounties that have been created.
  155. **/
  156. bountyCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  157. /**
  158. * Work entry storage map.
  159. **/
  160. entries: AugmentedQuery<ApiType, (arg: EntryId | AnyNumber | Uint8Array) => Observable<Entry>>;
  161. /**
  162. * Count of all work entries that have been created.
  163. **/
  164. entryCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  165. };
  166. constitution: {
  167. constitution: AugmentedQuery<ApiType, () => Observable<ConstitutionInfo>>;
  168. };
  169. contentDirectory: {
  170. /**
  171. * Map, representing ClassId -> Class relation
  172. **/
  173. classById: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<ClassOf>>;
  174. /**
  175. * Map, representing CuratorGroupId -> CuratorGroup relation
  176. **/
  177. curatorGroupById: AugmentedQuery<ApiType, (arg: CuratorGroupId | AnyNumber | Uint8Array) => Observable<CuratorGroup>>;
  178. /**
  179. * Map, representing EntityId -> Entity relation
  180. **/
  181. entityById: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<EntityOf>>;
  182. entityCreationVouchers: AugmentedQueryDoubleMap<ApiType, (key1: ClassId | AnyNumber | Uint8Array, key2: EntityController | { Maintainers: any } | { Member: any } | { Lead: any } | string | Uint8Array) => Observable<EntityCreationVoucher>>;
  183. /**
  184. * Next runtime storage values used to maintain next id value, used on creation of respective curator groups, classes and entities
  185. **/
  186. nextClassId: AugmentedQuery<ApiType, () => Observable<ClassId>>;
  187. nextCuratorGroupId: AugmentedQuery<ApiType, () => Observable<CuratorGroupId>>;
  188. nextEntityId: AugmentedQuery<ApiType, () => Observable<EntityId>>;
  189. /**
  190. * Mapping of class id and its property id to the respective entity id and property value hash.
  191. **/
  192. uniquePropertyValueHashes: AugmentedQueryDoubleMap<ApiType, (key1: ITuple<[ClassId, PropertyId]> | [ClassId | AnyNumber | Uint8Array, PropertyId | AnyNumber | Uint8Array], key2: Hash | string | Uint8Array) => Observable<ITuple<[]>>>;
  193. };
  194. contentDirectoryWorkingGroup: {
  195. /**
  196. * Count of active workers.
  197. **/
  198. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  199. /**
  200. * Maps identifier to worker application on opening.
  201. **/
  202. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>>;
  203. /**
  204. * Budget for the working group.
  205. **/
  206. budget: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  207. /**
  208. * Current group lead.
  209. **/
  210. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
  211. /**
  212. * Next identifier value for new worker application.
  213. **/
  214. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
  215. /**
  216. * Next identifier value for new job opening.
  217. **/
  218. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
  219. /**
  220. * Next identifier for a new worker.
  221. **/
  222. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
  223. /**
  224. * Maps identifier to job opening.
  225. **/
  226. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>>;
  227. /**
  228. * Status text hash.
  229. **/
  230. statusTextHash: AugmentedQuery<ApiType, () => Observable<Bytes>>;
  231. /**
  232. * Maps identifier to corresponding worker.
  233. **/
  234. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<Worker>>;
  235. };
  236. council: {
  237. /**
  238. * Index of the current candidacy period. It is incremented everytime announcement period
  239. * starts.
  240. **/
  241. announcementPeriodNr: AugmentedQuery<ApiType, () => Observable<u64>>;
  242. /**
  243. * Budget for the council's elected members rewards.
  244. **/
  245. budget: AugmentedQuery<ApiType, () => Observable<Balance>>;
  246. /**
  247. * Amount of balance to be refilled every budget period
  248. **/
  249. budgetIncrement: AugmentedQuery<ApiType, () => Observable<Balance>>;
  250. /**
  251. * Map of all candidates that ever candidated and haven't unstake yet.
  252. **/
  253. candidates: AugmentedQuery<ApiType, (arg: MemberId | AnyNumber | Uint8Array) => Observable<Candidate>>;
  254. /**
  255. * Current council members
  256. **/
  257. councilMembers: AugmentedQuery<ApiType, () => Observable<Vec<CouncilMemberOf>>>;
  258. /**
  259. * Councilor reward per block
  260. **/
  261. councilorReward: AugmentedQuery<ApiType, () => Observable<Balance>>;
  262. /**
  263. * The next block in which the budget will be increased.
  264. **/
  265. nextBudgetRefill: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  266. /**
  267. * The next block in which the elected council member rewards will be payed.
  268. **/
  269. nextRewardPayments: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  270. /**
  271. * Current council voting stage
  272. **/
  273. stage: AugmentedQuery<ApiType, () => Observable<CouncilStageUpdate>>;
  274. };
  275. dataDirectory: {
  276. /**
  277. * Maps data objects by their content id.
  278. **/
  279. dataObjectByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Option<DataObject>>>;
  280. /**
  281. * List of ids known to the system.
  282. **/
  283. knownContentIds: AugmentedQuery<ApiType, () => Observable<Vec<ContentId>>>;
  284. };
  285. dataObjectStorageRegistry: {
  286. /**
  287. * Defines first relationship id.
  288. **/
  289. firstRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>>;
  290. /**
  291. * Defines next relationship id.
  292. **/
  293. nextRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>>;
  294. /**
  295. * Mapping of Data object types
  296. **/
  297. relationships: AugmentedQuery<ApiType, (arg: DataObjectStorageRelationshipId | AnyNumber | Uint8Array) => Observable<Option<DataObjectStorageRelationship>>>;
  298. /**
  299. * Keeps a list of storage relationships per content id.
  300. **/
  301. relationshipsByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Vec<DataObjectStorageRelationshipId>>>;
  302. };
  303. dataObjectTypeRegistry: {
  304. /**
  305. * Mapping of Data object types.
  306. **/
  307. dataObjectTypes: AugmentedQuery<ApiType, (arg: DataObjectTypeId | AnyNumber | Uint8Array) => Observable<Option<DataObjectType>>>;
  308. /**
  309. * Data object type ids should start at this value.
  310. **/
  311. firstDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>>;
  312. /**
  313. * Provides id counter for the data object types.
  314. **/
  315. nextDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>>;
  316. };
  317. discovery: {
  318. /**
  319. * Mapping of service providers' storage provider id to their ServiceProviderRecord
  320. **/
  321. accountInfoByStorageProviderId: AugmentedQuery<ApiType, (arg: StorageProviderId | AnyNumber | Uint8Array) => Observable<ServiceProviderRecord>>;
  322. /**
  323. * Bootstrap endpoints maintained by root
  324. **/
  325. bootstrapEndpoints: AugmentedQuery<ApiType, () => Observable<Vec<Url>>>;
  326. /**
  327. * Lifetime of an ServiceProviderRecord record in AccountInfoByAccountId map
  328. **/
  329. defaultLifetime: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  330. };
  331. forum: {
  332. /**
  333. * Map category identifier to corresponding category.
  334. **/
  335. categoryById: AugmentedQuery<ApiType, (arg: CategoryId | AnyNumber | Uint8Array) => Observable<Category>>;
  336. /**
  337. * Moderator set for each Category
  338. **/
  339. categoryByModerator: AugmentedQueryDoubleMap<ApiType, (key1: CategoryId | AnyNumber | Uint8Array, key2: ModeratorId | AnyNumber | Uint8Array) => Observable<ITuple<[]>>>;
  340. /**
  341. * Counter for all existing categories.
  342. **/
  343. categoryCounter: AugmentedQuery<ApiType, () => Observable<CategoryId>>;
  344. /**
  345. * If data migration is done, set as configible for unit test purpose
  346. **/
  347. dataMigrationDone: AugmentedQuery<ApiType, () => Observable<bool>>;
  348. /**
  349. * Category identifier value to be used for the next Category created.
  350. **/
  351. nextCategoryId: AugmentedQuery<ApiType, () => Observable<CategoryId>>;
  352. /**
  353. * Post identifier value to be used for for next post created.
  354. **/
  355. nextPostId: AugmentedQuery<ApiType, () => Observable<PostId>>;
  356. /**
  357. * Thread identifier value to be used for next Thread in threadById.
  358. **/
  359. nextThreadId: AugmentedQuery<ApiType, () => Observable<ThreadId>>;
  360. /**
  361. * Unique thread poll voters. This private double map prevents double voting.
  362. **/
  363. pollVotes: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: ForumUserId | AnyNumber | Uint8Array) => Observable<bool>>;
  364. /**
  365. * Map post identifier to corresponding post.
  366. **/
  367. postById: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: PostId | AnyNumber | Uint8Array) => Observable<Post>>;
  368. /**
  369. * Map thread identifier to corresponding thread.
  370. **/
  371. threadById: AugmentedQueryDoubleMap<ApiType, (key1: CategoryId | AnyNumber | Uint8Array, key2: ThreadId | AnyNumber | Uint8Array) => Observable<ThreadOf>>;
  372. };
  373. forumWorkingGroup: {
  374. /**
  375. * Count of active workers.
  376. **/
  377. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  378. /**
  379. * Maps identifier to worker application on opening.
  380. **/
  381. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>>;
  382. /**
  383. * Budget for the working group.
  384. **/
  385. budget: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  386. /**
  387. * Current group lead.
  388. **/
  389. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
  390. /**
  391. * Next identifier value for new worker application.
  392. **/
  393. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
  394. /**
  395. * Next identifier value for new job opening.
  396. **/
  397. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
  398. /**
  399. * Next identifier for a new worker.
  400. **/
  401. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
  402. /**
  403. * Maps identifier to job opening.
  404. **/
  405. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>>;
  406. /**
  407. * Status text hash.
  408. **/
  409. statusTextHash: AugmentedQuery<ApiType, () => Observable<Bytes>>;
  410. /**
  411. * Maps identifier to corresponding worker.
  412. **/
  413. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<Worker>>;
  414. };
  415. grandpa: {
  416. /**
  417. * The number of changes (both in terms of keys and underlying economic responsibilities)
  418. * in the "set" of Grandpa validators from genesis.
  419. **/
  420. currentSetId: AugmentedQuery<ApiType, () => Observable<SetId>>;
  421. /**
  422. * next block number where we can force a change.
  423. **/
  424. nextForced: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>>;
  425. /**
  426. * Pending change: (signaled at, scheduled change).
  427. **/
  428. pendingChange: AugmentedQuery<ApiType, () => Observable<Option<StoredPendingChange>>>;
  429. /**
  430. * A mapping from grandpa set ID to the index of the *most recent* session for which its
  431. * members were responsible.
  432. *
  433. * TWOX-NOTE: `SetId` is not under user control.
  434. **/
  435. setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>>;
  436. /**
  437. * `true` if we are currently stalled.
  438. **/
  439. stalled: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[BlockNumber, BlockNumber]>>>>;
  440. /**
  441. * State of the current authority set.
  442. **/
  443. state: AugmentedQuery<ApiType, () => Observable<StoredState>>;
  444. };
  445. imOnline: {
  446. /**
  447. * For each session index, we keep a mapping of `T::ValidatorId` to the
  448. * number of blocks authored by the given authority.
  449. **/
  450. authoredBlocks: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<u32>>;
  451. /**
  452. * The block number after which it's ok to send heartbeats in current session.
  453. *
  454. * At the beginning of each session we set this to a value that should
  455. * fall roughly in the middle of the session duration.
  456. * The idea is to first wait for the validators to produce a block
  457. * in the current session, so that the heartbeat later on will not be necessary.
  458. **/
  459. heartbeatAfter: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  460. /**
  461. * The current set of keys that may issue a heartbeat.
  462. **/
  463. keys: AugmentedQuery<ApiType, () => Observable<Vec<AuthorityId>>>;
  464. /**
  465. * For each session index, we keep a mapping of `AuthIndex` to
  466. * `offchain::OpaqueNetworkState`.
  467. **/
  468. receivedHeartbeats: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>>;
  469. };
  470. members: {
  471. /**
  472. * Initial invitation balance for the invited member.
  473. **/
  474. initialInvitationBalance: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  475. /**
  476. * Initial invitation count for the newly bought membership.
  477. **/
  478. initialInvitationCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  479. /**
  480. * Registered unique handles hash and their mapping to their owner.
  481. **/
  482. memberIdByHandleHash: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<MemberId>>;
  483. /**
  484. * Mapping of member's id to their membership profile.
  485. **/
  486. membershipById: AugmentedQuery<ApiType, (arg: MemberId | AnyNumber | Uint8Array) => Observable<Membership>>;
  487. /**
  488. * Current membership price.
  489. **/
  490. membershipPrice: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  491. /**
  492. * MemberId to assign to next member that is added to the registry, and is also the
  493. * total number of members created. MemberIds start at Zero.
  494. **/
  495. nextMemberId: AugmentedQuery<ApiType, () => Observable<MemberId>>;
  496. /**
  497. * Referral cut percent of the membership fee to receive on buying the membership.
  498. **/
  499. referralCut: AugmentedQuery<ApiType, () => Observable<u8>>;
  500. /**
  501. * Double of a staking account id and member id to the confirmation status.
  502. **/
  503. stakingAccountIdMemberStatus: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<StakingAccountMemberBinding>>;
  504. };
  505. membershipWorkingGroup: {
  506. /**
  507. * Count of active workers.
  508. **/
  509. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  510. /**
  511. * Maps identifier to worker application on opening.
  512. **/
  513. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>>;
  514. /**
  515. * Budget for the working group.
  516. **/
  517. budget: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  518. /**
  519. * Current group lead.
  520. **/
  521. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
  522. /**
  523. * Next identifier value for new worker application.
  524. **/
  525. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
  526. /**
  527. * Next identifier value for new job opening.
  528. **/
  529. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
  530. /**
  531. * Next identifier for a new worker.
  532. **/
  533. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
  534. /**
  535. * Maps identifier to job opening.
  536. **/
  537. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>>;
  538. /**
  539. * Status text hash.
  540. **/
  541. statusTextHash: AugmentedQuery<ApiType, () => Observable<Bytes>>;
  542. /**
  543. * Maps identifier to corresponding worker.
  544. **/
  545. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<Worker>>;
  546. };
  547. memo: {
  548. maxMemoLength: AugmentedQuery<ApiType, () => Observable<u32>>;
  549. memo: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<MemoText>>;
  550. };
  551. offences: {
  552. /**
  553. * A vector of reports of the same kind that happened at the same time slot.
  554. **/
  555. concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>>;
  556. /**
  557. * Deferred reports that have been rejected by the offence handler and need to be submitted
  558. * at a later time.
  559. **/
  560. deferredOffences: AugmentedQuery<ApiType, () => Observable<Vec<DeferredOffenceOf>>>;
  561. /**
  562. * The primary structure that holds all offence records keyed by report identifiers.
  563. **/
  564. reports: AugmentedQuery<ApiType, (arg: ReportIdOf | string | Uint8Array) => Observable<Option<OffenceDetails>>>;
  565. /**
  566. * Enumerates all reports of a kind along with the time they happened.
  567. *
  568. * All reports are sorted by the time of offence.
  569. *
  570. * Note that the actual type of this mapping is `Vec<u8>`, this is because values of
  571. * different types are not supported at the moment so we are doing the manual serialization.
  572. **/
  573. reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>>;
  574. };
  575. proposalsCodex: {
  576. /**
  577. * Map proposal id to its discussion thread id
  578. **/
  579. threadIdByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ThreadId>>;
  580. };
  581. proposalsDiscussion: {
  582. /**
  583. * Count of all posts that have been created.
  584. **/
  585. postCount: AugmentedQuery<ApiType, () => Observable<u64>>;
  586. /**
  587. * Map thread id and post id to corresponding post.
  588. **/
  589. postThreadIdByPostId: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: PostId | AnyNumber | Uint8Array) => Observable<DiscussionPost>>;
  590. /**
  591. * Map thread identifier to corresponding thread.
  592. **/
  593. threadById: AugmentedQuery<ApiType, (arg: ThreadId | AnyNumber | Uint8Array) => Observable<DiscussionThread>>;
  594. /**
  595. * Count of all threads that have been created.
  596. **/
  597. threadCount: AugmentedQuery<ApiType, () => Observable<u64>>;
  598. };
  599. proposalsEngine: {
  600. /**
  601. * Count of active proposals.
  602. **/
  603. activeProposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  604. /**
  605. * Map proposal executable code by proposal id.
  606. **/
  607. dispatchableCallCode: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<Bytes>>;
  608. /**
  609. * Count of all proposals that have been created.
  610. **/
  611. proposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  612. /**
  613. * Map proposal by its id.
  614. **/
  615. proposals: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalOf>>;
  616. /**
  617. * Double map for preventing duplicate votes. Should be cleaned after usage.
  618. **/
  619. voteExistsByProposalByVoter: AugmentedQueryDoubleMap<ApiType, (key1: ProposalId | AnyNumber | Uint8Array, key2: MemberId | AnyNumber | Uint8Array) => Observable<VoteKind>>;
  620. };
  621. randomnessCollectiveFlip: {
  622. /**
  623. * Series of block headers from the last 81 blocks that acts as random seed material. This
  624. * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
  625. * the oldest hash.
  626. **/
  627. randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>>;
  628. };
  629. referendum: {
  630. /**
  631. * Current referendum stage.
  632. **/
  633. stage: AugmentedQuery<ApiType, () => Observable<ReferendumStage>>;
  634. /**
  635. * Votes cast in the referendum. A new record is added to this map when a user casts a
  636. * sealed vote.
  637. * It is modified when a user reveals the vote's commitment proof.
  638. * A record is finally removed when the user unstakes, which can happen during a voting
  639. * stage or after the current cycle ends.
  640. * A stake for a vote can be reused in future referendum cycles.
  641. **/
  642. votes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<CastVoteOf>>;
  643. };
  644. session: {
  645. /**
  646. * Current index of the session.
  647. **/
  648. currentIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>>;
  649. /**
  650. * Indices of disabled validators.
  651. *
  652. * The set is cleared when `on_session_ending` returns a new set of identities.
  653. **/
  654. disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>>;
  655. /**
  656. * The owner of a key. The key is the `KeyTypeId` + the encoded key.
  657. **/
  658. keyOwner: AugmentedQuery<ApiType, (arg: ITuple<[KeyTypeId, Bytes]> | [KeyTypeId | AnyNumber | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<ValidatorId>>>;
  659. /**
  660. * The next session keys for a validator.
  661. **/
  662. nextKeys: AugmentedQuery<ApiType, (arg: ValidatorId | string | Uint8Array) => Observable<Option<Keys>>>;
  663. /**
  664. * True if the underlying economic identities or weighting behind the validators
  665. * has changed in the queued validator set.
  666. **/
  667. queuedChanged: AugmentedQuery<ApiType, () => Observable<bool>>;
  668. /**
  669. * The queued keys for the next session. When the next session begins, these keys
  670. * will be used to determine the validator's session keys.
  671. **/
  672. queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[ValidatorId, Keys]>>>>;
  673. /**
  674. * The current set of validators.
  675. **/
  676. validators: AugmentedQuery<ApiType, () => Observable<Vec<ValidatorId>>>;
  677. };
  678. staking: {
  679. /**
  680. * The active era information, it holds index and start.
  681. *
  682. * The active era is the era currently rewarded.
  683. * Validator set of this era must be equal to `SessionInterface::validators`.
  684. **/
  685. activeEra: AugmentedQuery<ApiType, () => Observable<Option<ActiveEraInfo>>>;
  686. /**
  687. * Map from all locked "stash" accounts to the controller account.
  688. **/
  689. bonded: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>>;
  690. /**
  691. * A mapping from still-bonded eras to the first session index of that era.
  692. *
  693. * Must contains information for eras for the range:
  694. * `[active_era - bounding_duration; active_era]`
  695. **/
  696. bondedEras: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EraIndex, SessionIndex]>>>>;
  697. /**
  698. * The amount of currency given to reporters of a slash event which was
  699. * canceled by extraordinary circumstances (e.g. governance).
  700. **/
  701. canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  702. /**
  703. * The current era index.
  704. *
  705. * This is the latest planned era, depending on how the Session pallet queues the validator
  706. * set, it might be active or not.
  707. **/
  708. currentEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>>;
  709. /**
  710. * The earliest era for which we have a pending, unapplied slash.
  711. **/
  712. earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>>;
  713. /**
  714. * Flag to control the execution of the offchain election. When `Open(_)`, we accept
  715. * solutions to be submitted.
  716. **/
  717. eraElectionStatus: AugmentedQuery<ApiType, () => Observable<ElectionStatus>>;
  718. /**
  719. * Rewards for the last `HISTORY_DEPTH` eras.
  720. * If reward hasn't been set or has been removed then 0 reward is returned.
  721. **/
  722. erasRewardPoints: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<EraRewardPoints>>;
  723. /**
  724. * Exposure of validator at era.
  725. *
  726. * This is keyed first by the era index to allow bulk deletion and then the stash account.
  727. *
  728. * Is it removed after `HISTORY_DEPTH` eras.
  729. * If stakers hasn't been set or has been removed then empty exposure is returned.
  730. **/
  731. erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>>;
  732. /**
  733. * Clipped Exposure of validator at era.
  734. *
  735. * This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the
  736. * `T::MaxNominatorRewardedPerValidator` biggest stakers.
  737. * (Note: the field `total` and `own` of the exposure remains unchanged).
  738. * This is used to limit the i/o cost for the nominator payout.
  739. *
  740. * This is keyed fist by the era index to allow bulk deletion and then the stash account.
  741. *
  742. * Is it removed after `HISTORY_DEPTH` eras.
  743. * If stakers hasn't been set or has been removed then empty exposure is returned.
  744. **/
  745. erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>>;
  746. /**
  747. * The session index at which the era start for the last `HISTORY_DEPTH` eras.
  748. **/
  749. erasStartSessionIndex: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>>;
  750. /**
  751. * The total amount staked for the last `HISTORY_DEPTH` eras.
  752. * If total hasn't been set or has been removed then 0 stake is returned.
  753. **/
  754. erasTotalStake: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<BalanceOf>>;
  755. /**
  756. * Similar to `ErasStakers`, this holds the preferences of validators.
  757. *
  758. * This is keyed first by the era index to allow bulk deletion and then the stash account.
  759. *
  760. * Is it removed after `HISTORY_DEPTH` eras.
  761. **/
  762. erasValidatorPrefs: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>>;
  763. /**
  764. * The total validator era payout for the last `HISTORY_DEPTH` eras.
  765. *
  766. * Eras that haven't finished yet or has been removed doesn't have reward.
  767. **/
  768. erasValidatorReward: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<BalanceOf>>>;
  769. /**
  770. * Mode of era forcing.
  771. **/
  772. forceEra: AugmentedQuery<ApiType, () => Observable<Forcing>>;
  773. /**
  774. * Number of eras to keep in history.
  775. *
  776. * Information is kept for eras in `[current_era - history_depth; current_era]`.
  777. *
  778. * Must be more than the number of eras delayed by session otherwise. I.e. active era must
  779. * always be in history. I.e. `active_era > current_era - history_depth` must be
  780. * guaranteed.
  781. **/
  782. historyDepth: AugmentedQuery<ApiType, () => Observable<u32>>;
  783. /**
  784. * Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
  785. * easy to initialize and the performance hit is minimal (we expect no more than four
  786. * invulnerables) and restricted to testnets.
  787. **/
  788. invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
  789. /**
  790. * True if the current **planned** session is final. Note that this does not take era
  791. * forcing into account.
  792. **/
  793. isCurrentSessionFinal: AugmentedQuery<ApiType, () => Observable<bool>>;
  794. /**
  795. * Map from all (unlocked) "controller" accounts to the info regarding the staking.
  796. **/
  797. ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>>;
  798. /**
  799. * Minimum number of staking participants before emergency conditions are imposed.
  800. **/
  801. minimumValidatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  802. /**
  803. * The map from nominator stash key to the set of stash keys of all validators to nominate.
  804. **/
  805. nominators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Nominations>>>;
  806. /**
  807. * All slashing events on nominators, mapped by era to the highest slash value of the era.
  808. **/
  809. nominatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>>;
  810. /**
  811. * Where the reward payment should be made. Keyed by stash.
  812. **/
  813. payee: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardDestination>>;
  814. /**
  815. * The next validator set. At the end of an era, if this is available (potentially from the
  816. * result of an offchain worker), it is immediately used. Otherwise, the on-chain election
  817. * is executed.
  818. **/
  819. queuedElected: AugmentedQuery<ApiType, () => Observable<Option<ElectionResult>>>;
  820. /**
  821. * The score of the current [`QueuedElected`].
  822. **/
  823. queuedScore: AugmentedQuery<ApiType, () => Observable<Option<ElectionScore>>>;
  824. /**
  825. * Slashing spans for stash accounts.
  826. **/
  827. slashingSpans: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<SlashingSpans>>>;
  828. /**
  829. * The percentage of the slash that is distributed to reporters.
  830. *
  831. * The rest of the slashed value is handled by the `Slash`.
  832. **/
  833. slashRewardFraction: AugmentedQuery<ApiType, () => Observable<Perbill>>;
  834. /**
  835. * Snapshot of nominators at the beginning of the current election window. This should only
  836. * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
  837. **/
  838. snapshotNominators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>>;
  839. /**
  840. * Snapshot of validators at the beginning of the current election window. This should only
  841. * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
  842. **/
  843. snapshotValidators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>>;
  844. /**
  845. * Records information about the maximum slash of a stash within a slashing span,
  846. * as well as how much reward has been paid out.
  847. **/
  848. spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId, SpanIndex]> | [AccountId | string | Uint8Array, SpanIndex | AnyNumber | Uint8Array]) => Observable<SpanRecord>>;
  849. /**
  850. * True if network has been upgraded to this version.
  851. * Storage version of the pallet.
  852. *
  853. * This is set to v3.0.0 for new networks.
  854. **/
  855. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
  856. /**
  857. * All unapplied slashes that are queued for later.
  858. **/
  859. unappliedSlashes: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Vec<UnappliedSlash>>>;
  860. /**
  861. * The ideal number of staking participants.
  862. **/
  863. validatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  864. /**
  865. * The map from (wannabe) validator stash key to the preferences of that validator.
  866. **/
  867. validators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>>;
  868. /**
  869. * All slashing events on validators, mapped by era to the highest slash proportion
  870. * and slash value of the era.
  871. **/
  872. validatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>>;
  873. };
  874. storageWorkingGroup: {
  875. /**
  876. * Count of active workers.
  877. **/
  878. activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
  879. /**
  880. * Maps identifier to worker application on opening.
  881. **/
  882. applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>>;
  883. /**
  884. * Budget for the working group.
  885. **/
  886. budget: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
  887. /**
  888. * Current group lead.
  889. **/
  890. currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
  891. /**
  892. * Next identifier value for new worker application.
  893. **/
  894. nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
  895. /**
  896. * Next identifier value for new job opening.
  897. **/
  898. nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
  899. /**
  900. * Next identifier for a new worker.
  901. **/
  902. nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
  903. /**
  904. * Maps identifier to job opening.
  905. **/
  906. openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>>;
  907. /**
  908. * Status text hash.
  909. **/
  910. statusTextHash: AugmentedQuery<ApiType, () => Observable<Bytes>>;
  911. /**
  912. * Maps identifier to corresponding worker.
  913. **/
  914. workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<Worker>>;
  915. };
  916. sudo: {
  917. /**
  918. * The `AccountId` of the sudo key.
  919. **/
  920. key: AugmentedQuery<ApiType, () => Observable<AccountId>>;
  921. };
  922. system: {
  923. /**
  924. * The full account information for a particular account ID.
  925. **/
  926. account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountInfo>>;
  927. /**
  928. * Total length (in bytes) for all extrinsics put together, for the current block.
  929. **/
  930. allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
  931. /**
  932. * Map of block numbers to block hashes.
  933. **/
  934. blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>>;
  935. /**
  936. * The current weight for the block.
  937. **/
  938. blockWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>>;
  939. /**
  940. * Digest of the current block, also part of the block header.
  941. **/
  942. digest: AugmentedQuery<ApiType, () => Observable<DigestOf>>;
  943. /**
  944. * The number of events in the `Events<T>` list.
  945. **/
  946. eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>>;
  947. /**
  948. * Events deposited for the current block.
  949. **/
  950. events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>>;
  951. /**
  952. * Mapping between a topic (represented by T::Hash) and a vector of indexes
  953. * of events in the `<Events<T>>` list.
  954. *
  955. * All topic vectors have deterministic storage locations depending on the topic. This
  956. * allows light-clients to leverage the changes trie storage tracking mechanism and
  957. * in case of changes fetch the list of events of interest.
  958. *
  959. * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
  960. * the `EventIndex` then in case if the topic has the same contents on the next block
  961. * no notification will be triggered thus the event might be lost.
  962. **/
  963. eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>>;
  964. /**
  965. * The execution phase of the block.
  966. **/
  967. executionPhase: AugmentedQuery<ApiType, () => Observable<Option<Phase>>>;
  968. /**
  969. * Total extrinsics count for the current block.
  970. **/
  971. extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
  972. /**
  973. * Extrinsics data for the current block (maps an extrinsic's index to its data).
  974. **/
  975. extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>>;
  976. /**
  977. * Extrinsics root of the current block, also part of the block header.
  978. **/
  979. extrinsicsRoot: AugmentedQuery<ApiType, () => Observable<Hash>>;
  980. /**
  981. * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
  982. **/
  983. lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<LastRuntimeUpgradeInfo>>>;
  984. /**
  985. * The current block number being processed. Set by `execute_block`.
  986. **/
  987. number: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
  988. /**
  989. * Hash of the previous block.
  990. **/
  991. parentHash: AugmentedQuery<ApiType, () => Observable<Hash>>;
  992. /**
  993. * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
  994. **/
  995. upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>>;
  996. };
  997. timestamp: {
  998. /**
  999. * Did the timestamp get updated in this block?
  1000. **/
  1001. didUpdate: AugmentedQuery<ApiType, () => Observable<bool>>;
  1002. /**
  1003. * Current time for the current block.
  1004. **/
  1005. now: AugmentedQuery<ApiType, () => Observable<Moment>>;
  1006. };
  1007. transactionPayment: {
  1008. nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>>;
  1009. storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
  1010. };
  1011. }
  1012. export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
  1013. }
  1014. }