Browse Source

generate:augment-codec

Leszek Wiesner 4 years ago
parent
commit
af0fa72f42

File diff suppressed because it is too large
+ 17 - 0
types/augment-codec/all.ts


+ 203 - 0
types/augment-codec/augment-api-consts.ts

@@ -0,0 +1,203 @@
+// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
+/* eslint-disable */
+
+import { Vec } from '@polkadot/types/codec';
+import { u32, u64 } from '@polkadot/types/primitive';
+import { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
+import { SessionIndex } from '@polkadot/types/interfaces/session';
+import { EraIndex } from '@polkadot/types/interfaces/staking';
+import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
+
+declare module '@polkadot/metadata/Decorated/consts/types' {
+  export interface Constants {
+    babe: {
+      /**
+       * The number of **slots** that an epoch takes. We couple sessions to
+       * epochs, i.e. we start a new session once the new epoch begins.
+       **/
+      epochDuration: AugmentedConst<u64>;
+      /**
+       * The expected average block time at which BABE should be creating
+       * blocks. Since BABE is probabilistic it is not trivial to figure out
+       * what the expected average block time should be based on the slot
+       * duration and the security parameter `c` (where `1 - c` represents
+       * the probability of a slot being empty).
+       **/
+      expectedBlockTime: AugmentedConst<Moment>;
+    };
+    balances: {
+      /**
+       * The minimum amount required to keep an account open.
+       **/
+      existentialDeposit: AugmentedConst<Balance>;
+    };
+    contentDirectoryWorkingGroup: {
+      /**
+       * Exports const -  max simultaneous active worker number.
+       **/
+      maxWorkerNumberLimit: AugmentedConst<u32>;
+    };
+    dataDirectory: {
+      /**
+       * Maximum objects allowed per inject_data_objects() transaction
+       **/
+      maxObjectsPerInjection: AugmentedConst<u32>;
+    };
+    finalityTracker: {
+      /**
+       * The delay after which point things become suspicious. Default is 1000.
+       **/
+      reportLatency: AugmentedConst<BlockNumber>;
+      /**
+       * The number of recent samples to keep from this chain. Default is 101.
+       **/
+      windowSize: AugmentedConst<BlockNumber>;
+    };
+    proposalsCodex: {
+      /**
+       * Exports max wasm code length of the runtime upgrade proposal const.
+       **/
+      runtimeUpgradeWasmProposalMaxLength: AugmentedConst<u32>;
+      /**
+       * Exports max allowed text proposal length const.
+       **/
+      textProposalMaxLength: AugmentedConst<u32>;
+    };
+    proposalsDiscussion: {
+      /**
+       * Exports post edition number limit const.
+       **/
+      maxPostEditionNumber: AugmentedConst<u32>;
+      /**
+       * Exports max thread by same author in a row number limit const.
+       **/
+      maxThreadInARowNumber: AugmentedConst<u32>;
+      /**
+       * Exports post length limit const.
+       **/
+      postLengthLimit: AugmentedConst<u32>;
+      /**
+       * Exports thread title length limit const.
+       **/
+      threadTitleLengthLimit: AugmentedConst<u32>;
+    };
+    proposalsEngine: {
+      /**
+       * Exports const - the fee is applied when cancel the proposal. A fee would be slashed (burned).
+       **/
+      cancellationFee: AugmentedConst<BalanceOf>;
+      /**
+       * Exports const -  max allowed proposal description length.
+       **/
+      descriptionMaxLength: AugmentedConst<u32>;
+      /**
+       * Exports const -  max simultaneous active proposals number.
+       **/
+      maxActiveProposalLimit: AugmentedConst<u32>;
+      /**
+       * Exports const -  the fee is applied when the proposal gets rejected. A fee would be slashed (burned).
+       **/
+      rejectionFee: AugmentedConst<BalanceOf>;
+      /**
+       * Exports const -  max allowed proposal title length.
+       **/
+      titleMaxLength: AugmentedConst<u32>;
+    };
+    staking: {
+      /**
+       * Number of eras that staked funds must remain bonded for.
+       **/
+      bondingDuration: AugmentedConst<EraIndex>;
+      /**
+       * The number of blocks before the end of the era from which election submissions are allowed.
+       * 
+       * Setting this to zero will disable the offchain compute and only on-chain seq-phragmen will
+       * be used.
+       * 
+       * This is bounded by being within the last session. Hence, setting it to a value more than the
+       * length of a session will be pointless.
+       **/
+      electionLookahead: AugmentedConst<BlockNumber>;
+      /**
+       * Maximum number of balancing iterations to run in the offchain submission.
+       * 
+       * If set to 0, balance_solution will not be executed at all.
+       **/
+      maxIterations: AugmentedConst<u32>;
+      /**
+       * The maximum number of nominators rewarded for each validator.
+       * 
+       * For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim
+       * their reward. This used to limit the i/o cost for the nominator payout.
+       **/
+      maxNominatorRewardedPerValidator: AugmentedConst<u32>;
+      /**
+       * The threshold of improvement that should be provided for a new solution to be accepted.
+       **/
+      minSolutionScoreBump: AugmentedConst<Perbill>;
+      /**
+       * Number of sessions per era.
+       **/
+      sessionsPerEra: AugmentedConst<SessionIndex>;
+      /**
+       * Number of eras that slashes are deferred by, after computation.
+       * 
+       * This should be less than the bonding duration.
+       * Set to 0 if slashes should be applied immediately, without opportunity for
+       * intervention.
+       **/
+      slashDeferDuration: AugmentedConst<EraIndex>;
+    };
+    storageWorkingGroup: {
+      /**
+       * Exports const -  max simultaneous active worker number.
+       **/
+      maxWorkerNumberLimit: AugmentedConst<u32>;
+    };
+    system: {
+      /**
+       * The base weight of executing a block, independent of the transactions in the block.
+       **/
+      blockExecutionWeight: AugmentedConst<Weight>;
+      /**
+       * The maximum number of blocks to allow in mortal eras.
+       **/
+      blockHashCount: AugmentedConst<BlockNumber>;
+      /**
+       * The weight of runtime database operations the runtime can invoke.
+       **/
+      dbWeight: AugmentedConst<RuntimeDbWeight>;
+      /**
+       * The base weight of an Extrinsic in the block, independent of the of extrinsic being executed.
+       **/
+      extrinsicBaseWeight: AugmentedConst<Weight>;
+      /**
+       * The maximum length of a block (in bytes).
+       **/
+      maximumBlockLength: AugmentedConst<u32>;
+      /**
+       * The maximum weight of a block.
+       **/
+      maximumBlockWeight: AugmentedConst<Weight>;
+    };
+    timestamp: {
+      /**
+       * The minimum period between blocks. Beware that this is different to the *expected* period
+       * that the block production apparatus provides. Your chosen consensus system will generally
+       * work with this to determine a sensible block time. e.g. For Aura, it will be double this
+       * period on default settings.
+       **/
+      minimumPeriod: AugmentedConst<Moment>;
+    };
+    transactionPayment: {
+      /**
+       * The fee to be paid for making a transaction; the per-byte portion.
+       **/
+      transactionByteFee: AugmentedConst<BalanceOf>;
+      /**
+       * The polynomial that is applied in order to derive fee from weight.
+       **/
+      weightToFee: AugmentedConst<Vec<WeightToFeeCoefficient>>;
+    };
+  }
+}

+ 1202 - 0
types/augment-codec/augment-api-query.ts

@@ -0,0 +1,1202 @@
+// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
+/* eslint-disable */
+
+import { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
+import { Option, Vec } from '@polkadot/types/codec';
+import { Bytes, bool, u32, u64 } from '@polkadot/types/primitive';
+import { Application, ApplicationId, ApplicationOf, Category, CategoryId, Channel, ChannelId, Class, ClassId, ClassPermissionsType, ContentId, Credential, Curator, CuratorApplication, CuratorApplicationId, CuratorGroup, CuratorGroupId, CuratorId, CuratorOpening, CuratorOpeningId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, ElectionStage, ElectionStake, Entity, EntityController, EntityCreationVoucher, EntityId, HiringApplicationId, InputValidationLengthConstraint, Lead, LeadId, MemberId, Membership, MemoText, Mint, MintId, Opening, OpeningId, OpeningOf, PaidMembershipTerms, PaidTermId, Post, PostId, Principal, PrincipalId, PropertyId, ProposalDetailsOf, ProposalId, ProposalOf, Recipient, RecipientId, RewardRelationship, RewardRelationshipId, SealedVote, Seats, ServiceProviderRecord, Stake, StakeId, StorageProviderId, Thread, ThreadCounter, ThreadId, TransferableStake, Url, VoteKind, WorkerId, WorkerOf, WorkingGroupUnstaker } from './all';
+import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
+import { BabeAuthorityWeight, MaybeRandomness, NextConfigDescriptor, Randomness } from '@polkadot/types/interfaces/babe';
+import { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances';
+import { AuthorityId } from '@polkadot/types/interfaces/consensus';
+import { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
+import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
+import { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
+import { AccountId, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, Perbill, Releases, ValidatorId } from '@polkadot/types/interfaces/runtime';
+import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
+import { ActiveEraInfo, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
+import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
+import { Multiplier } from '@polkadot/types/interfaces/txpayment';
+import { ApiTypes } from '@polkadot/api/types';
+
+declare module '@polkadot/api/types/storage' {
+  export interface AugmentedQueries<ApiType> {
+    authorship: {
+      /**
+       * Author of current block.
+       **/
+      author: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>>;
+      /**
+       * Whether uncles were already set in this block.
+       **/
+      didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>>;
+      /**
+       * Uncles
+       **/
+      uncles: AugmentedQuery<ApiType, () => Observable<Vec<UncleEntryItem>>>;
+    };
+    babe: {
+      /**
+       * Current epoch authorities.
+       **/
+      authorities: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>>>;
+      /**
+       * Current slot number.
+       **/
+      currentSlot: AugmentedQuery<ApiType, () => Observable<u64>>;
+      /**
+       * Current epoch index.
+       **/
+      epochIndex: AugmentedQuery<ApiType, () => Observable<u64>>;
+      /**
+       * The slot at which the first epoch actually started. This is 0
+       * until the first block of the chain.
+       **/
+      genesisSlot: AugmentedQuery<ApiType, () => Observable<u64>>;
+      /**
+       * Temporary value (cleared at block finalization) which is `Some`
+       * if per-block initialization has already been called for current block.
+       **/
+      initialized: AugmentedQuery<ApiType, () => Observable<Option<MaybeRandomness>>>;
+      /**
+       * How late the current block is compared to its parent.
+       * 
+       * This entry is populated as part of block execution and is cleaned up
+       * on block finalization. Querying this storage entry outside of block
+       * execution context should always yield zero.
+       **/
+      lateness: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Next epoch configuration, if changed.
+       **/
+      nextEpochConfig: AugmentedQuery<ApiType, () => Observable<Option<NextConfigDescriptor>>>;
+      /**
+       * Next epoch randomness.
+       **/
+      nextRandomness: AugmentedQuery<ApiType, () => Observable<Randomness>>;
+      /**
+       * The epoch randomness for the *current* epoch.
+       * 
+       * # Security
+       * 
+       * This MUST NOT be used for gambling, as it can be influenced by a
+       * malicious validator in the short term. It MAY be used in many
+       * cryptographic protocols, however, so long as one remembers that this
+       * (like everything else on-chain) it is public. For example, it can be
+       * used where a number is needed that cannot have been chosen by an
+       * adversary, for purposes such as public-coin zero-knowledge proofs.
+       **/
+      randomness: AugmentedQuery<ApiType, () => Observable<Randomness>>;
+      /**
+       * Randomness under construction.
+       * 
+       * We make a tradeoff between storage accesses and list length.
+       * We store the under-construction randomness in segments of up to
+       * `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.
+       * 
+       * Once a segment reaches this length, we begin the next one.
+       * We reset all segments and return to `0` at the beginning of every
+       * epoch.
+       **/
+      segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
+       **/
+      underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Randomness>>>;
+    };
+    balances: {
+      /**
+       * The balance of an account.
+       * 
+       * NOTE: This is only used in the case that this module is used to store balances.
+       **/
+      account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>>;
+      /**
+       * Any liquidity locks on some account balances.
+       * NOTE: Should only be accessed when setting, changing and freeing a lock.
+       **/
+      locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<BalanceLock>>>;
+      /**
+       * Storage version of the pallet.
+       * 
+       * This is set to v2.0.0 for new networks.
+       **/
+      storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
+      /**
+       * The total units issued in the system.
+       **/
+      totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>>;
+    };
+    contentDirectory: {
+      /**
+       * Map, representing ClassId -> Class relation
+       **/
+      classById: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<Class>>;
+      /**
+       * Map, representing  CuratorGroupId -> CuratorGroup relation
+       **/
+      curatorGroupById: AugmentedQuery<ApiType, (arg: CuratorGroupId | AnyNumber | Uint8Array) => Observable<CuratorGroup>>;
+      /**
+       * Map, representing EntityId -> Entity relation
+       **/
+      entityById: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<Entity>>;
+      entityCreationVouchers: AugmentedQueryDoubleMap<ApiType, (key1: ClassId | AnyNumber | Uint8Array, key2: EntityController | { Maintainers: any } | { Member: any } | { Lead: any } | string | Uint8Array) => Observable<EntityCreationVoucher>>;
+      /**
+       * Next runtime storage values used to maintain next id value, used on creation of respective curator groups, classes and entities
+       **/
+      nextClassId: AugmentedQuery<ApiType, () => Observable<ClassId>>;
+      nextCuratorGroupId: AugmentedQuery<ApiType, () => Observable<CuratorGroupId>>;
+      nextEntityId: AugmentedQuery<ApiType, () => Observable<EntityId>>;
+      /**
+       * Mapping of class id and its property id to the respective entity id and property value hash.
+       **/
+      uniquePropertyValueHashes: AugmentedQueryDoubleMap<ApiType, (key1: ITuple<[ClassId, PropertyId]> | [ClassId | AnyNumber | Uint8Array, PropertyId | AnyNumber | Uint8Array], key2: Hash | string | Uint8Array) => Observable<ITuple<[]>>>;
+    };
+    contentDirectoryWorkingGroup: {
+      /**
+       * Count of active workers.
+       **/
+      activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Maps identifier to worker application on opening.
+       **/
+      applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<ApplicationOf>>;
+      /**
+       * The current lead.
+       **/
+      currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
+      /**
+       * Map member id by hiring application id.
+       * Required by StakingEventsHandler callback call to refund the balance on unstaking.
+       **/
+      memberIdByHiringApplicationId: AugmentedQuery<ApiType, (arg: HiringApplicationId | AnyNumber | Uint8Array) => Observable<MemberId>>;
+      /**
+       * The mint currently funding the rewards for this module.
+       **/
+      mint: AugmentedQuery<ApiType, () => Observable<MintId>>;
+      /**
+       * Next identifier value for new worker application.
+       **/
+      nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
+      /**
+       * Next identifier value for new worker opening.
+       **/
+      nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
+      /**
+       * Next identifier for new worker.
+       **/
+      nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
+      /**
+       * Maps identifier to worker opening.
+       **/
+      openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<OpeningOf>>;
+      /**
+       * Opening human readable text length limits
+       **/
+      openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Worker application human readable text length limits
+       **/
+      workerApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to corresponding worker.
+       **/
+      workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<WorkerOf>>;
+      /**
+       * Worker exit rationale text length limits.
+       **/
+      workerExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+    };
+    contentWorkingGroup: {
+      channelAvatarConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      channelBannerConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to corresponding channel.
+       **/
+      channelById: AugmentedQuery<ApiType, (arg: ChannelId | AnyNumber | Uint8Array) => Observable<Channel>>;
+      /**
+       * Whether it is currently possible to create a channel via `create_channel` extrinsic.
+       **/
+      channelCreationEnabled: AugmentedQuery<ApiType, () => Observable<bool>>;
+      channelDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      channelHandleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps (unique) channel handle to the corresponding identifier for the channel.
+       * Mapping is required to allow efficient (O(log N)) on-chain verification that a proposed handle is indeed unique
+       * at the time it is being proposed.
+       **/
+      channelIdByHandle: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<ChannelId>>;
+      channelTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to curator application on opening.
+       **/
+      curatorApplicationById: AugmentedQuery<ApiType, (arg: CuratorApplicationId | AnyNumber | Uint8Array) => Observable<CuratorApplication>>;
+      curatorApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to corresponding curator.
+       **/
+      curatorById: AugmentedQuery<ApiType, (arg: CuratorId | AnyNumber | Uint8Array) => Observable<Curator>>;
+      curatorExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifeir to curator opening.
+       **/
+      curatorOpeningById: AugmentedQuery<ApiType, (arg: CuratorOpeningId | AnyNumber | Uint8Array) => Observable<CuratorOpening>>;
+      /**
+       * The current lead.
+       **/
+      currentLeadId: AugmentedQuery<ApiType, () => Observable<Option<LeadId>>>;
+      /**
+       * Maps identifier to corresponding lead.
+       **/
+      leadById: AugmentedQuery<ApiType, (arg: LeadId | AnyNumber | Uint8Array) => Observable<Lead>>;
+      /**
+       * The mint currently funding the rewards for this module.
+       **/
+      mint: AugmentedQuery<ApiType, () => Observable<MintId>>;
+      /**
+       * Identifier to be used by the next channel introduced.
+       **/
+      nextChannelId: AugmentedQuery<ApiType, () => Observable<ChannelId>>;
+      /**
+       * Next identifier value for new curator application.
+       **/
+      nextCuratorApplicationId: AugmentedQuery<ApiType, () => Observable<CuratorApplicationId>>;
+      /**
+       * Next identifier for new curator.
+       **/
+      nextCuratorId: AugmentedQuery<ApiType, () => Observable<CuratorId>>;
+      /**
+       * Next identifier valuefor new curator opening.
+       **/
+      nextCuratorOpeningId: AugmentedQuery<ApiType, () => Observable<CuratorOpeningId>>;
+      /**
+       * Next identifier for new current lead.
+       **/
+      nextLeadId: AugmentedQuery<ApiType, () => Observable<LeadId>>;
+      /**
+       * Next identifier for
+       **/
+      nextPrincipalId: AugmentedQuery<ApiType, () => Observable<PrincipalId>>;
+      openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to principal.
+       **/
+      principalById: AugmentedQuery<ApiType, (arg: PrincipalId | AnyNumber | Uint8Array) => Observable<Principal>>;
+      /**
+       * Recover curator by the role stake which is currently unstaking.
+       **/
+      unstakerByStakeId: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<WorkingGroupUnstaker>>;
+    };
+    council: {
+      activeCouncil: AugmentedQuery<ApiType, () => Observable<Seats>>;
+      /**
+       * Reward amount paid out at each PayoutInterval
+       **/
+      amountPerPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
+      /**
+       * The mint that funds council member rewards and spending proposals budget
+       **/
+      councilMint: AugmentedQuery<ApiType, () => Observable<MintId>>;
+      /**
+       * How many blocks after the reward is created, the first payout will be made
+       **/
+      firstPayoutAfterRewardCreated: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Optional interval in blocks on which a reward payout will be made to each council member
+       **/
+      payoutInterval: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>>;
+      /**
+       * The reward relationships currently in place. There may not necessarily be a 1-1 correspondance with
+       * the active council, since there are multiple ways of setting/adding/removing council members, some of which
+       * do not involve creating a relationship.
+       **/
+      rewardRelationships: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardRelationshipId>>;
+      termEndsAt: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+    };
+    councilElection: {
+      announcingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      applicants: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
+      applicantStakes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ElectionStake>>;
+      autoStart: AugmentedQuery<ApiType, () => Observable<bool>>;
+      candidacyLimit: AugmentedQuery<ApiType, () => Observable<u32>>;
+      commitments: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>>;
+      councilSize: AugmentedQuery<ApiType, () => Observable<u32>>;
+      existingStakeHolders: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
+      minCouncilStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
+      minVotingStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
+      newTermDuration: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      revealingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      round: AugmentedQuery<ApiType, () => Observable<u32>>;
+      stage: AugmentedQuery<ApiType, () => Observable<Option<ElectionStage>>>;
+      transferableStakes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<TransferableStake>>;
+      votes: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<SealedVote>>;
+      votingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+    };
+    dataDirectory: {
+      /**
+       * Maps data objects by their content id.
+       **/
+      dataObjectByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Option<DataObject>>>;
+      /**
+       * List of ids known to the system.
+       **/
+      knownContentIds: AugmentedQuery<ApiType, () => Observable<Vec<ContentId>>>;
+    };
+    dataObjectStorageRegistry: {
+      /**
+       * Defines first relationship id.
+       **/
+      firstRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>>;
+      /**
+       * Defines next relationship id.
+       **/
+      nextRelationshipId: AugmentedQuery<ApiType, () => Observable<DataObjectStorageRelationshipId>>;
+      /**
+       * Mapping of Data object types
+       **/
+      relationships: AugmentedQuery<ApiType, (arg: DataObjectStorageRelationshipId | AnyNumber | Uint8Array) => Observable<Option<DataObjectStorageRelationship>>>;
+      /**
+       * Keeps a list of storage relationships per content id.
+       **/
+      relationshipsByContentId: AugmentedQuery<ApiType, (arg: ContentId | string | Uint8Array) => Observable<Vec<DataObjectStorageRelationshipId>>>;
+    };
+    dataObjectTypeRegistry: {
+      /**
+       * Mapping of Data object types.
+       **/
+      dataObjectTypes: AugmentedQuery<ApiType, (arg: DataObjectTypeId | AnyNumber | Uint8Array) => Observable<Option<DataObjectType>>>;
+      /**
+       * Data object type ids should start at this value.
+       **/
+      firstDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>>;
+      /**
+       * Provides id counter for the data object types.
+       **/
+      nextDataObjectTypeId: AugmentedQuery<ApiType, () => Observable<DataObjectTypeId>>;
+    };
+    discovery: {
+      /**
+       * Mapping of service providers' storage provider id to their ServiceProviderRecord
+       **/
+      accountInfoByStorageProviderId: AugmentedQuery<ApiType, (arg: StorageProviderId | AnyNumber | Uint8Array) => Observable<ServiceProviderRecord>>;
+      /**
+       * Bootstrap endpoints maintained by root
+       **/
+      bootstrapEndpoints: AugmentedQuery<ApiType, () => Observable<Vec<Url>>>;
+      /**
+       * Lifetime of an ServiceProviderRecord record in AccountInfoByAccountId map
+       **/
+      defaultLifetime: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+    };
+    forum: {
+      /**
+       * Map category identifier to corresponding category.
+       **/
+      categoryById: AugmentedQuery<ApiType, (arg: CategoryId | AnyNumber | Uint8Array) => Observable<Category>>;
+      categoryDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Input constraints
+       * These are all forward looking, that is they are enforced on all
+       * future calls.
+       **/
+      categoryTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Account of forum sudo.
+       **/
+      forumSudo: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>>;
+      /**
+       * Category identifier value to be used for the next Category created.
+       **/
+      nextCategoryId: AugmentedQuery<ApiType, () => Observable<CategoryId>>;
+      /**
+       * Post identifier value to be used for for next post created.
+       **/
+      nextPostId: AugmentedQuery<ApiType, () => Observable<PostId>>;
+      /**
+       * Thread identifier value to be used for next Thread in threadById.
+       **/
+      nextThreadId: AugmentedQuery<ApiType, () => Observable<ThreadId>>;
+      /**
+       * Map post identifier to corresponding post.
+       **/
+      postById: AugmentedQuery<ApiType, (arg: PostId | AnyNumber | Uint8Array) => Observable<Post>>;
+      postModerationRationaleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      postTextConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Map thread identifier to corresponding thread.
+       **/
+      threadById: AugmentedQuery<ApiType, (arg: ThreadId | AnyNumber | Uint8Array) => Observable<Thread>>;
+      threadModerationRationaleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      threadTitleConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+    };
+    grandpa: {
+      /**
+       * The number of changes (both in terms of keys and underlying economic responsibilities)
+       * in the "set" of Grandpa validators from genesis.
+       **/
+      currentSetId: AugmentedQuery<ApiType, () => Observable<SetId>>;
+      /**
+       * next block number where we can force a change.
+       **/
+      nextForced: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>>;
+      /**
+       * Pending change: (signaled at, scheduled change).
+       **/
+      pendingChange: AugmentedQuery<ApiType, () => Observable<Option<StoredPendingChange>>>;
+      /**
+       * A mapping from grandpa set ID to the index of the *most recent* session for which its
+       * members were responsible.
+       * 
+       * TWOX-NOTE: `SetId` is not under user control.
+       **/
+      setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>>;
+      /**
+       * `true` if we are currently stalled.
+       **/
+      stalled: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[BlockNumber, BlockNumber]>>>>;
+      /**
+       * State of the current authority set.
+       **/
+      state: AugmentedQuery<ApiType, () => Observable<StoredState>>;
+    };
+    hiring: {
+      /**
+       * Applications
+       **/
+      applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<Application>>;
+      /**
+       * Internal purpose of given stake, i.e. fro what application, and whether for the role or for the application.
+       **/
+      applicationIdByStakingId: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<ApplicationId>>;
+      /**
+       * Identifier for next application to be added.
+       **/
+      nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
+      /**
+       * Identifier for next opening to be added.
+       **/
+      nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
+      /**
+       * Openings.
+       **/
+      openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<Opening>>;
+    };
+    imOnline: {
+      /**
+       * For each session index, we keep a mapping of `T::ValidatorId` to the
+       * number of blocks authored by the given authority.
+       **/
+      authoredBlocks: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: ValidatorId | string | Uint8Array) => Observable<u32>>;
+      /**
+       * The block number after which it's ok to send heartbeats in current session.
+       * 
+       * At the beginning of each session we set this to a value that should
+       * fall roughly in the middle of the session duration.
+       * The idea is to first wait for the validators to produce a block
+       * in the current session, so that the heartbeat later on will not be necessary.
+       **/
+      heartbeatAfter: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * The current set of keys that may issue a heartbeat.
+       **/
+      keys: AugmentedQuery<ApiType, () => Observable<Vec<AuthorityId>>>;
+      /**
+       * For each session index, we keep a mapping of `AuthIndex` to
+       * `offchain::OpaqueNetworkState`.
+       **/
+      receivedHeartbeats: AugmentedQueryDoubleMap<ApiType, (key1: SessionIndex | AnyNumber | Uint8Array, key2: AuthIndex | AnyNumber | Uint8Array) => Observable<Option<Bytes>>>;
+    };
+    members: {
+      /**
+       * Active Paid membership terms
+       **/
+      activePaidMembershipTerms: AugmentedQuery<ApiType, () => Observable<Vec<PaidTermId>>>;
+      maxAboutTextLength: AugmentedQuery<ApiType, () => Observable<u32>>;
+      maxAvatarUriLength: AugmentedQuery<ApiType, () => Observable<u32>>;
+      maxHandleLength: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Registered unique handles and their mapping to their owner
+       **/
+      memberIdByHandle: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<MemberId>>;
+      /**
+       * Mapping of a controller account id to vector of member ids it controls
+       **/
+      memberIdsByControllerAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>>;
+      /**
+       * Mapping of a root account id to vector of member ids it controls.
+       **/
+      memberIdsByRootAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>>;
+      /**
+       * Mapping of member's id to their membership profile
+       **/
+      membershipById: AugmentedQuery<ApiType, (arg: MemberId | AnyNumber | Uint8Array) => Observable<Membership>>;
+      minHandleLength: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Is the platform is accepting new members or not
+       **/
+      newMembershipsAllowed: AugmentedQuery<ApiType, () => Observable<bool>>;
+      /**
+       * MemberId to assign to next member that is added to the registry, and is also the
+       * total number of members created. MemberIds start at Zero.
+       **/
+      nextMemberId: AugmentedQuery<ApiType, () => Observable<MemberId>>;
+      /**
+       * Next paid membership terms id
+       **/
+      nextPaidMembershipTermsId: AugmentedQuery<ApiType, () => Observable<PaidTermId>>;
+      /**
+       * Paid membership terms record
+       **/
+      paidMembershipTermsById: AugmentedQuery<ApiType, (arg: PaidTermId | AnyNumber | Uint8Array) => Observable<PaidMembershipTerms>>;
+      screeningAuthority: AugmentedQuery<ApiType, () => Observable<AccountId>>;
+    };
+    memo: {
+      maxMemoLength: AugmentedQuery<ApiType, () => Observable<u32>>;
+      memo: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<MemoText>>;
+    };
+    minting: {
+      /**
+       * Mints
+       **/
+      mints: AugmentedQuery<ApiType, (arg: MintId | AnyNumber | Uint8Array) => Observable<Mint>>;
+      /**
+       * The number of mints created.
+       **/
+      mintsCreated: AugmentedQuery<ApiType, () => Observable<MintId>>;
+    };
+    offences: {
+      /**
+       * A vector of reports of the same kind that happened at the same time slot.
+       **/
+      concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>>;
+      /**
+       * Deferred reports that have been rejected by the offence handler and need to be submitted
+       * at a later time.
+       **/
+      deferredOffences: AugmentedQuery<ApiType, () => Observable<Vec<DeferredOffenceOf>>>;
+      /**
+       * The primary structure that holds all offence records keyed by report identifiers.
+       **/
+      reports: AugmentedQuery<ApiType, (arg: ReportIdOf | string | Uint8Array) => Observable<Option<OffenceDetails>>>;
+      /**
+       * Enumerates all reports of a kind along with the time they happened.
+       * 
+       * All reports are sorted by the time of offence.
+       * 
+       * Note that the actual type of this mapping is `Vec<u8>`, this is because values of
+       * different types are not supported at the moment so we are doing the manual serialization.
+       **/
+      reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>>;
+    };
+    proposalsCodex: {
+      /**
+       * Grace period for the 'add working group opening' proposal
+       **/
+      addWorkingGroupOpeningProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'add working group opening' proposal
+       **/
+      addWorkingGroupOpeningProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'begin review working group leader applications' proposal
+       **/
+      beginReviewWorkingGroupLeaderApplicationsProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'begin review working group leader applications' proposal
+       **/
+      beginReviewWorkingGroupLeaderApplicationsProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'decrease working group leader stake' proposal
+       **/
+      decreaseWorkingGroupLeaderStakeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'decrease working group leader stake' proposal
+       **/
+      decreaseWorkingGroupLeaderStakeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'fill working group leader opening' proposal
+       **/
+      fillWorkingGroupLeaderOpeningProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'fill working group leader opening' proposal
+       **/
+      fillWorkingGroupLeaderOpeningProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Map proposal id to proposal details
+       **/
+      proposalDetailsByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalDetailsOf>>;
+      /**
+       * Grace period for the 'runtime upgrade' proposal
+       **/
+      runtimeUpgradeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'runtime upgrade' proposal
+       **/
+      runtimeUpgradeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set content working group mint capacity' proposal
+       **/
+      setContentWorkingGroupMintCapacityProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set content working group mint capacity' proposal
+       **/
+      setContentWorkingGroupMintCapacityProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set election parameters' proposal
+       **/
+      setElectionParametersProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set election parameters' proposal
+       **/
+      setElectionParametersProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set lead' proposal
+       **/
+      setLeadProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set lead' proposal
+       **/
+      setLeadProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set validator count' proposal
+       **/
+      setValidatorCountProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set validator count' proposal
+       **/
+      setValidatorCountProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set working group leader reward' proposal
+       **/
+      setWorkingGroupLeaderRewardProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set working group leader reward' proposal
+       **/
+      setWorkingGroupLeaderRewardProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'set working group mint capacity' proposal
+       **/
+      setWorkingGroupMintCapacityProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'set working group mint capacity' proposal
+       **/
+      setWorkingGroupMintCapacityProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'slash working group leader stake' proposal
+       **/
+      slashWorkingGroupLeaderStakeProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'slash working group leader stake' proposal
+       **/
+      slashWorkingGroupLeaderStakeProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'spending' proposal
+       **/
+      spendingProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'spending' proposal
+       **/
+      spendingProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'terminate working group leader role' proposal
+       **/
+      terminateWorkingGroupLeaderRoleProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'terminate working group leader role' proposal
+       **/
+      terminateWorkingGroupLeaderRoleProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Grace period for the 'text' proposal
+       **/
+      textProposalGracePeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Voting period for the 'text' proposal
+       **/
+      textProposalVotingPeriod: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Map proposal id to its discussion thread id
+       **/
+      threadIdByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ThreadId>>;
+    };
+    proposalsDiscussion: {
+      /**
+       * Last author thread counter (part of the antispam mechanism)
+       **/
+      lastThreadAuthorCounter: AugmentedQuery<ApiType, () => Observable<Option<ThreadCounter>>>;
+      /**
+       * Count of all posts that have been created.
+       **/
+      postCount: AugmentedQuery<ApiType, () => Observable<u64>>;
+      /**
+       * Map thread id and post id to corresponding post.
+       **/
+      postThreadIdByPostId: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: PostId | AnyNumber | Uint8Array) => Observable<DiscussionPost>>;
+      /**
+       * Map thread identifier to corresponding thread.
+       **/
+      threadById: AugmentedQuery<ApiType, (arg: ThreadId | AnyNumber | Uint8Array) => Observable<DiscussionThread>>;
+      /**
+       * Count of all threads that have been created.
+       **/
+      threadCount: AugmentedQuery<ApiType, () => Observable<u64>>;
+    };
+    proposalsEngine: {
+      /**
+       * Count of active proposals.
+       **/
+      activeProposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Ids of proposals that are open for voting (have not been finalized yet).
+       **/
+      activeProposalIds: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ITuple<[]>>>;
+      /**
+       * Map proposal executable code by proposal id.
+       **/
+      dispatchableCallCode: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<Bytes>>;
+      /**
+       * Ids of proposals that were approved and theirs grace period was not expired.
+       **/
+      pendingExecutionProposalIds: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ITuple<[]>>>;
+      /**
+       * Count of all proposals that have been created.
+       **/
+      proposalCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Map proposal by its id.
+       **/
+      proposals: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalOf>>;
+      /**
+       * Map proposal id by stake id. Required by StakingEventsHandler callback call
+       **/
+      stakesProposals: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<ProposalId>>;
+      /**
+       * Double map for preventing duplicate votes. Should be cleaned after usage.
+       **/
+      voteExistsByProposalByVoter: AugmentedQueryDoubleMap<ApiType, (key1: ProposalId | AnyNumber | Uint8Array, key2: MemberId | AnyNumber | Uint8Array) => Observable<VoteKind>>;
+    };
+    randomnessCollectiveFlip: {
+      /**
+       * Series of block headers from the last 81 blocks that acts as random seed material. This
+       * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
+       * the oldest hash.
+       **/
+      randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>>;
+    };
+    recurringRewards: {
+      recipients: AugmentedQuery<ApiType, (arg: RecipientId | AnyNumber | Uint8Array) => Observable<Recipient>>;
+      recipientsCreated: AugmentedQuery<ApiType, () => Observable<RecipientId>>;
+      rewardRelationships: AugmentedQuery<ApiType, (arg: RewardRelationshipId | AnyNumber | Uint8Array) => Observable<RewardRelationship>>;
+      rewardRelationshipsCreated: AugmentedQuery<ApiType, () => Observable<RewardRelationshipId>>;
+    };
+    session: {
+      /**
+       * Current index of the session.
+       **/
+      currentIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>>;
+      /**
+       * Indices of disabled validators.
+       * 
+       * The set is cleared when `on_session_ending` returns a new set of identities.
+       **/
+      disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>>;
+      /**
+       * The owner of a key. The key is the `KeyTypeId` + the encoded key.
+       **/
+      keyOwner: AugmentedQuery<ApiType, (arg: ITuple<[KeyTypeId, Bytes]> | [KeyTypeId | AnyNumber | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<ValidatorId>>>;
+      /**
+       * The next session keys for a validator.
+       **/
+      nextKeys: AugmentedQuery<ApiType, (arg: ValidatorId | string | Uint8Array) => Observable<Option<Keys>>>;
+      /**
+       * True if the underlying economic identities or weighting behind the validators
+       * has changed in the queued validator set.
+       **/
+      queuedChanged: AugmentedQuery<ApiType, () => Observable<bool>>;
+      /**
+       * The queued keys for the next session. When the next session begins, these keys
+       * will be used to determine the validator's session keys.
+       **/
+      queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[ValidatorId, Keys]>>>>;
+      /**
+       * The current set of validators.
+       **/
+      validators: AugmentedQuery<ApiType, () => Observable<Vec<ValidatorId>>>;
+    };
+    stake: {
+      /**
+       * Maps identifiers to a stake.
+       **/
+      stakes: AugmentedQuery<ApiType, (arg: StakeId | AnyNumber | Uint8Array) => Observable<Stake>>;
+      /**
+       * Identifier value for next stake, and count of total stakes created (not necessarily the number of current
+       * stakes in the Stakes map as stakes can be removed.)
+       **/
+      stakesCreated: AugmentedQuery<ApiType, () => Observable<StakeId>>;
+    };
+    staking: {
+      /**
+       * The active era information, it holds index and start.
+       * 
+       * The active era is the era currently rewarded.
+       * Validator set of this era must be equal to `SessionInterface::validators`.
+       **/
+      activeEra: AugmentedQuery<ApiType, () => Observable<Option<ActiveEraInfo>>>;
+      /**
+       * Map from all locked "stash" accounts to the controller account.
+       **/
+      bonded: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>>;
+      /**
+       * A mapping from still-bonded eras to the first session index of that era.
+       * 
+       * Must contains information for eras for the range:
+       * `[active_era - bounding_duration; active_era]`
+       **/
+      bondedEras: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EraIndex, SessionIndex]>>>>;
+      /**
+       * The amount of currency given to reporters of a slash event which was
+       * canceled by extraordinary circumstances (e.g. governance).
+       **/
+      canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>>;
+      /**
+       * The current era index.
+       * 
+       * This is the latest planned era, depending on how the Session pallet queues the validator
+       * set, it might be active or not.
+       **/
+      currentEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>>;
+      /**
+       * The earliest era for which we have a pending, unapplied slash.
+       **/
+      earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>>;
+      /**
+       * Flag to control the execution of the offchain election. When `Open(_)`, we accept
+       * solutions to be submitted.
+       **/
+      eraElectionStatus: AugmentedQuery<ApiType, () => Observable<ElectionStatus>>;
+      /**
+       * Rewards for the last `HISTORY_DEPTH` eras.
+       * If reward hasn't been set or has been removed then 0 reward is returned.
+       **/
+      erasRewardPoints: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<EraRewardPoints>>;
+      /**
+       * Exposure of validator at era.
+       * 
+       * This is keyed first by the era index to allow bulk deletion and then the stash account.
+       * 
+       * Is it removed after `HISTORY_DEPTH` eras.
+       * If stakers hasn't been set or has been removed then empty exposure is returned.
+       **/
+      erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>>;
+      /**
+       * Clipped Exposure of validator at era.
+       * 
+       * This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the
+       * `T::MaxNominatorRewardedPerValidator` biggest stakers.
+       * (Note: the field `total` and `own` of the exposure remains unchanged).
+       * This is used to limit the i/o cost for the nominator payout.
+       * 
+       * This is keyed fist by the era index to allow bulk deletion and then the stash account.
+       * 
+       * Is it removed after `HISTORY_DEPTH` eras.
+       * If stakers hasn't been set or has been removed then empty exposure is returned.
+       **/
+      erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>>;
+      /**
+       * The session index at which the era start for the last `HISTORY_DEPTH` eras.
+       **/
+      erasStartSessionIndex: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>>;
+      /**
+       * The total amount staked for the last `HISTORY_DEPTH` eras.
+       * If total hasn't been set or has been removed then 0 stake is returned.
+       **/
+      erasTotalStake: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<BalanceOf>>;
+      /**
+       * Similar to `ErasStakers`, this holds the preferences of validators.
+       * 
+       * This is keyed first by the era index to allow bulk deletion and then the stash account.
+       * 
+       * Is it removed after `HISTORY_DEPTH` eras.
+       **/
+      erasValidatorPrefs: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>>;
+      /**
+       * The total validator era payout for the last `HISTORY_DEPTH` eras.
+       * 
+       * Eras that haven't finished yet or has been removed doesn't have reward.
+       **/
+      erasValidatorReward: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<BalanceOf>>>;
+      /**
+       * Mode of era forcing.
+       **/
+      forceEra: AugmentedQuery<ApiType, () => Observable<Forcing>>;
+      /**
+       * Number of eras to keep in history.
+       * 
+       * Information is kept for eras in `[current_era - history_depth; current_era]`.
+       * 
+       * Must be more than the number of eras delayed by session otherwise. I.e. active era must
+       * always be in history. I.e. `active_era > current_era - history_depth` must be
+       * guaranteed.
+       **/
+      historyDepth: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
+       * easy to initialize and the performance hit is minimal (we expect no more than four
+       * invulnerables) and restricted to testnets.
+       **/
+      invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>>;
+      /**
+       * True if the current **planned** session is final. Note that this does not take era
+       * forcing into account.
+       **/
+      isCurrentSessionFinal: AugmentedQuery<ApiType, () => Observable<bool>>;
+      /**
+       * Map from all (unlocked) "controller" accounts to the info regarding the staking.
+       **/
+      ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>>;
+      /**
+       * Minimum number of staking participants before emergency conditions are imposed.
+       **/
+      minimumValidatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * The map from nominator stash key to the set of stash keys of all validators to nominate.
+       **/
+      nominators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Nominations>>>;
+      /**
+       * All slashing events on nominators, mapped by era to the highest slash value of the era.
+       **/
+      nominatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<BalanceOf>>>;
+      /**
+       * Where the reward payment should be made. Keyed by stash.
+       **/
+      payee: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<RewardDestination>>;
+      /**
+       * The next validator set. At the end of an era, if this is available (potentially from the
+       * result of an offchain worker), it is immediately used. Otherwise, the on-chain election
+       * is executed.
+       **/
+      queuedElected: AugmentedQuery<ApiType, () => Observable<Option<ElectionResult>>>;
+      /**
+       * The score of the current [`QueuedElected`].
+       **/
+      queuedScore: AugmentedQuery<ApiType, () => Observable<Option<ElectionScore>>>;
+      /**
+       * Slashing spans for stash accounts.
+       **/
+      slashingSpans: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<SlashingSpans>>>;
+      /**
+       * The percentage of the slash that is distributed to reporters.
+       * 
+       * The rest of the slashed value is handled by the `Slash`.
+       **/
+      slashRewardFraction: AugmentedQuery<ApiType, () => Observable<Perbill>>;
+      /**
+       * Snapshot of nominators at the beginning of the current election window. This should only
+       * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
+       **/
+      snapshotNominators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>>;
+      /**
+       * Snapshot of validators at the beginning of the current election window. This should only
+       * have a value when [`EraElectionStatus`] == `ElectionStatus::Open(_)`.
+       **/
+      snapshotValidators: AugmentedQuery<ApiType, () => Observable<Option<Vec<AccountId>>>>;
+      /**
+       * Records information about the maximum slash of a stash within a slashing span,
+       * as well as how much reward has been paid out.
+       **/
+      spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId, SpanIndex]> | [AccountId | string | Uint8Array, SpanIndex | AnyNumber | Uint8Array]) => Observable<SpanRecord>>;
+      /**
+       * True if network has been upgraded to this version.
+       * Storage version of the pallet.
+       * 
+       * This is set to v3.0.0 for new networks.
+       **/
+      storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
+      /**
+       * All unapplied slashes that are queued for later.
+       **/
+      unappliedSlashes: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Vec<UnappliedSlash>>>;
+      /**
+       * The ideal number of staking participants.
+       **/
+      validatorCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * The map from (wannabe) validator stash key to the preferences of that validator.
+       **/
+      validators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>>;
+      /**
+       * All slashing events on validators, mapped by era to the highest slash proportion
+       * and slash value of the era.
+       **/
+      validatorSlashInEra: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ITuple<[Perbill, BalanceOf]>>>>;
+    };
+    storageWorkingGroup: {
+      /**
+       * Count of active workers.
+       **/
+      activeWorkerCount: AugmentedQuery<ApiType, () => Observable<u32>>;
+      /**
+       * Maps identifier to worker application on opening.
+       **/
+      applicationById: AugmentedQuery<ApiType, (arg: ApplicationId | AnyNumber | Uint8Array) => Observable<ApplicationOf>>;
+      /**
+       * The current lead.
+       **/
+      currentLead: AugmentedQuery<ApiType, () => Observable<Option<WorkerId>>>;
+      /**
+       * Map member id by hiring application id.
+       * Required by StakingEventsHandler callback call to refund the balance on unstaking.
+       **/
+      memberIdByHiringApplicationId: AugmentedQuery<ApiType, (arg: HiringApplicationId | AnyNumber | Uint8Array) => Observable<MemberId>>;
+      /**
+       * The mint currently funding the rewards for this module.
+       **/
+      mint: AugmentedQuery<ApiType, () => Observable<MintId>>;
+      /**
+       * Next identifier value for new worker application.
+       **/
+      nextApplicationId: AugmentedQuery<ApiType, () => Observable<ApplicationId>>;
+      /**
+       * Next identifier value for new worker opening.
+       **/
+      nextOpeningId: AugmentedQuery<ApiType, () => Observable<OpeningId>>;
+      /**
+       * Next identifier for new worker.
+       **/
+      nextWorkerId: AugmentedQuery<ApiType, () => Observable<WorkerId>>;
+      /**
+       * Maps identifier to worker opening.
+       **/
+      openingById: AugmentedQuery<ApiType, (arg: OpeningId | AnyNumber | Uint8Array) => Observable<OpeningOf>>;
+      /**
+       * Opening human readable text length limits
+       **/
+      openingHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Worker application human readable text length limits
+       **/
+      workerApplicationHumanReadableText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      /**
+       * Maps identifier to corresponding worker.
+       **/
+      workerById: AugmentedQuery<ApiType, (arg: WorkerId | AnyNumber | Uint8Array) => Observable<WorkerOf>>;
+      /**
+       * Worker exit rationale text length limits.
+       **/
+      workerExitRationaleText: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+    };
+    sudo: {
+      /**
+       * The `AccountId` of the sudo key.
+       **/
+      key: AugmentedQuery<ApiType, () => Observable<AccountId>>;
+    };
+    system: {
+      /**
+       * The full account information for a particular account ID.
+       **/
+      account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountInfo>>;
+      /**
+       * Total length (in bytes) for all extrinsics put together, for the current block.
+       **/
+      allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
+      /**
+       * Map of block numbers to block hashes.
+       **/
+      blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>>;
+      /**
+       * The current weight for the block.
+       **/
+      blockWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>>;
+      /**
+       * Digest of the current block, also part of the block header.
+       **/
+      digest: AugmentedQuery<ApiType, () => Observable<DigestOf>>;
+      /**
+       * The number of events in the `Events<T>` list.
+       **/
+      eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>>;
+      /**
+       * Events deposited for the current block.
+       **/
+      events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>>;
+      /**
+       * Mapping between a topic (represented by T::Hash) and a vector of indexes
+       * of events in the `<Events<T>>` list.
+       * 
+       * All topic vectors have deterministic storage locations depending on the topic. This
+       * allows light-clients to leverage the changes trie storage tracking mechanism and
+       * in case of changes fetch the list of events of interest.
+       * 
+       * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
+       * the `EventIndex` then in case if the topic has the same contents on the next block
+       * no notification will be triggered thus the event might be lost.
+       **/
+      eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>>;
+      /**
+       * The execution phase of the block.
+       **/
+      executionPhase: AugmentedQuery<ApiType, () => Observable<Option<Phase>>>;
+      /**
+       * Total extrinsics count for the current block.
+       **/
+      extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>>;
+      /**
+       * Extrinsics data for the current block (maps an extrinsic's index to its data).
+       **/
+      extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>>;
+      /**
+       * Extrinsics root of the current block, also part of the block header.
+       **/
+      extrinsicsRoot: AugmentedQuery<ApiType, () => Observable<Hash>>;
+      /**
+       * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
+       **/
+      lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<LastRuntimeUpgradeInfo>>>;
+      /**
+       * The current block number being processed. Set by `execute_block`.
+       **/
+      number: AugmentedQuery<ApiType, () => Observable<BlockNumber>>;
+      /**
+       * Hash of the previous block.
+       **/
+      parentHash: AugmentedQuery<ApiType, () => Observable<Hash>>;
+    };
+    timestamp: {
+      /**
+       * Did the timestamp get updated in this block?
+       **/
+      didUpdate: AugmentedQuery<ApiType, () => Observable<bool>>;
+      /**
+       * Current time for the current block.
+       **/
+      now: AugmentedQuery<ApiType, () => Observable<Moment>>;
+    };
+    transactionPayment: {
+      nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>>;
+      storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>>;
+    };
+    versionedStore: {
+      classById: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<Class>>;
+      classDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      classNameConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      entityById: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<Entity>>;
+      nextClassId: AugmentedQuery<ApiType, () => Observable<ClassId>>;
+      nextEntityId: AugmentedQuery<ApiType, () => Observable<EntityId>>;
+      propertyDescriptionConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+      propertyNameConstraint: AugmentedQuery<ApiType, () => Observable<InputValidationLengthConstraint>>;
+    };
+    versionedStorePermissions: {
+      /**
+       * ClassPermissions of corresponding Classes in the versioned store
+       **/
+      classPermissionsByClassId: AugmentedQuery<ApiType, (arg: ClassId | AnyNumber | Uint8Array) => Observable<ClassPermissionsType>>;
+      /**
+       * Owner of an entity in the versioned store. If it is None then it is owned by the system.
+       **/
+      entityMaintainerByEntityId: AugmentedQuery<ApiType, (arg: EntityId | AnyNumber | Uint8Array) => Observable<Option<Credential>>>;
+    };
+  }
+
+  export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
+  }
+}

+ 1574 - 0
types/augment-codec/augment-api-tx.ts

@@ -0,0 +1,1574 @@
+// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
+/* eslint-disable */
+
+import { AnyNumber, ITuple } from '@polkadot/types/types';
+import { BTreeMap, BTreeSet, Compact, Option, Vec } from '@polkadot/types/codec';
+import { Bytes, bool, u16, u32, u64 } from '@polkadot/types/primitive';
+import { ActivateOpeningAt, Actor, AddOpeningParameters, ApplicationId, ApplicationIdSet, BalanceOfMint, CategoryId, ChannelContentType, ChannelCurationStatus, ChannelId, ChannelPublicationStatus, ClassId, ClassPermissions, ClassPermissionsType, ClassPropertyValue, ContentId, Credential, CredentialSet, CurationActor, CuratorApplicationId, CuratorApplicationIdSet, CuratorGroupId, CuratorId, CuratorOpeningId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, ElectionParameters, EntityController, EntityId, EntityPermissions, FillOpeningParameters, InputPropertyValue, InputValue, MemberId, MemoText, Nonce, OpeningId, OpeningPolicyCommitment, OpeningType, Operation, OperationType, OptionalText, PaidTermId, PostId, Property, PropertyId, ProposalId, ReferenceConstraint, RewardPolicy, SchemaId, StorageProviderId, TerminateRoleParameters, ThreadId, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all';
+import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
+import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
+import { Heartbeat } from '@polkadot/types/interfaces/imOnline';
+import { AccountId, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime';
+import { Keys } from '@polkadot/types/interfaces/session';
+import { CompactAssignments, ElectionScore, ElectionSize, EraIndex, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
+import { Key } from '@polkadot/types/interfaces/system';
+import { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
+
+declare module '@polkadot/api/types/submittable' {
+  export interface AugmentedSubmittables<ApiType> {
+    authorship: {
+      /**
+       * Provide a set of uncles.
+       **/
+      setUncles: AugmentedSubmittable<(newUncles: Vec<Header> | (Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+    };
+    balances: {
+      /**
+       * Exactly as `transfer`, except the origin must be root and the source account may be
+       * specified.
+       * # <weight>
+       * - Same as transfer, but additional read and write because the source account is
+       * not assumed to be in the overlay.
+       * # </weight>
+       **/
+      forceTransfer: AugmentedSubmittable<(source: LookupSource | string | Uint8Array, dest: LookupSource | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the balances of a given account.
+       * 
+       * This will alter `FreeBalance` and `ReservedBalance` in storage. it will
+       * also decrease the total issuance of the system (`TotalIssuance`).
+       * If the new free or reserved balance is below the existential deposit,
+       * it will reset the account nonce (`frame_system::AccountNonce`).
+       * 
+       * The dispatch origin for this call is `root`.
+       * 
+       * # <weight>
+       * - Independent of the arguments.
+       * - Contains a limited number of reads and writes.
+       * ---------------------
+       * - Base Weight:
+       * - Creating: 27.56 µs
+       * - Killing: 35.11 µs
+       * - DB Weight: 1 Read, 1 Write to `who`
+       * # </weight>
+       **/
+      setBalance: AugmentedSubmittable<(who: LookupSource | string | Uint8Array, newFree: Compact<Balance> | AnyNumber | Uint8Array, newReserved: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Transfer some liquid free balance to another account.
+       * 
+       * `transfer` will set the `FreeBalance` of the sender and receiver.
+       * It will decrease the total issuance of the system by the `TransferFee`.
+       * If the sender's account is below the existential deposit as a result
+       * of the transfer, the account will be reaped.
+       * 
+       * The dispatch origin for this call must be `Signed` by the transactor.
+       * 
+       * # <weight>
+       * - Dependent on arguments but not critical, given proper implementations for
+       * input config types. See related functions below.
+       * - It contains a limited number of reads and writes internally and no complex computation.
+       * 
+       * Related functions:
+       * 
+       * - `ensure_can_withdraw` is always called internally but has a bounded complexity.
+       * - Transferring balances to accounts that did not exist before will cause
+       * `T::OnNewAccount::on_new_account` to be called.
+       * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.
+       * - `transfer_keep_alive` works the same way as `transfer`, but has an additional
+       * check that the transfer will not kill the origin account.
+       * ---------------------------------
+       * - Base Weight: 73.64 µs, worst case scenario (account created, account removed)
+       * - DB Weight: 1 Read and 1 Write to destination account
+       * - Origin account is already in memory, so no DB operations for them.
+       * # </weight>
+       **/
+      transfer: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Same as the [`transfer`] call, but with a check that the transfer will not kill the
+       * origin account.
+       * 
+       * 99% of the time you want [`transfer`] instead.
+       * 
+       * [`transfer`]: struct.Module.html#method.transfer
+       * # <weight>
+       * - Cheaper than transfer because account cannot be killed.
+       * - Base Weight: 51.4 µs
+       * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
+       * #</weight>
+       **/
+      transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    contentDirectory: {
+      /**
+       * Create new class schema from existing property ids and new properties
+       **/
+      addClassSchema: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, existingProperties: BTreeSet<PropertyId>, newProperties: Vec<Property> | (Property | { property_type?: any; required?: any; unique?: any; name?: any; description?: any; locking_policy?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add new curator group to runtime storage
+       **/
+      addCuratorGroup: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add curator to curator group under given `curator_group_id`
+       **/
+      addCuratorToGroup: AugmentedSubmittable<(curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array, curatorId: CuratorId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add curator group under given `curator_group_id` as `Class` maintainer
+       **/
+      addMaintainerToClass: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add schema support to entity under given `schema_id` and provided `property_values`
+       **/
+      addSchemaSupportToEntity: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, schemaId: SchemaId | AnyNumber | Uint8Array, newPropertyValues: BTreeMap<PropertyId, InputPropertyValue>) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Clear `PropertyValueVec` under given `entity_id` & `in_class_schema_property_id`
+       **/
+      clearEntityPropertyVector: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, inClassSchemaPropertyId: PropertyId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create new `Class` with provided parameters
+       **/
+      createClass: AugmentedSubmittable<(name: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, classPermissions: ClassPermissions | { any_member?: any; entity_creation_blocked?: any; all_entity_property_values_locked?: any; maintainers?: any } | string | Uint8Array, maximumEntitiesCount: EntityId | AnyNumber | Uint8Array, defaultEntityCreationVoucherUpperBound: EntityId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create entity.
+       * If someone is making an entity of this class for first time,
+       * then a voucher is also added with the class limit as the default limit value.
+       **/
+      createEntity: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Insert `SingleInputPropertyValue` at given `index_in_property_vector`
+       * into `PropertyValueVec` under `in_class_schema_property_id`
+       **/
+      insertAtEntityPropertyVector: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, inClassSchemaPropertyId: PropertyId | AnyNumber | Uint8Array, indexInPropertyVector: VecMaxLength | AnyNumber | Uint8Array, value: InputValue | { Bool: any } | { Uint16: any } | { Uint32: any } | { Uint64: any } | { Int16: any } | { Int32: any } | { Int64: any } | { Text: any } | { TextToHash: any } | { Reference: any } | string | Uint8Array, nonce: Nonce | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove value at given `index_in_property_vector`
+       * from `PropertyValueVec` under `in_class_schema_property_id`
+       **/
+      removeAtEntityPropertyVector: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, inClassSchemaPropertyId: PropertyId | AnyNumber | Uint8Array, indexInPropertyVector: VecMaxLength | AnyNumber | Uint8Array, nonce: Nonce | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove curator from a given curator group
+       **/
+      removeCuratorFromGroup: AugmentedSubmittable<(curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array, curatorId: CuratorId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove curator group under given `curator_group_id` from runtime storage
+       **/
+      removeCuratorGroup: AugmentedSubmittable<(curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove `Entity` under provided `entity_id`
+       **/
+      removeEntity: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove curator group under given `curator_group_id` from `Class` maintainers set
+       **/
+      removeMaintainerFromClass: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set `is_active` status for curator group under given `curator_group_id`
+       **/
+      setCuratorGroupStatus: AugmentedSubmittable<(curatorGroupId: CuratorGroupId | AnyNumber | Uint8Array, isActive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Batch transaction
+       **/
+      transaction: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, operations: Vec<OperationType> | (OperationType | { CreateEntity: any } | { UpdatePropertyValues: any } | { AddSchemaSupportToEntity: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Transfer ownership to new `EntityController` for `Entity` under given `entity_id`
+       * `new_property_value_references_with_same_owner_flag_set` should be provided manually
+       **/
+      transferEntityOwnership: AugmentedSubmittable<(entityId: EntityId | AnyNumber | Uint8Array, newController: EntityController | { Maintainers: any } | { Member: any } | { Lead: any } | string | Uint8Array, newPropertyValueReferencesWithSameOwnerFlagSet: BTreeMap<PropertyId, InputPropertyValue>) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update `ClassPermissions` under specific `class_id`
+       **/
+      updateClassPermissions: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, updatedAnyMember: Option<bool> | null | object | string | Uint8Array, updatedEntityCreationBlocked: Option<bool> | null | object | string | Uint8Array, updatedAllEntityPropertyValuesLocked: Option<bool> | null | object | string | Uint8Array, updatedMaintainers: Option<BTreeSet<CuratorGroupId>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update `schema_status` under specific `schema_id` in `Class`
+       **/
+      updateClassSchemaStatus: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, schemaId: SchemaId | AnyNumber | Uint8Array, schemaStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Updates or creates new `EntityCreationVoucher` for given `EntityController` with individual limit
+       **/
+      updateEntityCreationVoucher: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, controller: EntityController | { Maintainers: any } | { Member: any } | { Lead: any } | string | Uint8Array, maximumEntitiesCount: EntityId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update entity permissions
+       **/
+      updateEntityPermissions: AugmentedSubmittable<(entityId: EntityId | AnyNumber | Uint8Array, updatedFrozen: Option<bool> | null | object | string | Uint8Array, updatedReferenceable: Option<bool> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update `Entity` `InputPropertyValue`'s with provided ones
+       **/
+      updateEntityPropertyValues: AugmentedSubmittable<(actor: Actor | { Curator: any } | { Member: any } | { Lead: any } | string | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, newPropertyValues: BTreeMap<PropertyId, InputPropertyValue>) => SubmittableExtrinsic<ApiType>>;
+    };
+    contentDirectoryWorkingGroup: {
+      /**
+       * Begin accepting worker applications to an opening that is active.
+       * Require signed leader origin or the root (to accept applications for the leader position).
+       **/
+      acceptApplications: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add an opening for a worker role.
+       * Require signed leader origin or the root (to add opening for the leader position).
+       **/
+      addOpening: AugmentedSubmittable<(activateAt: ActivateOpeningAt | { CurrentBlock: any } | { ExactBlock: any } | string | Uint8Array, commitment: OpeningPolicyCommitment | { application_rationing_policy?: any; max_review_period_length?: any; application_staking_policy?: any; role_staking_policy?: any; role_slashing_terms?: any; fill_opening_successful_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_role_stake_unstaking_period?: any; terminate_curator_application_stake_unstaking_period?: any; terminate_curator_role_stake_unstaking_period?: any; exit_curator_role_application_stake_unstaking_period?: any; exit_curator_role_stake_unstaking_period?: any } | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Worker' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Apply on a worker opening.
+       **/
+      applyOnOpening: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, openingId: OpeningId | AnyNumber | Uint8Array, roleAccountId: AccountId | string | Uint8Array, optRoleStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, optApplicationStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Begin reviewing, and therefore not accepting new applications.
+       * Require signed leader origin or the root (to begin review applications for the leader position).
+       **/
+      beginApplicantReview: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Decreases the worker/lead stake and returns the remainder to the worker role_account_id.
+       * Can be decreased to zero, no actions on zero stake.
+       * Require signed leader origin or the root (to decrease the leader stake).
+       **/
+      decreaseStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Fill opening for worker/lead.
+       * Require signed leader origin or the root (to fill opening for the leader position).
+       **/
+      fillOpening: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array, successfulApplicationIds: ApplicationIdSet, rewardPolicy: Option<RewardPolicy> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Increases the worker/lead stake, demands a worker origin. Transfers tokens from the worker
+       * role_account_id to the stake. No limits on the stake.
+       **/
+      increaseStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Leave the role by the active worker.
+       **/
+      leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the capacity to enable working group budget. Requires root origin.
+       **/
+      setMintCapacity: AugmentedSubmittable<(newCapacity: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Slashes the worker stake, demands a leader origin. No limits, no actions on zero stake.
+       * If slashing balance greater than the existing stake - stake is slashed to zero.
+       * Require signed leader origin or the root (to slash the leader stake).
+       **/
+      slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Terminate the worker application. Can be done by the lead only.
+       **/
+      terminateApplication: AugmentedSubmittable<(applicationId: ApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Terminate the active worker by the lead.
+       * Require signed leader origin or the root (to terminate the leader role).
+       **/
+      terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array, slashStake: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the reward account associated with a set reward relationship for the active worker.
+       **/
+      updateRewardAccount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newRewardAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the reward amount associated with a set reward relationship for the active worker.
+       * Require signed leader origin or the root (to update leader reward amount).
+       **/
+      updateRewardAmount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newAmount: BalanceOfMint | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the associated role account of the active worker/lead.
+       **/
+      updateRoleAccount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newRoleAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Withdraw the worker application. Can be done by the worker itself only.
+       **/
+      withdrawApplication: AugmentedSubmittable<(applicationId: ApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    contentWorkingGroup: {
+      /**
+       * Begin accepting curator applications to an opening that is active.
+       **/
+      acceptCuratorApplications: AugmentedSubmittable<(curatorOpeningId: CuratorOpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add an opening for a curator role.
+       **/
+      addCuratorOpening: AugmentedSubmittable<(activateAt: ActivateOpeningAt | { CurrentBlock: any } | { ExactBlock: any } | string | Uint8Array, commitment: OpeningPolicyCommitment | { application_rationing_policy?: any; max_review_period_length?: any; application_staking_policy?: any; role_staking_policy?: any; role_slashing_terms?: any; fill_opening_successful_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_role_stake_unstaking_period?: any; terminate_curator_application_stake_unstaking_period?: any; terminate_curator_role_stake_unstaking_period?: any; exit_curator_role_application_stake_unstaking_period?: any; exit_curator_role_stake_unstaking_period?: any } | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Apply on a curator opening.
+       **/
+      applyOnCuratorOpening: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, curatorOpeningId: CuratorOpeningId | AnyNumber | Uint8Array, roleAccount: AccountId | string | Uint8Array, optRoleStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, optApplicationStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Begin reviewing, and therefore not accepting new applications.
+       **/
+      beginCuratorApplicantReview: AugmentedSubmittable<(curatorOpeningId: CuratorOpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create a new channel.
+       **/
+      createChannel: AugmentedSubmittable<(owner: MemberId | AnyNumber | Uint8Array, roleAccount: AccountId | string | Uint8Array, content: ChannelContentType | 'Video'|'Music'|'Ebook' | number | Uint8Array, handle: Bytes | string | Uint8Array, title: OptionalText | null | object | string | Uint8Array, description: OptionalText | null | object | string | Uint8Array, avatar: OptionalText | null | object | string | Uint8Array, banner: OptionalText | null | object | string | Uint8Array, publicationStatus: ChannelPublicationStatus | 'Public'|'Unlisted' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Fill opening for curator
+       **/
+      fillCuratorOpening: AugmentedSubmittable<(curatorOpeningId: CuratorOpeningId | AnyNumber | Uint8Array, successfulCuratorApplicationIds: CuratorApplicationIdSet, rewardPolicy: Option<RewardPolicy> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add to capacity of current acive mint.
+       * This may be deprecated in the future, since set_mint_capacity is sufficient to
+       * both increase and decrease capacity. Although when considering that it may be executed
+       * by a proposal, given the temporal delay in approving a proposal, it might be more suitable
+       * than set_mint_capacity?
+       **/
+      increaseMintCapacity: AugmentedSubmittable<(additionalCapacity: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * An active curator leaves role
+       **/
+      leaveCuratorRole: AugmentedSubmittable<(curatorId: CuratorId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Replace the current lead. First unsets the active lead if there is one.
+       * If a value is provided for new_lead it will then set that new lead.
+       * It is responsibility of the caller to ensure the new lead can be set
+       * to avoid the lead role being vacant at the end of the call.
+       **/
+      replaceLead: AugmentedSubmittable<(newLead: Option<ITuple<[MemberId, AccountId]>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add an opening for a curator role.
+       **/
+      setChannelCreationEnabled: AugmentedSubmittable<(enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the capacity of the current active mint
+       **/
+      setMintCapacity: AugmentedSubmittable<(newCapacity: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Lead terminate curator application
+       **/
+      terminateCuratorApplication: AugmentedSubmittable<(curatorApplicationId: CuratorApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Lead can terminate and active curator
+       **/
+      terminateCuratorRole: AugmentedSubmittable<(curatorId: CuratorId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * An owner transfers channel ownership to a new owner.
+       * 
+       * Notice that working group participants cannot do this.
+       * Notice that censored or unlisted channel may still be transferred.
+       * Notice that transfers are unilateral, so new owner cannot block. This may be problematic: https://github.com/Joystream/substrate-runtime-joystream/issues/95
+       **/
+      transferChannelOwnership: AugmentedSubmittable<(channelId: ChannelId | AnyNumber | Uint8Array, newOwner: MemberId | AnyNumber | Uint8Array, newRoleAccount: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update channel as a curation actor
+       **/
+      updateChannelAsCurationActor: AugmentedSubmittable<(curationActor: CurationActor | { Lead: any } | { Curator: any } | string | Uint8Array, channelId: ChannelId | AnyNumber | Uint8Array, newVerified: Option<bool> | null | object | string | Uint8Array, newCurationStatus: Option<ChannelCurationStatus> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Channel owner updates some channel properties
+       **/
+      updateChannelAsOwner: AugmentedSubmittable<(channelId: ChannelId | AnyNumber | Uint8Array, newHandle: Option<Bytes> | null | object | string | Uint8Array, newTitle: Option<OptionalText> | null | object | string | Uint8Array, newDescription: Option<OptionalText> | null | object | string | Uint8Array, newAvatar: Option<OptionalText> | null | object | string | Uint8Array, newBanner: Option<OptionalText> | null | object | string | Uint8Array, newPublicationStatus: Option<ChannelPublicationStatus> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * An active curator can update the reward account associated
+       * with a set reward relationship.
+       **/
+      updateCuratorRewardAccount: AugmentedSubmittable<(curatorId: CuratorId | AnyNumber | Uint8Array, newRewardAccount: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * An active curator can update the associated role account.
+       **/
+      updateCuratorRoleAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, curatorId: CuratorId | AnyNumber | Uint8Array, newRoleAccount: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      withdrawCuratorApplication: AugmentedSubmittable<(curatorApplicationId: CuratorApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    council: {
+      /**
+       * Adds a zero staked council member. A member added in this way does not get a recurring reward.
+       **/
+      addCouncilMember: AugmentedSubmittable<(account: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove a single council member and their reward.
+       **/
+      removeCouncilMember: AugmentedSubmittable<(accountToRemove: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Force set a zero staked council. Stakes in existing council seats are not returned.
+       * Existing council rewards are removed and new council members do NOT get any rewards.
+       * Avoid using this call if possible, will be deprecated. The term of the new council is
+       * not extended.
+       **/
+      setCouncil: AugmentedSubmittable<(accounts: Vec<AccountId> | (AccountId | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the capacity of the the council mint, if it doesn't exist, attempts to
+       * create a new one.
+       **/
+      setCouncilMintCapacity: AugmentedSubmittable<(capacity: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the council rewards which is only applied on new council being elected.
+       **/
+      setCouncilRewards: AugmentedSubmittable<(amountPerPayout: BalanceOf | AnyNumber | Uint8Array, payoutInterval: Option<BlockNumber> | null | object | string | Uint8Array, firstPayoutAfterRewardCreated: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set blocknumber when council term will end
+       **/
+      setTermEndsAt: AugmentedSubmittable<(endsAt: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Attempts to mint and transfer amount to destination account
+       **/
+      spendFromCouncilMint: AugmentedSubmittable<(amount: BalanceOf | AnyNumber | Uint8Array, destination: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    councilElection: {
+      apply: AugmentedSubmittable<(stake: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      forceStartElection: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      forceStopElection: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      reveal: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, vote: AccountId | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setAutoStart: AugmentedSubmittable<(flag: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets new election parameters. Some combination of parameters that are not desirable, so
+       * the parameters are checked for validity.
+       * The call will fail if an election is in progress. If a council is not being elected for some
+       * reaon after multiple rounds, force_stop_election() can be called to stop elections and followed by
+       * set_election_parameters().
+       **/
+      setElectionParameters: AugmentedSubmittable<(params: ElectionParameters | { announcing_period?: any; voting_period?: any; revealing_period?: any; council_size?: any; candidacy_limit?: any; new_term_duration?: any; min_council_stake?: any; min_voting_stake?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setStageAnnouncing: AugmentedSubmittable<(endsAt: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setStageRevealing: AugmentedSubmittable<(endsAt: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setStageVoting: AugmentedSubmittable<(endsAt: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      vote: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, stake: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    dataDirectory: {
+      /**
+       * Storage provider accepts a content. Requires signed storage provider account and its id.
+       * The LiaisonJudgement can be updated, but only by the liaison.
+       **/
+      acceptContent: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, contentId: ContentId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Adds the content to the system. Member id should match its origin. The created DataObject
+       * awaits liaison to accept or reject it.
+       **/
+      addContent: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, contentId: ContentId | string | Uint8Array, typeId: DataObjectTypeId | AnyNumber | Uint8Array, size: u64 | AnyNumber | Uint8Array, ipfsContentId: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Injects a set of data objects and their corresponding content id into the directory.
+       * The operation is "silent" - no events will be emitted as objects are added.
+       * The number of objects that can be added per call is limited to prevent the dispatch
+       * from causing the block production to fail if it takes too much time to process.
+       * Existing data objects will be overwritten.
+       **/
+      injectDataObjects: AugmentedSubmittable<(objects: DataObjectsMap) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Storage provider rejects a content. Requires signed storage provider account and its id.
+       * The LiaisonJudgement can be updated, but only by the liaison.
+       **/
+      rejectContent: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, contentId: ContentId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Removes the content id from the list of known content ids. Requires root privileges.
+       **/
+      removeKnownContentId: AugmentedSubmittable<(contentId: ContentId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    dataObjectStorageRegistry: {
+      /**
+       * Add storage provider-to-content relationship. The storage provider should be registered
+       * in the storage working group.
+       **/
+      addRelationship: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, cid: ContentId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Activates storage provider-to-content relationship. The storage provider should be registered
+       * in the storage working group. A storage provider may flip their own ready state, but nobody else.
+       **/
+      setRelationshipReady: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, id: DataObjectStorageRelationshipId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Deactivates storage provider-to-content relationship. The storage provider should be registered
+       * in the storage working group. A storage provider may flip their own ready state, but nobody else.
+       **/
+      unsetRelationshipReady: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, id: DataObjectStorageRelationshipId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    dataObjectTypeRegistry: {
+      /**
+       * Activates existing data object type. Requires leader privileges.
+       **/
+      activateDataObjectType: AugmentedSubmittable<(id: DataObjectTypeId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Deactivates existing data object type. Requires leader privileges.
+       **/
+      deactivateDataObjectType: AugmentedSubmittable<(id: DataObjectTypeId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Registers the new data object type. Requires leader privileges.
+       **/
+      registerDataObjectType: AugmentedSubmittable<(dataObjectType: DataObjectType | { description?: any; active?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Updates existing data object type. Requires leader privileges.
+       **/
+      updateDataObjectType: AugmentedSubmittable<(id: DataObjectTypeId | AnyNumber | Uint8Array, dataObjectType: DataObjectType | { description?: any; active?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    discovery: {
+      /**
+       * Sets bootstrap endpoints for the Colossus. Requires root privileges.
+       **/
+      setBootstrapEndpoints: AugmentedSubmittable<(endpoints: Vec<Url> | (Url | string)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets default lifetime for storage providers accounts info. Requires root privileges.
+       **/
+      setDefaultLifetime: AugmentedSubmittable<(lifetime: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Creates the ServiceProviderRecord to save an IPNS identity for the storage provider.
+       * Requires signed storage provider credentials.
+       **/
+      setIpnsId: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array, id: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Deletes the ServiceProviderRecord with the IPNS identity for the storage provider.
+       * Requires signed storage provider credentials.
+       **/
+      unsetIpnsId: AugmentedSubmittable<(storageProviderId: StorageProviderId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    finalityTracker: {
+      /**
+       * Hint that the author of this block thinks the best finalized
+       * block is the given number.
+       **/
+      finalHint: AugmentedSubmittable<(hint: Compact<BlockNumber> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    forum: {
+      /**
+       * Edit post text
+       **/
+      addPost: AugmentedSubmittable<(threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add a new category.
+       **/
+      createCategory: AugmentedSubmittable<(parent: Option<CategoryId> | null | object | string | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create new thread in category
+       **/
+      createThread: AugmentedSubmittable<(categoryId: CategoryId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Edit post text
+       **/
+      editPostText: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array, newText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Moderate post
+       **/
+      moderatePost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Moderate thread
+       **/
+      moderateThread: AugmentedSubmittable<(threadId: ThreadId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set forum sudo.
+       **/
+      setForumSudo: AugmentedSubmittable<(newForumSudo: Option<AccountId> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update category
+       **/
+      updateCategory: AugmentedSubmittable<(categoryId: CategoryId | AnyNumber | Uint8Array, newArchivalStatus: Option<bool> | null | object | string | Uint8Array, newDeletionStatus: Option<bool> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    grandpa: {
+      /**
+       * Report voter equivocation/misbehavior. This method will verify the
+       * equivocation proof and validate the given key ownership proof
+       * against the extracted offender. If both are valid, the offence
+       * will be reported.
+       * 
+       * Since the weight of the extrinsic is 0, in order to avoid DoS by
+       * submission of invalid equivocation reports, a mandatory pre-validation of
+       * the extrinsic is implemented in a `SignedExtension`.
+       **/
+      reportEquivocation: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    imOnline: {
+      /**
+       * # <weight>
+       * - Complexity: `O(K + E)` where K is length of `Keys` and E is length of
+       * `Heartbeat.network_state.external_address`
+       * 
+       * - `O(K)`: decoding of length `K`
+       * - `O(E)`: decoding/encoding of length `E`
+       * - DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,
+       * `ReceivedHeartbeats`
+       * - DbWrites: `ReceivedHeartbeats`
+       * # </weight>
+       **/
+      heartbeat: AugmentedSubmittable<(heartbeat: Heartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    members: {
+      addScreenedMember: AugmentedSubmittable<(newMemberAccount: AccountId | string | Uint8Array, handle: Option<Bytes> | null | object | string | Uint8Array, avatarUri: Option<Bytes> | null | object | string | Uint8Array, about: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Non-members can buy membership
+       **/
+      buyMembership: AugmentedSubmittable<(paidTermsId: PaidTermId | AnyNumber | Uint8Array, handle: Option<Bytes> | null | object | string | Uint8Array, avatarUri: Option<Bytes> | null | object | string | Uint8Array, about: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Change member's about text
+       **/
+      changeMemberAboutText: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Change member's avatar
+       **/
+      changeMemberAvatar: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, uri: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Change member's handle. Will ensure new handle is unique and old one will be available
+       * for other members to use.
+       **/
+      changeMemberHandle: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, handle: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setControllerAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, newControllerAccount: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setRootAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, newRootAccount: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setScreeningAuthority: AugmentedSubmittable<(authority: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update member's all or some of handle, avatar and about text.
+       **/
+      updateMembership: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, handle: Option<Bytes> | null | object | string | Uint8Array, avatarUri: Option<Bytes> | null | object | string | Uint8Array, about: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    memo: {
+      updateMemo: AugmentedSubmittable<(memo: MemoText | string) => SubmittableExtrinsic<ApiType>>;
+    };
+    proposalsCodex: {
+      /**
+       * Create 'Add working group leader opening' proposal type.
+       * This proposal uses `add_opening()` extrinsic from the Joystream `working group` module.
+       **/
+      createAddWorkingGroupLeaderOpeningProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, addOpeningParameters: AddOpeningParameters | { activate_at?: any; commitment?: any; human_readable_text?: any; working_group?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Begin review working group leader applications' proposal type.
+       * This proposal uses `begin_applicant_review()` extrinsic from the Joystream `working group` module.
+       **/
+      createBeginReviewWorkingGroupLeaderApplicationsProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, openingId: OpeningId | AnyNumber | Uint8Array, workingGroup: WorkingGroup | 'Storage' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'decrease working group leader stake' proposal type.
+       * This proposal uses `decrease_stake()` extrinsic from the `working-group`  module.
+       **/
+      createDecreaseWorkingGroupLeaderStakeProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, workerId: WorkerId | AnyNumber | Uint8Array, decreasingStake: BalanceOf | AnyNumber | Uint8Array, workingGroup: WorkingGroup | 'Storage' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Fill working group leader opening' proposal type.
+       * This proposal uses `fill_opening()` extrinsic from the Joystream `working group` module.
+       **/
+      createFillWorkingGroupLeaderOpeningProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, fillOpeningParameters: FillOpeningParameters | { opening_id?: any; successful_application_id?: any; reward_policy?: any; working_group?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Runtime upgrade' proposal type. Runtime upgrade can be initiated only by
+       * members from the hardcoded list `RuntimeUpgradeProposalAllowedProposers`
+       **/
+      createRuntimeUpgradeProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Set content working group mint capacity' proposal type.
+       * This proposal uses `set_mint_capacity()` extrinsic from the `content-working-group`  module.
+       **/
+      createSetContentWorkingGroupMintCapacityProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, mintBalance: BalanceOfMint | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Set election parameters' proposal type. This proposal uses `set_election_parameters()`
+       * extrinsic from the `governance::election module`.
+       **/
+      createSetElectionParametersProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, electionParameters: ElectionParameters | { announcing_period?: any; voting_period?: any; revealing_period?: any; council_size?: any; candidacy_limit?: any; new_term_duration?: any; min_council_stake?: any; min_voting_stake?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Set lead' proposal type.
+       * This proposal uses `replace_lead()` extrinsic from the `content_working_group`  module.
+       **/
+      createSetLeadProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, newLead: Option<ITuple<[MemberId, AccountId]>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Evict storage provider' proposal type.
+       * This proposal uses `set_validator_count()` extrinsic from the Substrate `staking`  module.
+       **/
+      createSetValidatorCountProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, newValidatorCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'set working group leader reward' proposal type.
+       * This proposal uses `update_reward_amount()` extrinsic from the `working-group`  module.
+       **/
+      createSetWorkingGroupLeaderRewardProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, workerId: WorkerId | AnyNumber | Uint8Array, rewardAmount: BalanceOfMint | AnyNumber | Uint8Array, workingGroup: WorkingGroup | 'Storage' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Set working group mint capacity' proposal type.
+       * This proposal uses `set_mint_capacity()` extrinsic from the `working-group`  module.
+       **/
+      createSetWorkingGroupMintCapacityProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, mintBalance: BalanceOfMint | AnyNumber | Uint8Array, workingGroup: WorkingGroup | 'Storage' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'slash working group leader stake' proposal type.
+       * This proposal uses `slash_stake()` extrinsic from the `working-group`  module.
+       **/
+      createSlashWorkingGroupLeaderStakeProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, workerId: WorkerId | AnyNumber | Uint8Array, slashingStake: BalanceOf | AnyNumber | Uint8Array, workingGroup: WorkingGroup | 'Storage' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Spending' proposal type.
+       * This proposal uses `spend_from_council_mint()` extrinsic from the `governance::council`  module.
+       **/
+      createSpendingProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, balance: BalanceOfMint | AnyNumber | Uint8Array, destination: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'terminate working group leader rolw' proposal type.
+       * This proposal uses `terminate_role()` extrinsic from the `working-group`  module.
+       **/
+      createTerminateWorkingGroupLeaderRoleProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, terminateRoleParameters: TerminateRoleParameters | { worker_id?: any; rationale?: any; slash?: any; working_group?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Create 'Text (signal)' proposal type.
+       **/
+      createTextProposal: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, stakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Runtime upgrade proposal extrinsic.
+       * Should be used as callable object to pass to the `engine` module.
+       **/
+      executeRuntimeUpgradeProposal: AugmentedSubmittable<(wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Text proposal extrinsic. Should be used as callable object to pass to the `engine` module.
+       **/
+      executeTextProposal: AugmentedSubmittable<(text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    proposalsDiscussion: {
+      /**
+       * Adds a post with author origin check.
+       **/
+      addPost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Updates a post with author origin check. Update attempts number is limited.
+       **/
+      updatePost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    proposalsEngine: {
+      /**
+       * Cancel a proposal by its original proposer.
+       **/
+      cancelProposal: AugmentedSubmittable<(proposerId: MemberId | AnyNumber | Uint8Array, proposalId: ProposalId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Veto a proposal. Must be root.
+       **/
+      vetoProposal: AugmentedSubmittable<(proposalId: ProposalId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Vote extrinsic. Conditions:  origin must allow votes.
+       **/
+      vote: AugmentedSubmittable<(voterId: MemberId | AnyNumber | Uint8Array, proposalId: ProposalId | AnyNumber | Uint8Array, vote: VoteKind | 'Approve'|'Reject'|'Slash'|'Abstain' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    session: {
+      /**
+       * Removes any session key(s) of the function caller.
+       * This doesn't take effect until the next session.
+       * 
+       * The dispatch origin of this function must be signed.
+       * 
+       * # <weight>
+       * - Complexity: `O(1)` in number of key types.
+       * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.
+       * - DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`
+       * - DbWrites: `NextKeys`, `origin account`
+       * - DbWrites per key id: `KeyOwnder`
+       * # </weight>
+       **/
+      purgeKeys: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the session key(s) of the function caller to `keys`.
+       * Allows an account to set its session key prior to becoming a validator.
+       * This doesn't take effect until the next session.
+       * 
+       * The dispatch origin of this function must be signed.
+       * 
+       * # <weight>
+       * - Complexity: `O(1)`
+       * Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed.
+       * - DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`
+       * - DbWrites: `origin account`, `NextKeys`
+       * - DbReads per key id: `KeyOwner`
+       * - DbWrites per key id: `KeyOwner`
+       * # </weight>
+       **/
+      setKeys: AugmentedSubmittable<(keys: Keys, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    staking: {
+      /**
+       * Take the origin account as a stash and lock up `value` of its balance. `controller` will
+       * be the account that controls it.
+       * 
+       * `value` must be more than the `minimum_balance` specified by `T::Currency`.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the stash account.
+       * 
+       * Emits `Bonded`.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Moderate complexity.
+       * - O(1).
+       * - Three extra DB entries.
+       * 
+       * NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned
+       * unless the `origin` falls below _existential deposit_ and gets removed as dust.
+       * ------------------
+       * Base Weight: 67.87 µs
+       * DB Weight:
+       * - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks
+       * - Write: Bonded, Payee, [Origin Account], Locks, Ledger
+       * # </weight>
+       **/
+      bond: AugmentedSubmittable<(controller: LookupSource | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, payee: RewardDestination | 'Staked'|'Stash'|'Controller' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add some extra amount that have appeared in the stash `free_balance` into the balance up
+       * for staking.
+       * 
+       * Use this if there are additional funds in your stash account that you wish to bond.
+       * Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount
+       * that can be added.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the stash, not the controller and
+       * it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * Emits `Bonded`.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Insignificant complexity.
+       * - O(1).
+       * - One DB entry.
+       * ------------
+       * Base Weight: 54.88 µs
+       * DB Weight:
+       * - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks
+       * - Write: [Origin Account], Locks, Ledger
+       * # </weight>
+       **/
+      bondExtra: AugmentedSubmittable<(maxAdditional: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Cancel enactment of a deferred slash.
+       * 
+       * Can be called by the `T::SlashCancelOrigin`.
+       * 
+       * Parameters: era and indices of the slashes for that era to kill.
+       * 
+       * # <weight>
+       * Complexity: O(U + S)
+       * with U unapplied slashes weighted with U=1000
+       * and S is the number of slash indices to be canceled.
+       * - Base: 5870 + 34.61 * S µs
+       * - Read: Unapplied Slashes
+       * - Write: Unapplied Slashes
+       * # </weight>
+       **/
+      cancelDeferredSlash: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Declare no desire to either validate or nominate.
+       * 
+       * Effects will be felt at the beginning of the next era.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * And, it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Insignificant complexity.
+       * - Contains one read.
+       * - Writes are limited to the `origin` account key.
+       * --------
+       * Base Weight: 16.53 µs
+       * DB Weight:
+       * - Read: EraElectionStatus, Ledger
+       * - Write: Validators, Nominators
+       * # </weight>
+       **/
+      chill: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Force there to be a new era at the end of the next session. After this, it will be
+       * reset to normal (non-forced) behaviour.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * - No arguments.
+       * - Base Weight: 1.959 µs
+       * - Write ForceEra
+       * # </weight>
+       **/
+      forceNewEra: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Force there to be a new era at the end of sessions indefinitely.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * - Base Weight: 2.05 µs
+       * - Write: ForceEra
+       * # </weight>
+       **/
+      forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Force there to be no new eras indefinitely.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * - No arguments.
+       * - Base Weight: 1.857 µs
+       * - Write: ForceEra
+       * # </weight>
+       **/
+      forceNoEras: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Force a current staker to become completely unstaked, immediately.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * O(S) where S is the number of slashing spans to be removed
+       * Base Weight: 53.07 + 2.365 * S µs
+       * Reads: Bonded, Slashing Spans, Account, Locks
+       * Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Account, Locks
+       * Writes Each: SpanSlash * S
+       * # </weight>
+       **/
+      forceUnstake: AugmentedSubmittable<(stash: AccountId | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Increments the ideal number of validators.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * Base Weight: 1.717 µs
+       * Read/Write: Validator Count
+       * # </weight>
+       **/
+      increaseValidatorCount: AugmentedSubmittable<(additional: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Declare the desire to nominate `targets` for the origin controller.
+       * 
+       * Effects will be felt at the beginning of the next era. This can only be called when
+       * [`EraElectionStatus`] is `Closed`.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * And, it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * # <weight>
+       * - The transaction's complexity is proportional to the size of `targets` (N)
+       * which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
+       * - Both the reads and writes follow a similar pattern.
+       * ---------
+       * Base Weight: 22.34 + .36 * N µs
+       * where N is the number of targets
+       * DB Weight:
+       * - Reads: Era Election Status, Ledger, Current Era
+       * - Writes: Validators, Nominators
+       * # </weight>
+       **/
+      nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Pay out all the stakers behind a single validator for a single era.
+       * 
+       * - `validator_stash` is the stash account of the validator. Their nominators, up to
+       * `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.
+       * - `era` may be any era between `[current_era - history_depth; current_era]`.
+       * 
+       * The origin of this call must be _Signed_. Any account can call this function, even if
+       * it is not one of the stakers.
+       * 
+       * This can only be called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * # <weight>
+       * - Time complexity: at most O(MaxNominatorRewardedPerValidator).
+       * - Contains a limited number of reads and writes.
+       * -----------
+       * N is the Number of payouts for the validator (including the validator)
+       * Base Weight:
+       * - Reward Destination Staked: 110 + 54.2 * N µs (Median Slopes)
+       * - Reward Destination Controller (Creating): 120 + 41.95 * N µs (Median Slopes)
+       * DB Weight:
+       * - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,
+       * ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)
+       * - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)
+       * - Write Each: System Account, Locks, Ledger (3 items)
+       * # </weight>
+       **/
+      payoutStakers: AugmentedSubmittable<(validatorStash: AccountId | string | Uint8Array, era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove all data structure concerning a staker/stash once its balance is zero.
+       * This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone
+       * and the target `stash` must have no funds left.
+       * 
+       * This can be called from any origin.
+       * 
+       * - `stash`: The stash account to reap. Its balance must be zero.
+       * 
+       * # <weight>
+       * Complexity: O(S) where S is the number of slashing spans on the account.
+       * Base Weight: 75.94 + 2.396 * S µs
+       * DB Weight:
+       * - Reads: Stash Account, Bonded, Slashing Spans, Locks
+       * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, Stash Account, Locks
+       * - Writes Each: SpanSlash * S
+       * # </weight>
+       **/
+      reapStash: AugmentedSubmittable<(stash: AccountId | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Rebond a portion of the stash scheduled to be unlocked.
+       * 
+       * The dispatch origin must be signed by the controller, and it can be only called when
+       * [`EraElectionStatus`] is `Closed`.
+       * 
+       * # <weight>
+       * - Time complexity: O(L), where L is unlocking chunks
+       * - Bounded by `MAX_UNLOCKING_CHUNKS`.
+       * - Storage changes: Can't increase storage, only decrease it.
+       * ---------------
+       * - Base Weight: 34.51 µs * .048 L µs
+       * - DB Weight:
+       * - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]
+       * - Writes: [Origin Account], Locks, Ledger
+       * # </weight>
+       **/
+      rebond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Scale up the ideal number of validators by a factor.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * Base Weight: 1.717 µs
+       * Read/Write: Validator Count
+       * # </weight>
+       **/
+      scaleValidatorCount: AugmentedSubmittable<(factor: Percent | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * (Re-)set the controller of a stash.
+       * 
+       * Effects will be felt at the beginning of the next era.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the stash, not the controller.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Insignificant complexity.
+       * - Contains a limited number of reads.
+       * - Writes are limited to the `origin` account key.
+       * ----------
+       * Base Weight: 25.22 µs
+       * DB Weight:
+       * - Read: Bonded, Ledger New Controller, Ledger Old Controller
+       * - Write: Bonded, Ledger New Controller, Ledger Old Controller
+       * # </weight>
+       **/
+      setController: AugmentedSubmittable<(controller: LookupSource | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set `HistoryDepth` value. This function will delete any history information
+       * when `HistoryDepth` is reduced.
+       * 
+       * Parameters:
+       * - `new_history_depth`: The new history depth you would like to set.
+       * - `era_items_deleted`: The number of items that will be deleted by this dispatch.
+       * This should report all the storage items that will be deleted by clearing old
+       * era history. Needed to report an accurate weight for the dispatch. Trusted by
+       * `Root` to report an accurate number.
+       * 
+       * Origin must be root.
+       * 
+       * # <weight>
+       * - E: Number of history depths removed, i.e. 10 -> 7 = 3
+       * - Base Weight: 29.13 * E µs
+       * - DB Weight:
+       * - Reads: Current Era, History Depth
+       * - Writes: History Depth
+       * - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs
+       * - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake, ErasStartSessionIndex
+       * # </weight>
+       **/
+      setHistoryDepth: AugmentedSubmittable<(newHistoryDepth: Compact<EraIndex> | AnyNumber | Uint8Array, eraItemsDeleted: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the validators who cannot be slashed (if any).
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * - O(V)
+       * - Base Weight: 2.208 + .006 * V µs
+       * - Write: Invulnerables
+       * # </weight>
+       **/
+      setInvulnerables: AugmentedSubmittable<(validators: Vec<AccountId> | (AccountId | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * (Re-)set the payment target for a controller.
+       * 
+       * Effects will be felt at the beginning of the next era.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Insignificant complexity.
+       * - Contains a limited number of reads.
+       * - Writes are limited to the `origin` account key.
+       * ---------
+       * - Base Weight: 11.33 µs
+       * - DB Weight:
+       * - Read: Ledger
+       * - Write: Payee
+       * # </weight>
+       **/
+      setPayee: AugmentedSubmittable<(payee: RewardDestination | 'Staked'|'Stash'|'Controller' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the ideal number of validators.
+       * 
+       * The dispatch origin must be Root.
+       * 
+       * # <weight>
+       * Base Weight: 1.717 µs
+       * Write: Validator Count
+       * # </weight>
+       **/
+      setValidatorCount: AugmentedSubmittable<(updated: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Submit an election result to the chain. If the solution:
+       * 
+       * 1. is valid.
+       * 2. has a better score than a potentially existing solution on chain.
+       * 
+       * then, it will be _put_ on chain.
+       * 
+       * A solution consists of two pieces of data:
+       * 
+       * 1. `winners`: a flat vector of all the winners of the round.
+       * 2. `assignments`: the compact version of an assignment vector that encodes the edge
+       * weights.
+       * 
+       * Both of which may be computed using _phragmen_, or any other algorithm.
+       * 
+       * Additionally, the submitter must provide:
+       * 
+       * - The `score` that they claim their solution has.
+       * 
+       * Both validators and nominators will be represented by indices in the solution. The
+       * indices should respect the corresponding types ([`ValidatorIndex`] and
+       * [`NominatorIndex`]). Moreover, they should be valid when used to index into
+       * [`SnapshotValidators`] and [`SnapshotNominators`]. Any invalid index will cause the
+       * solution to be rejected. These two storage items are set during the election window and
+       * may be used to determine the indices.
+       * 
+       * A solution is valid if:
+       * 
+       * 0. It is submitted when [`EraElectionStatus`] is `Open`.
+       * 1. Its claimed score is equal to the score computed on-chain.
+       * 2. Presents the correct number of winners.
+       * 3. All indexes must be value according to the snapshot vectors. All edge values must
+       * also be correct and should not overflow the granularity of the ratio type (i.e. 256
+       * or billion).
+       * 4. For each edge, all targets are actually nominated by the voter.
+       * 5. Has correct self-votes.
+       * 
+       * A solutions score is consisted of 3 parameters:
+       * 
+       * 1. `min { support.total }` for each support of a winner. This value should be maximized.
+       * 2. `sum { support.total }` for each support of a winner. This value should be minimized.
+       * 3. `sum { support.total^2 }` for each support of a winner. This value should be
+       * minimized (to ensure less variance)
+       * 
+       * # <weight>
+       * See `crate::weight` module.
+       * # </weight>
+       **/
+      submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Unsigned version of `submit_election_solution`.
+       * 
+       * Note that this must pass the [`ValidateUnsigned`] check which only allows transactions
+       * from the local node to be included. In other words, only the block author can include a
+       * transaction in the block.
+       * 
+       * # <weight>
+       * See `crate::weight` module.
+       * # </weight>
+       **/
+      submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: ElectionScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Schedule a portion of the stash to be unlocked ready for transfer out after the bond
+       * period ends. If this leaves an amount actively bonded less than
+       * T::Currency::minimum_balance(), then it is increased to the full amount.
+       * 
+       * Once the unlock period is done, you can call `withdraw_unbonded` to actually move
+       * the funds out of management ready for transfer.
+       * 
+       * No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
+       * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
+       * to be called first to remove some of the chunks (if possible).
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * And, it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * Emits `Unbonded`.
+       * 
+       * See also [`Call::withdraw_unbonded`].
+       * 
+       * # <weight>
+       * - Independent of the arguments. Limited but potentially exploitable complexity.
+       * - Contains a limited number of reads.
+       * - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)
+       * will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.
+       * The only way to clean the aforementioned storage item is also user-controlled via
+       * `withdraw_unbonded`.
+       * - One DB entry.
+       * ----------
+       * Base Weight: 50.34 µs
+       * DB Weight:
+       * - Read: Era Election Status, Ledger, Current Era, Locks, [Origin Account]
+       * - Write: [Origin Account], Locks, Ledger
+       * </weight>
+       **/
+      unbond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Declare the desire to validate for the origin controller.
+       * 
+       * Effects will be felt at the beginning of the next era.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * And, it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * # <weight>
+       * - Independent of the arguments. Insignificant complexity.
+       * - Contains a limited number of reads.
+       * - Writes are limited to the `origin` account key.
+       * -----------
+       * Base Weight: 17.13 µs
+       * DB Weight:
+       * - Read: Era Election Status, Ledger
+       * - Write: Nominators, Validators
+       * # </weight>
+       **/
+      validate: AugmentedSubmittable<(prefs: ValidatorPrefs | { commission?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Remove any unlocked chunks from the `unlocking` queue from our management.
+       * 
+       * This essentially frees up that balance to be used by the stash account to do
+       * whatever it wants.
+       * 
+       * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
+       * And, it can be only called when [`EraElectionStatus`] is `Closed`.
+       * 
+       * Emits `Withdrawn`.
+       * 
+       * See also [`Call::unbond`].
+       * 
+       * # <weight>
+       * - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.
+       * It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is
+       * indirectly user-controlled. See [`unbond`] for more detail.
+       * - Contains a limited number of reads, yet the size of which could be large based on `ledger`.
+       * - Writes are limited to the `origin` account key.
+       * ---------------
+       * Complexity O(S) where S is the number of slashing spans to remove
+       * Base Weight:
+       * Update: 50.52 + .028 * S µs
+       * - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]
+       * - Writes: [Origin Account], Locks, Ledger
+       * Kill: 79.41 + 2.366 * S µs
+       * - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin Account], Locks
+       * - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators, [Origin Account], Locks
+       * - Writes Each: SpanSlash * S
+       * NOTE: Weight annotation is the kill scenario, we refund otherwise.
+       * # </weight>
+       **/
+      withdrawUnbonded: AugmentedSubmittable<(numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    storageWorkingGroup: {
+      /**
+       * Begin accepting worker applications to an opening that is active.
+       * Require signed leader origin or the root (to accept applications for the leader position).
+       **/
+      acceptApplications: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Add an opening for a worker role.
+       * Require signed leader origin or the root (to add opening for the leader position).
+       **/
+      addOpening: AugmentedSubmittable<(activateAt: ActivateOpeningAt | { CurrentBlock: any } | { ExactBlock: any } | string | Uint8Array, commitment: OpeningPolicyCommitment | { application_rationing_policy?: any; max_review_period_length?: any; application_staking_policy?: any; role_staking_policy?: any; role_slashing_terms?: any; fill_opening_successful_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_application_stake_unstaking_period?: any; fill_opening_failed_applicant_role_stake_unstaking_period?: any; terminate_curator_application_stake_unstaking_period?: any; terminate_curator_role_stake_unstaking_period?: any; exit_curator_role_application_stake_unstaking_period?: any; exit_curator_role_stake_unstaking_period?: any } | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Worker' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Apply on a worker opening.
+       **/
+      applyOnOpening: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, openingId: OpeningId | AnyNumber | Uint8Array, roleAccountId: AccountId | string | Uint8Array, optRoleStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, optApplicationStakeBalance: Option<BalanceOf> | null | object | string | Uint8Array, humanReadableText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Begin reviewing, and therefore not accepting new applications.
+       * Require signed leader origin or the root (to begin review applications for the leader position).
+       **/
+      beginApplicantReview: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Decreases the worker/lead stake and returns the remainder to the worker role_account_id.
+       * Can be decreased to zero, no actions on zero stake.
+       * Require signed leader origin or the root (to decrease the leader stake).
+       **/
+      decreaseStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Fill opening for worker/lead.
+       * Require signed leader origin or the root (to fill opening for the leader position).
+       **/
+      fillOpening: AugmentedSubmittable<(openingId: OpeningId | AnyNumber | Uint8Array, successfulApplicationIds: ApplicationIdSet, rewardPolicy: Option<RewardPolicy> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Increases the worker/lead stake, demands a worker origin. Transfers tokens from the worker
+       * role_account_id to the stake. No limits on the stake.
+       **/
+      increaseStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Leave the role by the active worker.
+       **/
+      leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the capacity to enable working group budget. Requires root origin.
+       **/
+      setMintCapacity: AugmentedSubmittable<(newCapacity: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Slashes the worker stake, demands a leader origin. No limits, no actions on zero stake.
+       * If slashing balance greater than the existing stake - stake is slashed to zero.
+       * Require signed leader origin or the root (to slash the leader stake).
+       **/
+      slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Terminate the worker application. Can be done by the lead only.
+       **/
+      terminateApplication: AugmentedSubmittable<(applicationId: ApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Terminate the active worker by the lead.
+       * Require signed leader origin or the root (to terminate the leader role).
+       **/
+      terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationaleText: Bytes | string | Uint8Array, slashStake: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the reward account associated with a set reward relationship for the active worker.
+       **/
+      updateRewardAccount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newRewardAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the reward amount associated with a set reward relationship for the active worker.
+       * Require signed leader origin or the root (to update leader reward amount).
+       **/
+      updateRewardAmount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newAmount: BalanceOfMint | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Update the associated role account of the active worker/lead.
+       **/
+      updateRoleAccount: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, newRoleAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Withdraw the worker application. Can be done by the worker itself only.
+       **/
+      withdrawApplication: AugmentedSubmittable<(applicationId: ApplicationId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    sudo: {
+      /**
+       * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - O(1).
+       * - Limited storage reads.
+       * - One DB change.
+       * # </weight>
+       **/
+      setKey: AugmentedSubmittable<(updated: LookupSource | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Authenticates the sudo key and dispatches a function call with `Root` origin.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - O(1).
+       * - Limited storage reads.
+       * - One DB write (event).
+       * - Weight of derivative `call` execution + 10,000.
+       * # </weight>
+       **/
+      sudo: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Authenticates the sudo key and dispatches a function call with `Signed` origin from
+       * a given account.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - O(1).
+       * - Limited storage reads.
+       * - One DB write (event).
+       * - Weight of derivative `call` execution + 10,000.
+       * # </weight>
+       **/
+      sudoAs: AugmentedSubmittable<(who: LookupSource | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Authenticates the sudo key and dispatches a function call with `Root` origin.
+       * This function does not check the weight of the call, and instead allows the
+       * Sudo user to specify the weight of the call.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - O(1).
+       * - The weight of this call is defined by the caller.
+       * # </weight>
+       **/
+      sudoUncheckedWeight: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    system: {
+      /**
+       * A dispatch that will fill the block weight up to the given ratio.
+       **/
+      fillBlock: AugmentedSubmittable<(ratio: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Kill all storage items with a key that starts with the given prefix.
+       * 
+       * **NOTE:** We rely on the Root origin to provide us the number of subkeys under
+       * the prefix we are removing to accurately calculate the weight of this function.
+       * 
+       * # <weight>
+       * - `O(P)` where `P` amount of keys with prefix `prefix`
+       * - `P` storage deletions.
+       * - Base Weight: 0.834 * P µs
+       * - Writes: Number of subkeys + 1
+       * # </weight>
+       **/
+      killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Kill some items from storage.
+       * 
+       * # <weight>
+       * - `O(IK)` where `I` length of `keys` and `K` length of one key
+       * - `I` storage deletions.
+       * - Base Weight: .378 * i µs
+       * - Writes: Number of items
+       * # </weight>
+       **/
+      killStorage: AugmentedSubmittable<(keys: Vec<Key> | (Key | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Make some on-chain remark.
+       * 
+       * # <weight>
+       * - `O(1)`
+       * - Base Weight: 0.665 µs, independent of remark length.
+       * - No DB operations.
+       * # </weight>
+       **/
+      remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the new changes trie configuration.
+       * 
+       * # <weight>
+       * - `O(1)`
+       * - 1 storage write or delete (codec `O(1)`).
+       * - 1 call to `deposit_log`: Uses `append` API, so O(1)
+       * - Base Weight: 7.218 µs
+       * - DB Weight:
+       * - Writes: Changes Trie, System Digest
+       * # </weight>
+       **/
+      setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<ChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the new runtime code.
+       * 
+       * # <weight>
+       * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`
+       * - 1 storage write (codec `O(C)`).
+       * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).
+       * - 1 event.
+       * The weight of this function is dependent on the runtime, but generally this is very expensive.
+       * We will treat this as a full block.
+       * # </weight>
+       **/
+      setCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the new runtime code without doing any checks of the given `code`.
+       * 
+       * # <weight>
+       * - `O(C)` where `C` length of `code`
+       * - 1 storage write (codec `O(C)`).
+       * - 1 event.
+       * The weight of this function is dependent on the runtime. We will treat this as a full block.
+       * # </weight>
+       **/
+      setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set the number of pages in the WebAssembly environment's heap.
+       * 
+       * # <weight>
+       * - `O(1)`
+       * - 1 storage write.
+       * - Base Weight: 1.405 µs
+       * - 1 write to HEAP_PAGES
+       * # </weight>
+       **/
+      setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Set some items of storage.
+       * 
+       * # <weight>
+       * - `O(I)` where `I` length of `items`
+       * - `I` storage writes (`O(1)`).
+       * - Base Weight: 0.568 * i µs
+       * - Writes: Number of items
+       * # </weight>
+       **/
+      setStorage: AugmentedSubmittable<(items: Vec<KeyValue> | (KeyValue)[]) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Kill the sending account, assuming there are no references outstanding and the composite
+       * data is equal to its default value.
+       * 
+       * # <weight>
+       * - `O(1)`
+       * - 1 storage read and deletion.
+       * --------------------
+       * Base Weight: 8.626 µs
+       * No DB Read or Write operations because caller is already in overlay
+       * # </weight>
+       **/
+      suicide: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
+    };
+    timestamp: {
+      /**
+       * Set the current time.
+       * 
+       * This call should be invoked exactly once per block. It will panic at the finalization
+       * phase, if this call hasn't been invoked by that time.
+       * 
+       * The timestamp should be greater than the previous one by the amount specified by
+       * `MinimumPeriod`.
+       * 
+       * The dispatch origin for this call must be `Inherent`.
+       * 
+       * # <weight>
+       * - `O(T)` where `T` complexity of `on_timestamp_set`
+       * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)
+       * - 1 event handler `on_timestamp_set` `O(T)`.
+       * - Benchmark: 7.678 (min squares analysis)
+       * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers.
+       * New benchmarking is needed when adding new handlers.
+       * # </weight>
+       **/
+      set: AugmentedSubmittable<(now: Compact<Moment> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+    };
+    utility: {
+      /**
+       * Send a call through an indexed pseudonym of the sender.
+       * 
+       * Filter from origin are passed along. The call will be dispatched with an origin which
+       * use the same filter as the origin of this call.
+       * 
+       * NOTE: If you need to ensure that any account-based filtering is not honored (i.e.
+       * because you expect `proxy` to have been used prior in the call stack and you do not want
+       * the call restrictions to apply to any sub-accounts), then use `as_sub` instead.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - Base weight: 2.861 µs
+       * - Plus the weight of the `call`
+       * # </weight>
+       **/
+      asLimitedSub: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Send a call through an indexed pseudonym of the sender.
+       * 
+       * NOTE: If you need to ensure that any account-based filtering is honored (i.e. because
+       * you expect `proxy` to have been used prior in the call stack and you want it to apply to
+       * any sub-accounts), then use `as_limited_sub` instead.
+       * 
+       * The dispatch origin for this call must be _Signed_.
+       * 
+       * # <weight>
+       * - Base weight: 2.861 µs
+       * - Plus the weight of the `call`
+       * # </weight>
+       **/
+      asSub: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Send a batch of dispatch calls.
+       * 
+       * May be called from any origin.
+       * 
+       * - `calls`: The calls to be dispatched from the same origin.
+       * 
+       * If origin is root then call are dispatch without checking origin filter. (This includes
+       * bypassing `frame_system::Trait::BaseCallFilter`).
+       * 
+       * # <weight>
+       * - Base weight: 14.39 + .987 * c µs
+       * - Plus the sum of the weights of the `calls`.
+       * - Plus one additional event. (repeat read/write)
+       * # </weight>
+       * 
+       * This will return `Ok` in all circumstances. To determine the success of the batch, an
+       * event is deposited. If a call failed and the batch was interrupted, then the
+       * `BatchInterrupted` event is deposited, along with the number of successful calls made
+       * and the error of the failed call. If all were successful, then the `BatchCompleted`
+       * event is deposited.
+       **/
+      batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+    };
+    versionedStorePermissions: {
+      addClassSchema: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, existingProperties: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], newProperties: Vec<Property> | (Property | { property_type?: any; required?: any; unique?: any; name?: any; description?: any; locking_policy?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
+      addSchemaSupportToEntity: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, asEntityMaintainer: bool | boolean | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, schemaId: u16 | AnyNumber | Uint8Array, propertyValues: Vec<ClassPropertyValue> | (ClassPropertyValue | null)[]) => SubmittableExtrinsic<ApiType>>;
+      createClass: AugmentedSubmittable<(name: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array, classPermissions: ClassPermissionsType | null) => SubmittableExtrinsic<ApiType>>;
+      createClassWithDefaultPermissions: AugmentedSubmittable<(name: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Creates a new entity of type class_id. The maintainer is set to be either None if the origin is root, or the provided credential
+       * associated with signer.
+       **/
+      createEntity: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setClassAddSchemasSet: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, credentialSet: CredentialSet) => SubmittableExtrinsic<ApiType>>;
+      /**
+       * Sets the admins for a class
+       **/
+      setClassAdmins: AugmentedSubmittable<(classId: ClassId | AnyNumber | Uint8Array, admins: CredentialSet) => SubmittableExtrinsic<ApiType>>;
+      setClassCreateEntitiesSet: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, credentialSet: CredentialSet) => SubmittableExtrinsic<ApiType>>;
+      setClassEntitiesCanBeCreated: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, canBeCreated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setClassEntityPermissions: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, entityPermissions: EntityPermissions | { controller?: any; frozen?: any; referenceable?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
+      setClassReferenceConstraint: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, classId: ClassId | AnyNumber | Uint8Array, constraint: ReferenceConstraint | null) => SubmittableExtrinsic<ApiType>>;
+      transaction: AugmentedSubmittable<(operations: Vec<Operation> | (Operation | null)[]) => SubmittableExtrinsic<ApiType>>;
+      updateEntityPropertyValues: AugmentedSubmittable<(withCredential: Option<Credential> | null | object | string | Uint8Array, asEntityMaintainer: bool | boolean | Uint8Array, entityId: EntityId | AnyNumber | Uint8Array, propertyValues: Vec<ClassPropertyValue> | (ClassPropertyValue | null)[]) => SubmittableExtrinsic<ApiType>>;
+    };
+  }
+
+  export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends AugmentedSubmittables<ApiType> {
+    (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType>;
+  }
+}

+ 7 - 0
types/augment-codec/augment-api.ts

@@ -0,0 +1,7 @@
+// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
+/* eslint-disable */
+
+import '@polkadot/api/augment/rpc';
+import './augment-api-consts';
+import './augment-api-query';
+import './augment-api-tx';

File diff suppressed because it is too large
+ 0 - 17
types/augment-codec/augment-types.ts


+ 31 - 31
types/augment/all/defs.json

@@ -1,5 +1,4 @@
 {
-    "MemoText": "Text",
     "Credential": "u64",
     "CredentialSet": "BTreeSet<Credential>",
     "BlockAndTime": {
@@ -27,6 +26,9 @@
         "max_count": "u16",
         "max_percent_pts_per_time": "u16"
     },
+    "MemoText": "Text",
+    "Address": "AccountId",
+    "LookupSource": "AccountId",
     "EntryMethod": {
         "_enum": {
             "Paid": "u64",
@@ -204,8 +206,8 @@
         "created_at": "u32",
         "total_minted": "u128"
     },
-    "MintBalanceOf": "Balance",
-    "BalanceOfMint": "Balance",
+    "MintBalanceOf": "u128",
+    "BalanceOfMint": "u128",
     "NextAdjustment": {
         "adjustment": "AdjustOnInterval",
         "at_block": "u32"
@@ -228,8 +230,8 @@
         "total_reward_missed": "u128"
     },
     "RewardRelationship": {
-        "recipient": "u64",
-        "mint_id": "u64",
+        "recipient": "RecipientId",
+        "mint_id": "MintId",
         "account": "GenericAccountId",
         "amount_per_payout": "u128",
         "next_payment_at_block": "Option<u32>",
@@ -240,11 +242,11 @@
     "ApplicationId": "u64",
     "OpeningId": "u64",
     "Application": {
-        "opening_id": "u64",
+        "opening_id": "OpeningId",
         "application_index_in_opening": "u32",
         "add_to_opening_in_block": "u32",
-        "active_role_staking_id": "Option<u64>",
-        "active_application_staking_id": "Option<u64>",
+        "active_role_staking_id": "Option<StakeId>",
+        "active_application_staking_id": "Option<StakeId>",
         "stage": "ApplicationStage",
         "human_readable_text": "Text"
     },
@@ -290,7 +292,7 @@
     },
     "ActiveOpeningStageVariant": {
         "stage": "ActiveOpeningStage",
-        "applications_added": "Vec<HiringApplicationId>",
+        "applications_added": "Vec<ApplicationId>",
         "active_application_count": "u32",
         "unstaking_application_count": "u32",
         "deactivated_application_count": "u32"
@@ -399,7 +401,7 @@
     },
     "Curator": {
         "role_account": "GenericAccountId",
-        "reward_relationship": "Option<u64>",
+        "reward_relationship": "Option<RewardRelationshipId>",
         "role_stake_profile": "Option<CuratorRoleStakeProfile>",
         "stage": "CuratorRoleStage",
         "induction": "CuratorInduction",
@@ -409,17 +411,17 @@
         "role_account": "GenericAccountId",
         "curator_opening_id": "CuratorOpeningId",
         "member_id": "MemberId",
-        "application_id": "HiringApplicationId"
+        "application_id": "ApplicationId"
     },
     "CuratorOpening": {
-        "opening_id": "u64",
+        "opening_id": "OpeningId",
         "curator_applications": "Vec<CuratorApplicationId>",
         "policy_commitment": "OpeningPolicyCommitment"
     },
     "Lead": {
         "member_id": "MemberId",
         "role_account": "GenericAccountId",
-        "reward_relationship": "Option<u64>",
+        "reward_relationship": "Option<RewardRelationshipId>",
         "inducted": "u32",
         "stage": "LeadRoleState"
     },
@@ -453,7 +455,7 @@
     "CuratorApplicationIdToCuratorIdMap": "BTreeMap<HiringApplicationId,CuratorId>",
     "CuratorApplicationIdSet": "BTreeSet<CuratorApplicationId>",
     "CuratorRoleStakeProfile": {
-        "stake_id": "u64",
+        "stake_id": "StakeId",
         "termination_unstaking_period": "Option<u32>",
         "exit_unstaking_period": "Option<u32>"
     },
@@ -492,22 +494,22 @@
     "RationaleText": "Bytes",
     "ApplicationOf": {
         "role_account_id": "GenericAccountId",
-        "opening_id": "u64",
+        "opening_id": "OpeningId",
         "member_id": "MemberId",
-        "application_id": "HiringApplicationId"
+        "application_id": "ApplicationId"
     },
-    "ApplicationIdSet": "BTreeSet<HiringApplicationId>",
-    "ApplicationIdToWorkerIdMap": "BTreeMap<HiringApplicationId,WorkerId>",
+    "ApplicationIdSet": "BTreeSet<ApplicationId>",
+    "ApplicationIdToWorkerIdMap": "BTreeMap<ApplicationId,WorkerId>",
     "WorkerId": "u64",
     "WorkerOf": {
         "member_id": "MemberId",
         "role_account_id": "GenericAccountId",
-        "reward_relationship": "Option<u64>",
+        "reward_relationship": "Option<RewardRelationshipId>",
         "role_stake_profile": "Option<RoleStakeProfile>"
     },
     "OpeningOf": {
-        "hiring_opening_id": "u64",
-        "applications": "Vec<HiringApplicationId>",
+        "hiring_opening_id": "OpeningId",
+        "applications": "Vec<ApplicationId>",
         "policy_commitment": "WorkingGroupOpeningPolicyCommitment",
         "opening_type": "OpeningType"
     },
@@ -539,7 +541,7 @@
         "exit_role_stake_unstaking_period": "Option<u32>"
     },
     "RoleStakeProfile": {
-        "stake_id": "u64",
+        "stake_id": "StakeId",
         "termination_unstaking_period": "Option<u32>",
         "exit_unstaking_period": "Option<u32>"
     },
@@ -606,7 +608,7 @@
             "SetValidatorCount": "u32",
             "SetStorageRoleParameters": "RoleParameters",
             "AddWorkingGroupLeaderOpening": "AddOpeningParameters",
-            "BeginReviewWorkingGroupLeaderApplication": "(u64,WorkingGroup)",
+            "BeginReviewWorkingGroupLeaderApplication": "(OpeningId,WorkingGroup)",
             "FillWorkingGroupLeaderOpening": "FillOpeningParameters",
             "SetWorkingGroupMintCapacity": "(Balance,WorkingGroup)",
             "DecreaseWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)",
@@ -627,7 +629,7 @@
             "SetValidatorCount": "u32",
             "SetStorageRoleParameters": "RoleParameters",
             "AddWorkingGroupLeaderOpening": "AddOpeningParameters",
-            "BeginReviewWorkingGroupLeaderApplication": "(u64,WorkingGroup)",
+            "BeginReviewWorkingGroupLeaderApplication": "(OpeningId,WorkingGroup)",
             "FillWorkingGroupLeaderOpening": "FillOpeningParameters",
             "SetWorkingGroupMintCapacity": "(Balance,WorkingGroup)",
             "DecreaseWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)",
@@ -683,8 +685,8 @@
         "working_group": "WorkingGroup"
     },
     "FillOpeningParameters": {
-        "opening_id": "u64",
-        "successful_application_id": "HiringApplicationId",
+        "opening_id": "OpeningId",
+        "successful_application_id": "ApplicationId",
         "reward_policy": "Option<RewardPolicy>",
         "working_group": "WorkingGroup"
     },
@@ -695,7 +697,7 @@
         "working_group": "WorkingGroup"
     },
     "ActiveStake": {
-        "stake_id": "u64",
+        "stake_id": "StakeId",
         "source_account_id": "GenericAccountId"
     },
     "Finalized": {
@@ -949,7 +951,5 @@
     "ClassPermissionsType": "Null",
     "ClassPropertyValue": "Null",
     "Operation": "Null",
-    "ReferenceConstraint": "Null",
-    "Address": "AccountId",
-    "LookupSource": "AccountId"
-}
+    "ReferenceConstraint": "Null"
+}

+ 27 - 27
types/augment/all/types.ts

@@ -32,7 +32,7 @@ export interface ActiveOpeningStage extends Enum {
 /** @name ActiveOpeningStageVariant */
 export interface ActiveOpeningStageVariant extends Struct {
   readonly stage: ActiveOpeningStage;
-  readonly applications_added: Vec<HiringApplicationId>;
+  readonly applications_added: Vec<ApplicationId>;
   readonly active_application_count: u32;
   readonly unstaking_application_count: u32;
   readonly deactivated_application_count: u32;
@@ -40,7 +40,7 @@ export interface ActiveOpeningStageVariant extends Struct {
 
 /** @name ActiveStake */
 export interface ActiveStake extends Struct {
-  readonly stake_id: u64;
+  readonly stake_id: StakeId;
   readonly source_account_id: GenericAccountId;
 }
 
@@ -92,11 +92,11 @@ export interface AdjustOnInterval extends Struct {
 
 /** @name Application */
 export interface Application extends Struct {
-  readonly opening_id: u64;
+  readonly opening_id: OpeningId;
   readonly application_index_in_opening: u32;
   readonly add_to_opening_in_block: u32;
-  readonly active_role_staking_id: Option<u64>;
-  readonly active_application_staking_id: Option<u64>;
+  readonly active_role_staking_id: Option<StakeId>;
+  readonly active_application_staking_id: Option<StakeId>;
   readonly stage: ApplicationStage;
   readonly human_readable_text: Text;
 }
@@ -116,17 +116,17 @@ export interface ApplicationDeactivationCause extends Enum {
 export interface ApplicationId extends u64 {}
 
 /** @name ApplicationIdSet */
-export interface ApplicationIdSet extends BTreeSet<HiringApplicationId> {}
+export interface ApplicationIdSet extends BTreeSet<ApplicationId> {}
 
 /** @name ApplicationIdToWorkerIdMap */
-export interface ApplicationIdToWorkerIdMap extends BTreeMap<HiringApplicationId, WorkerId> {}
+export interface ApplicationIdToWorkerIdMap extends BTreeMap<ApplicationId, WorkerId> {}
 
 /** @name ApplicationOf */
 export interface ApplicationOf extends Struct {
   readonly role_account_id: GenericAccountId;
-  readonly opening_id: u64;
+  readonly opening_id: OpeningId;
   readonly member_id: MemberId;
-  readonly application_id: HiringApplicationId;
+  readonly application_id: ApplicationId;
 }
 
 /** @name ApplicationRationingPolicy */
@@ -161,7 +161,7 @@ export interface Backer extends Struct {
 export interface Backers extends Vec<Backer> {}
 
 /** @name BalanceOfMint */
-export interface BalanceOfMint extends Balance {}
+export interface BalanceOfMint extends u128 {}
 
 /** @name BlockAndTime */
 export interface BlockAndTime extends Struct {
@@ -285,7 +285,7 @@ export interface CurationActor extends Enum {
 /** @name Curator */
 export interface Curator extends Struct {
   readonly role_account: GenericAccountId;
-  readonly reward_relationship: Option<u64>;
+  readonly reward_relationship: Option<RewardRelationshipId>;
   readonly role_stake_profile: Option<CuratorRoleStakeProfile>;
   readonly stage: CuratorRoleStage;
   readonly induction: CuratorInduction;
@@ -297,7 +297,7 @@ export interface CuratorApplication extends Struct {
   readonly role_account: GenericAccountId;
   readonly curator_opening_id: CuratorOpeningId;
   readonly member_id: MemberId;
-  readonly application_id: HiringApplicationId;
+  readonly application_id: ApplicationId;
 }
 
 /** @name CuratorApplicationId */
@@ -307,7 +307,7 @@ export interface CuratorApplicationId extends u64 {}
 export interface CuratorApplicationIdSet extends BTreeSet<CuratorApplicationId> {}
 
 /** @name CuratorApplicationIdToCuratorIdMap */
-export interface CuratorApplicationIdToCuratorIdMap extends BTreeMap<HiringApplicationId, CuratorId> {}
+export interface CuratorApplicationIdToCuratorIdMap extends BTreeMap<ApplicationId, CuratorId> {}
 
 /** @name CuratorExitInitiationOrigin */
 export interface CuratorExitInitiationOrigin extends Enum {
@@ -344,7 +344,7 @@ export interface CuratorInduction extends Struct {
 
 /** @name CuratorOpening */
 export interface CuratorOpening extends Struct {
-  readonly opening_id: u64;
+  readonly opening_id: OpeningId;
   readonly curator_applications: Vec<CuratorApplicationId>;
   readonly policy_commitment: OpeningPolicyCommitment;
 }
@@ -363,7 +363,7 @@ export interface CuratorRoleStage extends Enum {
 
 /** @name CuratorRoleStakeProfile */
 export interface CuratorRoleStakeProfile extends Struct {
-  readonly stake_id: u64;
+  readonly stake_id: StakeId;
   readonly termination_unstaking_period: Option<u32>;
   readonly exit_unstaking_period: Option<u32>;
 }
@@ -512,8 +512,8 @@ export interface ExitedLeadRole extends Struct {
 
 /** @name FillOpeningParameters */
 export interface FillOpeningParameters extends Struct {
-  readonly opening_id: u64;
-  readonly successful_application_id: HiringApplicationId;
+  readonly opening_id: OpeningId;
+  readonly successful_application_id: ApplicationId;
   readonly reward_policy: Option<RewardPolicy>;
   readonly working_group: WorkingGroup;
 }
@@ -590,7 +590,7 @@ export interface IPNSIdentity extends Text {}
 export interface Lead extends Struct {
   readonly member_id: MemberId;
   readonly role_account: GenericAccountId;
-  readonly reward_relationship: Option<u64>;
+  readonly reward_relationship: Option<RewardRelationshipId>;
   readonly inducted: u32;
   readonly stage: LeadRoleState;
 }
@@ -644,7 +644,7 @@ export interface Mint extends Struct {
 }
 
 /** @name MintBalanceOf */
-export interface MintBalanceOf extends Balance {}
+export interface MintBalanceOf extends u128 {}
 
 /** @name MintId */
 export interface MintId extends u64 {}
@@ -690,8 +690,8 @@ export interface OpeningId extends u64 {}
 
 /** @name OpeningOf */
 export interface OpeningOf extends Struct {
-  readonly hiring_opening_id: u64;
-  readonly applications: Vec<HiringApplicationId>;
+  readonly hiring_opening_id: OpeningId;
+  readonly applications: Vec<ApplicationId>;
   readonly policy_commitment: WorkingGroupOpeningPolicyCommitment;
   readonly opening_type: OpeningType;
 }
@@ -869,7 +869,7 @@ export interface ProposalDetails extends Enum {
   readonly isAddWorkingGroupLeaderOpening: boolean;
   readonly asAddWorkingGroupLeaderOpening: AddOpeningParameters;
   readonly isBeginReviewWorkingGroupLeaderApplication: boolean;
-  readonly asBeginReviewWorkingGroupLeaderApplication: ITuple<[u64, WorkingGroup]>;
+  readonly asBeginReviewWorkingGroupLeaderApplication: ITuple<[OpeningId, WorkingGroup]>;
   readonly isFillWorkingGroupLeaderOpening: boolean;
   readonly asFillWorkingGroupLeaderOpening: FillOpeningParameters;
   readonly isSetWorkingGroupMintCapacity: boolean;
@@ -907,7 +907,7 @@ export interface ProposalDetailsOf extends Enum {
   readonly isAddWorkingGroupLeaderOpening: boolean;
   readonly asAddWorkingGroupLeaderOpening: AddOpeningParameters;
   readonly isBeginReviewWorkingGroupLeaderApplication: boolean;
-  readonly asBeginReviewWorkingGroupLeaderApplication: ITuple<[u64, WorkingGroup]>;
+  readonly asBeginReviewWorkingGroupLeaderApplication: ITuple<[OpeningId, WorkingGroup]>;
   readonly isFillWorkingGroupLeaderOpening: boolean;
   readonly asFillWorkingGroupLeaderOpening: FillOpeningParameters;
   readonly isSetWorkingGroupMintCapacity: boolean;
@@ -999,8 +999,8 @@ export interface RewardPolicy extends Struct {
 
 /** @name RewardRelationship */
 export interface RewardRelationship extends Struct {
-  readonly recipient: u64;
-  readonly mint_id: u64;
+  readonly recipient: RecipientId;
+  readonly mint_id: MintId;
   readonly account: GenericAccountId;
   readonly amount_per_payout: u128;
   readonly next_payment_at_block: Option<u32>;
@@ -1028,7 +1028,7 @@ export interface RoleParameters extends Struct {
 
 /** @name RoleStakeProfile */
 export interface RoleStakeProfile extends Struct {
-  readonly stake_id: u64;
+  readonly stake_id: StakeId;
   readonly termination_unstaking_period: Option<u32>;
   readonly exit_unstaking_period: Option<u32>;
 }
@@ -1354,7 +1354,7 @@ export interface WorkerId extends u64 {}
 export interface WorkerOf extends Struct {
   readonly member_id: MemberId;
   readonly role_account_id: GenericAccountId;
-  readonly reward_relationship: Option<u64>;
+  readonly reward_relationship: Option<RewardRelationshipId>;
   readonly role_stake_profile: Option<RoleStakeProfile>;
 }
 

+ 5 - 3
types/augment/augment-types.ts

@@ -1853,9 +1853,6 @@ declare module '@polkadot/types/types/registry' {
     StorageChangeSet: StorageChangeSet;
     'Option<StorageChangeSet>': Option<StorageChangeSet>;
     'Vec<StorageChangeSet>': Vec<StorageChangeSet>;
-    MemoText: MemoText;
-    'Option<MemoText>': Option<MemoText>;
-    'Vec<MemoText>': Vec<MemoText>;
     Credential: Credential;
     'Compact<Credential>': Compact<Credential>;
     'Option<Credential>': Option<Credential>;
@@ -1886,6 +1883,9 @@ declare module '@polkadot/types/types/registry' {
     SlashableTerms: SlashableTerms;
     'Option<SlashableTerms>': Option<SlashableTerms>;
     'Vec<SlashableTerms>': Vec<SlashableTerms>;
+    MemoText: MemoText;
+    'Option<MemoText>': Option<MemoText>;
+    'Vec<MemoText>': Vec<MemoText>;
     EntryMethod: EntryMethod;
     'Option<EntryMethod>': Option<EntryMethod>;
     'Vec<EntryMethod>': Vec<EntryMethod>;
@@ -2000,9 +2000,11 @@ declare module '@polkadot/types/types/registry' {
     'Option<Mint>': Option<Mint>;
     'Vec<Mint>': Vec<Mint>;
     MintBalanceOf: MintBalanceOf;
+    'Compact<MintBalanceOf>': Compact<MintBalanceOf>;
     'Option<MintBalanceOf>': Option<MintBalanceOf>;
     'Vec<MintBalanceOf>': Vec<MintBalanceOf>;
     BalanceOfMint: BalanceOfMint;
+    'Compact<BalanceOfMint>': Compact<BalanceOfMint>;
     'Option<BalanceOfMint>': Option<BalanceOfMint>;
     'Vec<BalanceOfMint>': Vec<BalanceOfMint>;
     NextAdjustment: NextAdjustment;

+ 2 - 2
types/package.json

@@ -13,10 +13,10 @@
     "checks": "yarn build && madge --circular ./ && yarn lint && prettier ./ --check && yarn check:augment",
     "generate:defs": "ts-node node_modules/.bin/polkadot-types-from-defs --package . --input ./augment",
     "generate:meta": "ts-node node_modules/.bin/polkadot-types-from-chain --package . --endpoint ws://127.0.0.1:9944 --output ./augment --strict",
-    "generate:codec-defs": "ts-node ./src/scripts/generateCodecDefs.ts",
+    "generate:augment-codec": "ts-node ./src/scripts/generateAugmentCodec.ts",
     "generate:registry-json": "ts-node ./src/scripts/generateRegistryJson.ts",
     "generate:augment": "yarn generate:registry-json && yarn generate:defs && yarn generate:meta",
-    "generate:all": "yarn generate:augment && yarn generate:codec-defs",
+    "generate:all": "yarn generate:augment && yarn generate:augment-codec",
     "generate:json-schemas": "json2ts -i ./src/hiring/schemas/role.schema.json -o ./src/hiring/schemas/role.schema.typings.ts"
   },
   "author": "Joystream contributors",

+ 10 - 0
types/src/common.ts

@@ -6,6 +6,7 @@ import { u8aConcat, u8aToHex } from '@polkadot/util'
 import moment from 'moment'
 import { JoyStructCustom, JoyStructDecorated } from './JoyStruct'
 import { JoyEnum } from './JoyEnum'
+import AccountId from '@polkadot/types/generic/AccountId'
 
 export { JoyEnum, JoyStructCustom, JoyStructDecorated }
 
@@ -121,6 +122,12 @@ export class SlashingTerms extends JoyEnum({
   Slashable: SlashableTerms,
 } as const) {}
 
+export class MemoText extends Text {}
+// @polkadot/types overrides required since migration to Substrate 2.0,
+// see: https://polkadot.js.org/api/start/FAQ.html#the-node-returns-a-could-not-convert-error-on-send
+export class Address extends AccountId {}
+export class LookupSource extends AccountId {}
+
 export const commonTypes: RegistryTypes = {
   Credential,
   CredentialSet,
@@ -132,6 +139,9 @@ export const commonTypes: RegistryTypes = {
   // Expose in registry for api.createType purposes:
   SlashingTerms,
   SlashableTerms,
+  MemoText,
+  Address,
+  LookupSource,
 }
 
 export default commonTypes

+ 2 - 2
types/src/hiring/index.ts

@@ -334,8 +334,8 @@ export class Application
   implements IApplication {}
 
 export const hiringTypes: RegistryTypes = {
-  ApplicationId: 'u64',
-  OpeningId: 'u64',
+  ApplicationId,
+  OpeningId,
   Application,
   ApplicationStage,
   ActivateOpeningAt,

+ 0 - 5
types/src/index.ts

@@ -36,7 +36,6 @@ export {
 }
 
 export const types: RegistryTypes = {
-  MemoText: 'Text', // for the memo module
   ...common,
   ...members,
   ...council,
@@ -52,10 +51,6 @@ export const types: RegistryTypes = {
   ...media,
   ...proposals,
   ...contentDirectory,
-  // Required since migration to Substrate 2.0,
-  // see: https://polkadot.js.org/api/start/FAQ.html#the-node-returns-a-could-not-convert-error-on-send
-  Address: 'AccountId',
-  LookupSource: 'AccountId',
 }
 
 // Allows creating types without api instance (it's not a recommended way though, so should be used just for mocks)

+ 5 - 3
types/src/mint/index.ts

@@ -8,6 +8,8 @@ export class MintId extends u64 {}
 export class Setting extends u128 {}
 export class Adding extends u128 {}
 export class Reducing extends u128 {}
+export class MintBalanceOf extends u128 implements Balance {}
+export class BalanceOfMint extends u128 implements Balance {}
 
 export class AdjustCapacityBy extends JoyEnum({ Setting, Adding, Reducing } as const) {}
 
@@ -49,10 +51,10 @@ export class Mint
   implements IMint {}
 
 export const mintTypes: RegistryTypes = {
-  MintId: 'u64',
+  MintId,
   Mint,
-  MintBalanceOf: 'Balance',
-  BalanceOfMint: 'Balance',
+  MintBalanceOf,
+  BalanceOfMint,
   // Expose in registry for api.createType purposes:
   NextAdjustment,
   AdjustOnInterval,

+ 2 - 2
types/src/recurring-rewards/index.ts

@@ -43,8 +43,8 @@ export class RewardRelationship
   implements IRewardRelationship {}
 
 export const recurringRewardsTypes: RegistryTypes = {
-  RecipientId: 'u64',
-  RewardRelationshipId: 'u64',
+  RecipientId,
+  RewardRelationshipId,
   Recipient,
   RewardRelationship,
 }

+ 108 - 0
types/src/scripts/generateAugmentCodec.ts

@@ -0,0 +1,108 @@
+/**
+ * Generates" augment files in /augment-codec based on already generated ones in /augment via @polkadot/typegen:
+ * 1. Creates augment-codec/all.ts file that exports all @joystream/types separately
+ * 2. Copies augment-* files from /augment to /augment-codes. Since those files import types from ./all,
+ * the imports in /augment-codec will be overriden with our custom codec/class types
+ */
+
+import path from 'path'
+import fs from 'fs'
+// Types by module:
+import common from '../common'
+import members from '../members'
+import council from '../council'
+import roles from '../roles'
+import forum from '../forum'
+import stake from '../stake'
+import mint from '../mint'
+import recurringRewards from '../recurring-rewards'
+import hiring from '../hiring'
+import contentWorkingGroup from '../content-working-group'
+import workingGroup from '../working-group'
+import discovery from '../discovery'
+import media from '../media'
+import proposals from '../proposals'
+import contentDirectory from '../content-directory'
+
+const AUGMENT_INTERFACES_PATH = path.join(__dirname, '../../augment')
+const AUGMENT_CODEC_PATH = path.join(__dirname, '../../augment-codec')
+const EXPORT_ALL_TYPES_FILE_PATH = path.join(AUGMENT_CODEC_PATH, 'all.ts')
+const RELATIVE_TYPES_ROOT_PATH = '..' // @joystream/types/index path relative to AUGMENT_CODEC_PATH
+
+const typesByModule = {
+  'common': common,
+  'members': members,
+  'council': council,
+  'roles': roles,
+  'forum': forum,
+  'stake': stake,
+  'mint': mint,
+  'recurring-rewards': recurringRewards,
+  'hiring': hiring,
+  'content-working-group': contentWorkingGroup,
+  'working-group': workingGroup,
+  'discovery': discovery,
+  'media': media,
+  'proposals': proposals,
+  'content-directory': contentDirectory,
+}
+
+type Imports = { [moduleName: string]: string[] }
+
+function generateExportAllFile(filePath: string) {
+  const imports: Imports = {}
+  const exports: string[] = []
+
+  Object.entries(typesByModule).forEach(([moduleName, types]) => {
+    Object.entries(types).forEach(([typeName, codecOrName]) => {
+      if (typeof codecOrName === 'function') {
+        const constructorName = codecOrName.name
+        if (!constructorName) {
+          throw new Error(`Codec constructor doesn't have a name: ${typeName}`)
+        }
+        const normalizedTypeName = typeName.replace(/[^A-Za-z0-9_]/g, '_')
+        // Add "as" if necessary
+        const importStatement =
+          constructorName === normalizedTypeName ? normalizedTypeName : `${constructorName} as ${normalizedTypeName}`
+        !imports[moduleName] ? (imports[moduleName] = [importStatement]) : imports[moduleName].push(importStatement)
+        exports.push(normalizedTypeName)
+      } else {
+        throw new Error(
+          'All types exposed to registry by a module should have a corresponding class!\n' +
+            `Class not found for type: ${typeName} in module ${moduleName}`
+        )
+      }
+    })
+  })
+
+  const fileLines: string[] = []
+  fileLines.push('// This file was automatically generated via generate:augment-codec')
+  for (const [module, importStatements] of Object.entries(imports)) {
+    fileLines.push(`import { ${importStatements.join(', ')} } from '${RELATIVE_TYPES_ROOT_PATH}/${module}';`)
+  }
+  fileLines.push('')
+  fileLines.push(`export { ${exports.join(', ')} };`)
+
+  fs.writeFileSync(filePath, fileLines.join('\n'))
+}
+
+// ACTUAL SCRIPT:
+// Generate /augment-codec/all.ts file exporting all types ("augment-*" files will import from it)
+generateExportAllFile(EXPORT_ALL_TYPES_FILE_PATH)
+console.log(`Generated all types export file in ${EXPORT_ALL_TYPES_FILE_PATH}\n`)
+// Copy augment-* files from /augment to /augment-codec
+let copiedFilesCounter = 0
+fs.readdirSync(AUGMENT_INTERFACES_PATH).forEach((fileName) => {
+  if (fileName.startsWith('augment-')) {
+    const src = path.join(AUGMENT_INTERFACES_PATH, fileName)
+    const dest = path.join(AUGMENT_CODEC_PATH, fileName)
+    // Copy the file
+    fs.copyFileSync(src, dest)
+    console.log(`Copied file!\nFrom: ${src}\nTo: ${dest}\n`)
+    ++copiedFilesCounter
+  }
+})
+
+if (!copiedFilesCounter) {
+  console.log('No files were copied! Did you forget to run generate:augment first?')
+}

+ 0 - 142
types/src/scripts/generateCodecDefs.ts

@@ -1,142 +0,0 @@
-// Creates /augment-codec/augment-types.ts file with api augmentation that allows
-// creating custom Joystream "Codec types" with api.createType
-
-import common from '../common'
-import members from '../members'
-import council from '../council'
-import roles from '../roles'
-import forum from '../forum'
-import stake from '../stake'
-import mint from '../mint'
-import recurringRewards from '../recurring-rewards'
-import hiring from '../hiring'
-import contentWorkingGroup from '../content-working-group'
-import workingGroup from '../working-group'
-import discovery from '../discovery'
-import media from '../media'
-import proposals from '../proposals'
-import contentDirectory from '../content-directory'
-import fs from 'fs'
-import path from 'path'
-import * as defaultDefinitions from '@polkadot/types/interfaces/definitions'
-import { generateInterfaceTypes } from '@polkadot/typegen/generate/interfaceRegistry'
-
-const OUTPUT_PATH = path.join(__dirname, '../../augment-codec/augment-types.ts')
-const IMPORTS_DIR = '..'
-
-const typesByModule = {
-  'common': common,
-  'members': members,
-  'council': council,
-  'roles': roles,
-  'forum': forum,
-  'stake': stake,
-  'mint': mint,
-  'recurring-rewards': recurringRewards,
-  'hiring': hiring,
-  'content-working-group': contentWorkingGroup,
-  'working-group': workingGroup,
-  'discovery': discovery,
-  'media': media,
-  'proposals': proposals,
-  'content-directory': contentDirectory,
-}
-
-type Imports = { [moduleName: string]: string[] }
-type AugmentTypes = { [typeName: string]: string }
-
-const imports: Imports = {}
-const augmentTypes: AugmentTypes = {}
-
-const CUSTOM_IMPORTS_TAG = 'CUSTOMIMPORTS'
-const CUSTOM_TYPES_TAG = 'CUSTOMTYPES'
-
-const populateFileByTemplateTag = (fileContent: string, tag: string, insertLines: string[]) => {
-  const fileLines = fileContent.split('\n')
-  const startIndex = fileLines.findIndex((line) => line.includes(`/** ${tag} **/`))
-  const endIndex = fileLines.findIndex((line) => line.includes(`/** /${tag} **/`))
-
-  if (startIndex === -1 || endIndex === -1 || endIndex <= startIndex) {
-    throw new Error(`populateFileByTemplateTag: Invalid tag (${tag})`)
-  }
-
-  const [whitespace] = fileLines[startIndex].match(/^(\s)+/) || ['']
-  fileLines.splice(startIndex + 1, endIndex - (startIndex + 1), ...insertLines.map((line) => `${whitespace}${line}`))
-
-  return fileLines.join('\n')
-}
-
-const addTagsIfDontExist = (fileContent: string): string => {
-  const fileLines = fileContent.split('\n')
-  // Custom imports
-  if (fileLines.findIndex((line) => line.includes(`/** ${CUSTOM_IMPORTS_TAG} **/`)) === -1) {
-    const firstImportIndex = fileLines.findIndex((line) => line.includes('import'))
-    fileLines.splice(firstImportIndex, 0, `/** ${CUSTOM_IMPORTS_TAG} **/`, `/** /${CUSTOM_IMPORTS_TAG} **/`)
-  }
-  // Custom types
-  if (fileLines.findIndex((line) => line.includes(`/** ${CUSTOM_TYPES_TAG} **/`)) === -1) {
-    const firstTypeIndex = fileLines.findIndex((line) => line.includes('export interface InterfaceTypes')) + 1
-    const [whitespace] = fileLines[firstTypeIndex].match(/^(\s)+/) || ['']
-    fileLines.splice(
-      firstTypeIndex,
-      0,
-      `${whitespace}/** ${CUSTOM_TYPES_TAG} **/`,
-      `${whitespace}/** /${CUSTOM_TYPES_TAG} **/`
-    )
-  }
-
-  return fileLines.join('\n')
-}
-
-const updateAugmentTypesFile = (filePath: string, imports: Imports, augmentTypes: AugmentTypes) => {
-  let fileContent = fs.readFileSync(filePath).toString()
-  fileContent = addTagsIfDontExist(fileContent)
-  fileContent = populateFileByTemplateTag(
-    fileContent,
-    CUSTOM_IMPORTS_TAG,
-    Object.entries(imports).map(
-      ([moduleName, importStatements]) =>
-        // import as to avoid namespace clashes
-        `import { ${importStatements.join(', ')} } from '${IMPORTS_DIR}/${moduleName}'`
-    )
-  )
-  fileContent = populateFileByTemplateTag(
-    fileContent,
-    CUSTOM_TYPES_TAG,
-    Object.entries(augmentTypes).map(([typeName, constructorName]) => `"${typeName}": ${constructorName};`)
-  )
-
-  fs.writeFileSync(filePath, fileContent)
-}
-
-const addAugmentTypes = (typeName: string, constructorName: string) => {
-  augmentTypes[typeName] = constructorName
-  augmentTypes[`Option<${typeName}>`] = `Option<${constructorName}>`
-  augmentTypes[`Vec<${typeName}>`] = `Vec<${constructorName}>`
-}
-
-console.log('Generating default interface types based on current @polkadot/types definitions...')
-generateInterfaceTypes({ '@polkadot/types/interfaces': defaultDefinitions }, OUTPUT_PATH)
-
-console.log('Adding custom Joystream types...')
-Object.entries(typesByModule).forEach(([moduleName, types]) => {
-  console.log('Module: ', moduleName)
-  console.log('Types found:', Object.keys(types))
-  Object.entries(types).forEach(([typeName, codecOrName]) => {
-    if (typeof codecOrName === 'function') {
-      const constructorName = codecOrName.name
-      if (!constructorName) {
-        throw new Error(`Codec constructor doesn't have a name: ${typeName}`)
-      }
-      const normalizedTypeName = typeName.replace(/[^A-Za-z0-9_]/g, '_')
-      // Add "as" to avoid namespace clashes
-      const importStatement = `${constructorName} as ${normalizedTypeName}`
-      !imports[moduleName] ? (imports[moduleName] = [importStatement]) : imports[moduleName].push(importStatement)
-      addAugmentTypes(typeName, normalizedTypeName)
-    } else if (typeof codecOrName === 'string') {
-      addAugmentTypes(typeName, codecOrName)
-    }
-  })
-})
-
-updateAugmentTypesFile(OUTPUT_PATH, imports, augmentTypes)

+ 1 - 1
types/src/stake/index.ts

@@ -85,7 +85,7 @@ export class Stake
 }
 
 export const stakeTypes: RegistryTypes = {
-  StakeId: 'u64',
+  StakeId,
   Stake,
   // Expose in registry for api.createType purposes:
   StakingStatus,

+ 2 - 1
types/tsconfig-augment-codec.json

@@ -3,7 +3,8 @@
   "compilerOptions": {
     "noEmit": true, // No need to actually create any output
     "paths": {
-      "@polkadot/types/augment": ["augment-codec/augment-types.ts"]
+      "@polkadot/types/augment": ["augment-codec/augment-types.ts"],
+      "@polkadot/api/augment": ["augment-codec/augment-api.ts"]
     }
   },
   "include": [

Some files were not shown because too many files changed in this diff