From 9c913fb482215134f99126f60158b720fa1e3472 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 30 Jan 2020 12:09:16 +0100 Subject: [PATCH] Cleanup generated doc (only top-level docs) (#1777) * Cleanup generated doc (only top-level docs) * Single-line name --- .../src/interfaces/attestations/types.ts | 14 +- packages/types/src/interfaces/aura/types.ts | 3 +- .../types/src/interfaces/authorship/types.ts | 10 +- packages/types/src/interfaces/babe/types.ts | 57 +- .../types/src/interfaces/balances/types.ts | 18 +- packages/types/src/interfaces/claims/types.ts | 2 +- .../types/src/interfaces/collective/types.ts | 10 +- .../types/src/interfaces/consensus/types.ts | 2 +- .../types/src/interfaces/contracts/types.ts | 68 +-- .../types/src/interfaces/democracy/types.ts | 21 +- .../types/src/interfaces/deprecated/types.ts | 21 +- .../types/src/interfaces/elections/types.ts | 19 +- packages/types/src/interfaces/evm/types.ts | 9 +- .../src/interfaces/genericAsset/types.ts | 20 +- .../types/src/interfaces/grandpa/types.ts | 31 +- .../types/src/interfaces/identity/types.ts | 37 +- .../types/src/interfaces/imOnline/types.ts | 18 +- .../types/src/interfaces/metadata/types.ts | 545 +++++------------- .../types/src/interfaces/offences/types.ts | 14 +- .../types/src/interfaces/parachains/types.ts | 109 +--- .../types/src/interfaces/recovery/types.ts | 11 +- packages/types/src/interfaces/rpc/types.ts | 67 +-- .../types/src/interfaces/runtime/types.ts | 144 ++--- .../types/src/interfaces/session/types.ts | 20 +- .../types/src/interfaces/society/types.ts | 29 +- .../types/src/interfaces/staking/types.ts | 90 +-- packages/types/src/interfaces/system/types.ts | 53 +- .../types/src/interfaces/treasury/types.ts | 17 +- .../types/src/interfaces/txpayment/types.ts | 2 +- .../types/src/interfaces/utility/types.ts | 10 +- .../types/src/scripts/generateTypes/tsDef.ts | 24 +- packages/types/src/scripts/util/formatting.ts | 5 +- 32 files changed, 437 insertions(+), 1063 deletions(-) diff --git a/packages/types/src/interfaces/attestations/types.ts b/packages/types/src/interfaces/attestations/types.ts index 8cd19f0b23..79bda95e7f 100644 --- a/packages/types/src/interfaces/attestations/types.ts +++ b/packages/types/src/interfaces/attestations/types.ts @@ -7,29 +7,21 @@ import { AccountId, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime import { SessionIndex } from '@polkadot/types/interfaces/session'; import { CandidateReceipt, ParaId } from '@polkadot/types/interfaces/parachains'; -/** Struct */ +/** @name BlockAttestations */ export interface BlockAttestations extends Struct { - /** CandidateReceipt */ readonly receipt: CandidateReceipt; - /** Vec */ readonly valid: Vec; - /** Vec */ readonly invalid: Vec; } -/** Struct */ +/** @name IncludedBlocks */ export interface IncludedBlocks extends Struct { - /** BlockNumber */ readonly actualNumber: BlockNumber; - /** SessionIndex */ readonly session: SessionIndex; - /** H256 */ readonly randomSeed: H256; - /** Vec */ readonly activeParachains: Vec; - /** Vec */ readonly paraBlocks: Vec; } -/** Struct */ +/** @name MoreAttestations */ export interface MoreAttestations extends Struct {} diff --git a/packages/types/src/interfaces/aura/types.ts b/packages/types/src/interfaces/aura/types.ts index 9d5c6a5dac..2d8776ce64 100644 --- a/packages/types/src/interfaces/aura/types.ts +++ b/packages/types/src/interfaces/aura/types.ts @@ -4,8 +4,7 @@ import { Struct } from '@polkadot/types/codec'; import { u64 } from '@polkadot/types/primitive'; -/** Struct */ +/** @name RawAuraPreDigest */ export interface RawAuraPreDigest extends Struct { - /** u64 */ readonly slotNumber: u64; } diff --git a/packages/types/src/interfaces/authorship/types.ts b/packages/types/src/interfaces/authorship/types.ts index df5470e2a6..35584fff4e 100644 --- a/packages/types/src/interfaces/authorship/types.ts +++ b/packages/types/src/interfaces/authorship/types.ts @@ -5,20 +5,16 @@ import { ITuple } from '@polkadot/types/types'; import { Enum, Option } from '@polkadot/types/codec'; import { AccountId, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime'; -/** BlockNumber */ +/** @name InclusionHeight */ export interface InclusionHeight extends BlockNumber {} -/** ITuple<[Hash, Option]> */ +/** @name Uncle */ export interface Uncle extends ITuple<[Hash, Option]> {} -/** Enum */ +/** @name UncleEntryItem */ export interface UncleEntryItem extends Enum { - /** 0:: InclusionHeight(InclusionHeight) */ readonly isInclusionHeight: boolean; - /** InclusionHeight */ readonly asInclusionHeight: InclusionHeight; - /** 1:: Uncle(Uncle) */ readonly isUncle: boolean; - /** Uncle */ readonly asUncle: Uncle; } diff --git a/packages/types/src/interfaces/babe/types.ts b/packages/types/src/interfaces/babe/types.ts index cad3ce4690..d8e59ac1b8 100644 --- a/packages/types/src/interfaces/babe/types.ts +++ b/packages/types/src/interfaces/babe/types.ts @@ -5,109 +5,80 @@ import { Codec } from '@polkadot/types/types'; import { Enum, Option, Struct } from '@polkadot/types/codec'; import { u32, u64 } from '@polkadot/types/primitive'; -/** u64 */ +/** @name BabeAuthorityWeight */ export interface BabeAuthorityWeight extends u64 {} -/** u32 */ +/** @name BabeBlockWeight */ export interface BabeBlockWeight extends u32 {} -/** u64 */ +/** @name BabeWeight */ export interface BabeWeight extends u64 {} -/** Option */ +/** @name MaybeVrf */ export interface MaybeVrf extends Option {} -/** Enum */ +/** @name RawBabePreDigest */ export interface RawBabePreDigest extends Enum { - /** 0:: Phantom */ readonly isPhantom: boolean; - /** 1:: Primary(RawBabePreDigestPrimary) */ readonly isPrimary: boolean; - /** RawBabePreDigestPrimary */ readonly asPrimary: RawBabePreDigestPrimary; - /** 2:: Secondary(RawBabePreDigestSecondary) */ readonly isSecondary: boolean; - /** RawBabePreDigestSecondary */ readonly asSecondary: RawBabePreDigestSecondary; } -/** Enum */ +/** @name RawBabePreDigestCompat */ export interface RawBabePreDigestCompat extends Enum { - /** 0:: Zero(u32) */ readonly isZero: boolean; - /** u32 */ readonly asZero: u32; - /** 1:: One(u32) */ readonly isOne: boolean; - /** u32 */ readonly asOne: u32; - /** 2:: Two(u32) */ readonly isTwo: boolean; - /** u32 */ readonly asTwo: u32; } -/** Struct */ +/** @name RawBabePreDigestPrimary */ export interface RawBabePreDigestPrimary extends Struct { - /** u32 */ readonly authorityIndex: u32; - /** SlotNumber */ readonly slotNumber: SlotNumber; - /** VrfData */ readonly vrfOutput: VrfData; - /** VrfProof */ readonly vrfProof: VrfProof; } -/** Struct */ +/** @name RawBabePreDigestPrimaryTo159 */ export interface RawBabePreDigestPrimaryTo159 extends Struct { - /** u32 */ readonly authorityIndex: u32; - /** SlotNumber */ readonly slotNumber: SlotNumber; - /** BabeBlockWeight */ readonly weight: BabeBlockWeight; - /** VrfData */ readonly vrfOutput: VrfData; - /** VrfProof */ readonly vrfProof: VrfProof; } -/** Struct */ +/** @name RawBabePreDigestSecondary */ export interface RawBabePreDigestSecondary extends Struct { - /** u32 */ readonly authorityIndex: u32; - /** SlotNumber */ readonly slotNumber: SlotNumber; } -/** Struct */ +/** @name RawBabePreDigestSecondaryTo159 */ export interface RawBabePreDigestSecondaryTo159 extends Struct { - /** u32 */ readonly authorityIndex: u32; - /** SlotNumber */ readonly slotNumber: SlotNumber; - /** BabeBlockWeight */ readonly weight: BabeBlockWeight; } -/** Enum */ +/** @name RawBabePreDigestTo159 */ export interface RawBabePreDigestTo159 extends Enum { - /** 0:: Primary(RawBabePreDigestPrimaryTo159) */ readonly isPrimary: boolean; - /** RawBabePreDigestPrimaryTo159 */ readonly asPrimary: RawBabePreDigestPrimaryTo159; - /** 1:: Secondary(RawBabePreDigestSecondaryTo159) */ readonly isSecondary: boolean; - /** RawBabePreDigestSecondaryTo159 */ readonly asSecondary: RawBabePreDigestSecondaryTo159; } -/** u64 */ +/** @name SlotNumber */ export interface SlotNumber extends u64 {} -/** Uint8Array, Codec */ +/** @name VrfData */ export interface VrfData extends Uint8Array, Codec {} -/** Uint8Array, Codec */ +/** @name VrfProof */ export interface VrfProof extends Uint8Array, Codec {} diff --git a/packages/types/src/interfaces/balances/types.ts b/packages/types/src/interfaces/balances/types.ts index 1c9aaa2b6b..eb0f85ac94 100644 --- a/packages/types/src/interfaces/balances/types.ts +++ b/packages/types/src/interfaces/balances/types.ts @@ -4,38 +4,26 @@ import { Set, Struct } from '@polkadot/types/codec'; import { Balance, BlockNumber, LockIdentifier } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name BalanceLock */ export interface BalanceLock extends Struct { - /** LockIdentifier */ readonly id: LockIdentifier; - /** Balance */ readonly amount: Balance; - /** BlockNumber */ readonly until: BlockNumber; - /** WithdrawReasons */ readonly reasons: WithdrawReasons; } -/** Struct */ +/** @name VestingSchedule */ export interface VestingSchedule extends Struct { - /** Balance */ readonly offset: Balance; - /** Balance */ readonly perBlock: Balance; - /** BlockNumber */ readonly startingBlock: BlockNumber; } -/** Set */ +/** @name WithdrawReasons */ export interface WithdrawReasons extends Set { - /** boolean */ readonly isTransactionPayment: boolean; - /** boolean */ readonly isTransfer: boolean; - /** boolean */ readonly isReserve: boolean; - /** boolean */ readonly isFee: boolean; - /** boolean */ readonly isTip: boolean; } diff --git a/packages/types/src/interfaces/claims/types.ts b/packages/types/src/interfaces/claims/types.ts index d24ccdfda6..2fe4f560a3 100644 --- a/packages/types/src/interfaces/claims/types.ts +++ b/packages/types/src/interfaces/claims/types.ts @@ -3,5 +3,5 @@ import { H160 } from '@polkadot/types/primitive'; -/** H160 */ +/** @name EthereumAddress */ export interface EthereumAddress extends H160 {} diff --git a/packages/types/src/interfaces/collective/types.ts b/packages/types/src/interfaces/collective/types.ts index 965e457ac9..fcfc38ab79 100644 --- a/packages/types/src/interfaces/collective/types.ts +++ b/packages/types/src/interfaces/collective/types.ts @@ -5,20 +5,16 @@ import { Struct, Vec } from '@polkadot/types/codec'; import { u32 } from '@polkadot/types/primitive'; import { AccountId } from '@polkadot/types/interfaces/runtime'; -/** u32 */ +/** @name MemberCount */ export interface MemberCount extends u32 {} -/** u32 */ +/** @name ProposalIndex */ export interface ProposalIndex extends u32 {} -/** Struct */ +/** @name Votes */ export interface Votes extends Struct { - /** ProposalIndex */ readonly index: ProposalIndex; - /** MemberCount */ readonly threshold: MemberCount; - /** Vec */ readonly ayes: Vec; - /** Vec */ readonly nays: Vec; } diff --git a/packages/types/src/interfaces/consensus/types.ts b/packages/types/src/interfaces/consensus/types.ts index 2423905ba1..a035debdbd 100644 --- a/packages/types/src/interfaces/consensus/types.ts +++ b/packages/types/src/interfaces/consensus/types.ts @@ -3,5 +3,5 @@ import { AccountId } from '@polkadot/types/interfaces/runtime'; -/** AccountId */ +/** @name AuthorityId */ export interface AuthorityId extends AccountId {} diff --git a/packages/types/src/interfaces/contracts/types.ts b/packages/types/src/interfaces/contracts/types.ts index 9f85ad5056..c439896489 100644 --- a/packages/types/src/interfaces/contracts/types.ts +++ b/packages/types/src/interfaces/contracts/types.ts @@ -6,131 +6,91 @@ import { Compact, Enum, Option, Raw, Struct } from '@polkadot/types/codec'; import { Bytes, Null, bool, u32, u64, u8 } from '@polkadot/types/primitive'; import { AccountId, Balance, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name AliveContractInfo */ export interface AliveContractInfo extends Struct { - /** TrieId */ readonly trieId: TrieId; - /** u32 */ readonly storageSize: u32; - /** CodeHash */ readonly codeHash: CodeHash; - /** Balance */ readonly rentAllowance: Balance; - /** BlockNumber */ readonly deductBlock: BlockNumber; - /** Option */ readonly lastWrite: Option; } -/** Hash */ +/** @name CodeHash */ export interface CodeHash extends Hash {} -/** Struct */ +/** @name ContractCallRequest */ export interface ContractCallRequest extends Struct { - /** AccountId */ readonly origin: AccountId; - /** AccountId */ readonly dest: AccountId; - /** Balance */ readonly value: Balance; - /** u64 */ readonly gasLimit: u64; - /** Bytes */ readonly inputData: Bytes; } -/** Enum */ +/** @name ContractExecResult */ export interface ContractExecResult extends Enum { - /** 0:: Success(ContractExecResultSuccess) */ readonly isSuccess: boolean; - /** ContractExecResultSuccess */ readonly asSuccess: ContractExecResultSuccess; - /** 1:: Error */ readonly isError: boolean; } -/** Struct */ +/** @name ContractExecResultSuccess */ export interface ContractExecResultSuccess extends Struct { - /** u8 */ readonly status: u8; - /** Raw */ readonly data: Raw; } -/** Enum */ +/** @name ContractInfo */ export interface ContractInfo extends Enum { - /** 0:: Alive(AliveContractInfo) */ readonly isAlive: boolean; - /** AliveContractInfo */ readonly asAlive: AliveContractInfo; - /** 1:: Tombstone(TombstoneContractInfo) */ readonly isTombstone: boolean; - /** TombstoneContractInfo */ readonly asTombstone: TombstoneContractInfo; } -/** Uint8Array, Codec */ +/** @name ContractStorageKey */ export interface ContractStorageKey extends Uint8Array, Codec {} -/** u64 */ +/** @name Gas */ export interface Gas extends u64 {} -/** Struct */ +/** @name PrefabWasmModule */ export interface PrefabWasmModule extends Struct { - /** Compact */ readonly scheduleVersion: Compact; - /** Compact */ readonly initial: Compact; - /** Compact */ readonly maximum: Compact; - /** PrefabWasmModuleReserved */ readonly _reserved: PrefabWasmModuleReserved; - /** Bytes */ readonly code: Bytes; } -/** Option */ +/** @name PrefabWasmModuleReserved */ export interface PrefabWasmModuleReserved extends Option {} -/** Struct */ +/** @name Schedule */ export interface Schedule extends Struct { - /** u32 */ readonly version: u32; - /** Gas */ readonly putCodePerByteCost: Gas; - /** Gas */ readonly growMemCost: Gas; - /** Gas */ readonly regularOpCost: Gas; - /** Gas */ readonly returnDataPerByteCost: Gas; - /** Gas */ readonly eventDataPerByteCost: Gas; - /** Gas */ readonly eventPerTopicCost: Gas; - /** Gas */ readonly eventBaseCost: Gas; - /** Gas */ readonly sandboxDataReadCost: Gas; - /** Gas */ readonly sandboxDataWriteCost: Gas; - /** u32 */ readonly maxEventTopics: u32; - /** u32 */ readonly maxStackHeight: u32; - /** u32 */ readonly maxMemoryPages: u32; - /** bool */ readonly enablePrintln: bool; - /** u32 */ readonly maxSubjectLen: u32; } -/** Hash */ +/** @name SeedOf */ export interface SeedOf extends Hash {} -/** Hash */ +/** @name TombstoneContractInfo */ export interface TombstoneContractInfo extends Hash {} -/** Bytes */ +/** @name TrieId */ export interface TrieId extends Bytes {} diff --git a/packages/types/src/interfaces/democracy/types.ts b/packages/types/src/interfaces/democracy/types.ts index ccefd630ea..912db430fa 100644 --- a/packages/types/src/interfaces/democracy/types.ts +++ b/packages/types/src/interfaces/democracy/types.ts @@ -6,41 +6,30 @@ import { u32 } from '@polkadot/types/primitive'; import { BlockNumber, Call, Hash } from '@polkadot/types/interfaces/runtime'; import { VoteThreshold } from '@polkadot/types/interfaces/elections'; -/** Enum */ +/** @name Conviction */ export interface Conviction extends Enum { - /** 0:: None */ readonly isNone: boolean; - /** 1:: Locked1x */ readonly isLocked1X: boolean; - /** 2:: Locked2x */ readonly isLocked2X: boolean; - /** 3:: Locked3x */ readonly isLocked3X: boolean; - /** 4:: Locked4x */ readonly isLocked4X: boolean; - /** 5:: Locked5x */ readonly isLocked5X: boolean; - /** 6:: Locked6x */ readonly isLocked6X: boolean; } -/** u32 */ +/** @name PropIndex */ export interface PropIndex extends u32 {} -/** Call */ +/** @name Proposal */ export interface Proposal extends Call {} -/** u32 */ +/** @name ReferendumIndex */ export interface ReferendumIndex extends u32 {} -/** Struct */ +/** @name ReferendumInfo */ export interface ReferendumInfo extends Struct { - /** BlockNumber */ readonly end: BlockNumber; - /** Hash */ readonly proposalHash: Hash; - /** VoteThreshold */ readonly threshold: VoteThreshold; - /** BlockNumber */ readonly delay: BlockNumber; } diff --git a/packages/types/src/interfaces/deprecated/types.ts b/packages/types/src/interfaces/deprecated/types.ts index 588fcbaa87..804e431fe0 100644 --- a/packages/types/src/interfaces/deprecated/types.ts +++ b/packages/types/src/interfaces/deprecated/types.ts @@ -6,38 +6,33 @@ import { Enum, Struct } from '@polkadot/types/codec'; import { Bytes, i8, u32, u64 } from '@polkadot/types/primitive'; import { AccountId, Balance } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name AccountInfo */ export interface AccountInfo extends Struct { - /** Bytes */ readonly trieId: Bytes; - /** u64 */ readonly currentMemStored: u64; } -/** Balance */ +/** @name Amount */ export interface Amount extends Balance {} -/** u32 */ +/** @name AssetOf */ export interface AssetOf extends u32 {} -/** ITuple<[]> */ +/** @name InherentOfflineReport */ export interface InherentOfflineReport extends ITuple<[]> {} -/** i8 */ +/** @name LockPeriods */ export interface LockPeriods extends i8 {} -/** Enum */ +/** @name NewAccountOutcome */ export interface NewAccountOutcome extends Enum { - /** 0:: NoHint */ readonly isNoHint: boolean; - /** 1:: GoodHint */ readonly isGoodHint: boolean; - /** 2:: BadHint */ readonly isBadHint: boolean; } -/** Bytes */ +/** @name OpaqueKey */ export interface OpaqueKey extends Bytes {} -/** AccountId */ +/** @name SessionKey */ export interface SessionKey extends AccountId {} diff --git a/packages/types/src/interfaces/elections/types.ts b/packages/types/src/interfaces/elections/types.ts index 5eedc19108..b43c929adc 100644 --- a/packages/types/src/interfaces/elections/types.ts +++ b/packages/types/src/interfaces/elections/types.ts @@ -5,36 +5,29 @@ import { Enum, Struct } from '@polkadot/types/codec'; import { GenericVote, u32 } from '@polkadot/types/primitive'; import { Balance } from '@polkadot/types/interfaces/runtime'; -/** u32 */ +/** @name ApprovalFlag */ export interface ApprovalFlag extends u32 {} -/** u32 */ +/** @name SetIndex */ export interface SetIndex extends u32 {} -/** GenericVote */ +/** @name Vote */ export interface Vote extends GenericVote {} -/** u32 */ +/** @name VoteIndex */ export interface VoteIndex extends u32 {} -/** Struct */ +/** @name VoterInfo */ export interface VoterInfo extends Struct { - /** VoteIndex */ readonly lastActive: VoteIndex; - /** VoteIndex */ readonly lastWin: VoteIndex; - /** Balance */ readonly pot: Balance; - /** Balance */ readonly stake: Balance; } -/** Enum */ +/** @name VoteThreshold */ export interface VoteThreshold extends Enum { - /** 0:: Supermajorityapproval */ readonly isSupermajorityapproval: boolean; - /** 1:: Supermajorityrejection */ readonly isSupermajorityrejection: boolean; - /** 2:: Simplemajority */ readonly isSimplemajority: boolean; } diff --git a/packages/types/src/interfaces/evm/types.ts b/packages/types/src/interfaces/evm/types.ts index ea6dbf6afd..73d245de82 100644 --- a/packages/types/src/interfaces/evm/types.ts +++ b/packages/types/src/interfaces/evm/types.ts @@ -4,20 +4,15 @@ import { Struct, Vec } from '@polkadot/types/codec'; import { Bytes, H160, H256, U256 } from '@polkadot/types/primitive'; -/** Struct */ +/** @name Account */ export interface Account extends Struct { - /** U256 */ readonly nonce: U256; - /** U256 */ readonly balance: U256; } -/** Struct */ +/** @name Log */ export interface Log extends Struct { - /** H160 */ readonly address: H160; - /** Vec */ readonly topics: Vec; - /** Bytes */ readonly data: Bytes; } diff --git a/packages/types/src/interfaces/genericAsset/types.ts b/packages/types/src/interfaces/genericAsset/types.ts index c742a92d92..a3e30c0e39 100644 --- a/packages/types/src/interfaces/genericAsset/types.ts +++ b/packages/types/src/interfaces/genericAsset/types.ts @@ -4,41 +4,31 @@ import { Compact, Enum, Struct } from '@polkadot/types/codec'; import { AccountId, Balance } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name AssetOptions */ export interface AssetOptions extends Struct { - /** Compact */ readonly initalIssuance: Compact; - /** PermissionLatest */ readonly permissions: PermissionLatest; } -/** Enum */ +/** @name Owner */ export interface Owner extends Enum { - /** 0:: None */ readonly isNone: boolean; - /** 1:: Address(AccountId) */ readonly isAddress: boolean; - /** AccountId */ readonly asAddress: AccountId; } -/** PermissionsV1 */ +/** @name PermissionLatest */ export interface PermissionLatest extends PermissionsV1 {} -/** Struct */ +/** @name PermissionsV1 */ export interface PermissionsV1 extends Struct { - /** Owner */ readonly update: Owner; - /** Owner */ readonly mint: Owner; - /** Owner */ readonly burn: Owner; } -/** Enum */ +/** @name PermissionVersions */ export interface PermissionVersions extends Enum { - /** 0:: V1(PermissionsV1) */ readonly isV1: boolean; - /** PermissionsV1 */ readonly asV1: PermissionsV1; } diff --git a/packages/types/src/interfaces/grandpa/types.ts b/packages/types/src/interfaces/grandpa/types.ts index f6f7b66495..1ff2df03d4 100644 --- a/packages/types/src/interfaces/grandpa/types.ts +++ b/packages/types/src/interfaces/grandpa/types.ts @@ -7,59 +7,46 @@ import { u64 } from '@polkadot/types/primitive'; import { BlockNumber } from '@polkadot/types/interfaces/runtime'; import { AuthorityId } from '@polkadot/types/interfaces/consensus'; -/** u64 */ +/** @name AuthorityIndex */ export interface AuthorityIndex extends u64 {} -/** Vec */ +/** @name AuthorityList */ export interface AuthorityList extends Vec {} -/** u64 */ +/** @name AuthorityWeight */ export interface AuthorityWeight extends u64 {} -/** ITuple<[AuthorityId, AuthorityWeight]> */ +/** @name NextAuthority */ export interface NextAuthority extends ITuple<[AuthorityId, AuthorityWeight]> {} -/** Struct */ +/** @name PendingPause */ export interface PendingPause extends Struct { - /** BlockNumber */ readonly scheduledAt: BlockNumber; - /** BlockNumber */ readonly delay: BlockNumber; } -/** Struct */ +/** @name PendingResume */ export interface PendingResume extends Struct { - /** BlockNumber */ readonly scheduledAt: BlockNumber; - /** BlockNumber */ readonly delay: BlockNumber; } -/** u64 */ +/** @name SetId */ export interface SetId extends u64 {} -/** Struct */ +/** @name StoredPendingChange */ export interface StoredPendingChange extends Struct { - /** BlockNumber */ readonly scheduledAt: BlockNumber; - /** BlockNumber */ readonly delay: BlockNumber; - /** AuthorityList */ readonly nextAuthorities: AuthorityList; } -/** Enum */ +/** @name StoredState */ export interface StoredState extends Enum { - /** 0:: Live */ readonly isLive: boolean; - /** 1:: PendingPause(PendingPause) */ readonly isPendingPause: boolean; - /** PendingPause */ readonly asPendingPause: PendingPause; - /** 2:: Paused */ readonly isPaused: boolean; - /** 3:: PendingResume(PendingResume) */ readonly isPendingResume: boolean; - /** PendingResume */ readonly asPendingResume: PendingResume; } diff --git a/packages/types/src/interfaces/identity/types.ts b/packages/types/src/interfaces/identity/types.ts index b12775df6d..90b044082d 100644 --- a/packages/types/src/interfaces/identity/types.ts +++ b/packages/types/src/interfaces/identity/types.ts @@ -6,73 +6,50 @@ import { Enum, Option, Struct, Vec } from '@polkadot/types/codec'; import { Data, H160, IdentityFields, u32 } from '@polkadot/types/primitive'; import { AccountId, Balance } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name IdentityInfo */ export interface IdentityInfo extends Struct { - /** Vec */ readonly additional: Vec; - /** Data */ readonly display: Data; - /** Data */ readonly legal: Data; - /** Data */ readonly web: Data; - /** Data */ readonly riot: Data; - /** Data */ readonly email: Data; - /** Option */ readonly pgpFingerprint: Option; - /** Data */ readonly image: Data; - /** Data */ readonly twitter: Data; } -/** ITuple<[Data, Data]> */ +/** @name IdentityInfoAdditional */ export interface IdentityInfoAdditional extends ITuple<[Data, Data]> {} -/** Enum */ +/** @name IdentityJudgement */ export interface IdentityJudgement extends Enum { - /** 0:: Unknown */ readonly isUnknown: boolean; - /** 1:: FeePaid(Balance) */ readonly isFeePaid: boolean; - /** Balance */ readonly asFeePaid: Balance; - /** 2:: Reasonable */ readonly isReasonable: boolean; - /** 3:: KnownGood */ readonly isKnownGood: boolean; - /** 4:: OutOfDate */ readonly isOutOfDate: boolean; - /** 5:: LowQuality */ readonly isLowQuality: boolean; - /** 6:: Erroneous */ readonly isErroneous: boolean; } -/** u32 */ +/** @name RegistrarIndex */ export interface RegistrarIndex extends u32 {} -/** Struct */ +/** @name RegistrarInfo */ export interface RegistrarInfo extends Struct { - /** AccountId */ readonly account: AccountId; - /** Balance */ readonly fee: Balance; - /** IdentityFields */ readonly fields: IdentityFields; } -/** Struct */ +/** @name Registration */ export interface Registration extends Struct { - /** Vec */ readonly judgements: Vec; - /** Balance */ readonly deposit: Balance; - /** IdentityInfo */ readonly info: IdentityInfo; } -/** ITuple<[RegistrarIndex, IdentityJudgement]> */ +/** @name RegistrationJudgement */ export interface RegistrationJudgement extends ITuple<[RegistrarIndex, IdentityJudgement]> {} diff --git a/packages/types/src/interfaces/imOnline/types.ts b/packages/types/src/interfaces/imOnline/types.ts index 60f8ecf5f6..6d05ecd8c4 100644 --- a/packages/types/src/interfaces/imOnline/types.ts +++ b/packages/types/src/interfaces/imOnline/types.ts @@ -6,34 +6,28 @@ import { Bytes, u32 } from '@polkadot/types/primitive'; import { BlockNumber, Signature } from '@polkadot/types/interfaces/runtime'; import { SessionIndex } from '@polkadot/types/interfaces/session'; -/** u32 */ +/** @name AuthIndex */ export interface AuthIndex extends u32 {} -/** Signature */ +/** @name AuthoritySignature */ export interface AuthoritySignature extends Signature {} -/** Struct */ +/** @name Heartbeat */ export interface Heartbeat extends Struct { - /** BlockNumber */ readonly blockNumber: BlockNumber; - /** OpaqueNetworkState */ readonly networkState: OpaqueNetworkState; - /** SessionIndex */ readonly sessionIndex: SessionIndex; - /** AuthIndex */ readonly authorityIndex: AuthIndex; } -/** Bytes */ +/** @name OpaqueMultiaddr */ export interface OpaqueMultiaddr extends Bytes {} -/** Struct */ +/** @name OpaqueNetworkState */ export interface OpaqueNetworkState extends Struct { - /** OpaquePeerId */ readonly peerId: OpaquePeerId; - /** Vec */ readonly externalAddresses: Vec; } -/** Bytes */ +/** @name OpaquePeerId */ export interface OpaquePeerId extends Bytes {} diff --git a/packages/types/src/interfaces/metadata/types.ts b/packages/types/src/interfaces/metadata/types.ts index d792dfa65f..3abf8cbbb4 100644 --- a/packages/types/src/interfaces/metadata/types.ts +++ b/packages/types/src/interfaces/metadata/types.ts @@ -5,992 +5,763 @@ import { ITuple } from '@polkadot/types/types'; import { Enum, Option, Struct, Vec } from '@polkadot/types/codec'; import { Bytes, Text, Type, bool, u16 } from '@polkadot/types/primitive'; -/** Struct */ +/** @name CallMetadataV0 */ export interface CallMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly functions: Vec; } -/** DoubleMapTypeV10 */ +/** @name DoubleMapTypeLatest */ export interface DoubleMapTypeLatest extends DoubleMapTypeV10 {} -/** Struct */ +/** @name DoubleMapTypeV10 */ export interface DoubleMapTypeV10 extends Struct { - /** StorageHasherV10 */ readonly hasher: StorageHasherV10; - /** Type */ readonly key1: Type; - /** Type */ readonly key2: Type; - /** Type */ readonly value: Type; - /** StorageHasherV10 */ readonly key2Hasher: StorageHasherV10; } -/** Struct */ +/** @name DoubleMapTypeV3 */ export interface DoubleMapTypeV3 extends Struct { - /** Type */ readonly key1: Type; - /** Type */ readonly key2: Type; - /** Type */ readonly value: Type; - /** Text */ readonly key2Hasher: Text; } -/** Struct */ +/** @name DoubleMapTypeV4 */ export interface DoubleMapTypeV4 extends Struct { - /** StorageHasherV4 */ readonly hasher: StorageHasherV4; - /** Type */ readonly key1: Type; - /** Type */ readonly key2: Type; - /** Type */ readonly value: Type; - /** Text */ readonly key2Hasher: Text; } -/** Struct */ +/** @name DoubleMapTypeV5 */ export interface DoubleMapTypeV5 extends Struct { - /** StorageHasherV5 */ readonly hasher: StorageHasherV5; - /** Type */ readonly key1: Type; - /** Type */ readonly key2: Type; - /** Type */ readonly value: Type; - /** StorageHasherV5 */ readonly key2Hasher: StorageHasherV5; } -/** DoubleMapTypeV5 */ +/** @name DoubleMapTypeV6 */ export interface DoubleMapTypeV6 extends DoubleMapTypeV5 {} -/** DoubleMapTypeV6 */ +/** @name DoubleMapTypeV7 */ export interface DoubleMapTypeV7 extends DoubleMapTypeV6 {} -/** DoubleMapTypeV7 */ +/** @name DoubleMapTypeV8 */ export interface DoubleMapTypeV8 extends DoubleMapTypeV7 {} -/** DoubleMapTypeV8 */ +/** @name DoubleMapTypeV9 */ export interface DoubleMapTypeV9 extends DoubleMapTypeV8 {} -/** ErrorMetadataV9 */ +/** @name ErrorMetadataV10 */ export interface ErrorMetadataV10 extends ErrorMetadataV9 {} -/** Struct */ +/** @name ErrorMetadataV8 */ export interface ErrorMetadataV8 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly documentation: Vec; } -/** ErrorMetadataV8 */ +/** @name ErrorMetadataV9 */ export interface ErrorMetadataV9 extends ErrorMetadataV8 {} -/** EventMetadataV10 */ +/** @name EventMetadataLatest */ export interface EventMetadataLatest extends EventMetadataV10 {} -/** Struct */ +/** @name EventMetadataV0 */ export interface EventMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly args: Vec; - /** Vec */ readonly documentation: Vec; } -/** EventMetadataV0 */ +/** @name EventMetadataV1 */ export interface EventMetadataV1 extends EventMetadataV0 {} -/** EventMetadataV9 */ +/** @name EventMetadataV10 */ export interface EventMetadataV10 extends EventMetadataV9 {} -/** EventMetadataV1 */ +/** @name EventMetadataV2 */ export interface EventMetadataV2 extends EventMetadataV1 {} -/** EventMetadataV2 */ +/** @name EventMetadataV3 */ export interface EventMetadataV3 extends EventMetadataV2 {} -/** EventMetadataV3 */ +/** @name EventMetadataV4 */ export interface EventMetadataV4 extends EventMetadataV3 {} -/** EventMetadataV4 */ +/** @name EventMetadataV5 */ export interface EventMetadataV5 extends EventMetadataV4 {} -/** EventMetadataV5 */ +/** @name EventMetadataV6 */ export interface EventMetadataV6 extends EventMetadataV5 {} -/** EventMetadataV6 */ +/** @name EventMetadataV7 */ export interface EventMetadataV7 extends EventMetadataV6 {} -/** EventMetadataV7 */ +/** @name EventMetadataV8 */ export interface EventMetadataV8 extends EventMetadataV7 {} -/** EventMetadataV8 */ +/** @name EventMetadataV9 */ export interface EventMetadataV9 extends EventMetadataV8 {} -/** FunctionArgumentMetadataV10 */ +/** @name FunctionArgumentMetadataLatest */ export interface FunctionArgumentMetadataLatest extends FunctionArgumentMetadataV10 {} -/** Struct */ +/** @name FunctionArgumentMetadataV0 */ export interface FunctionArgumentMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** Type */ readonly type: Type; } -/** FunctionArgumentMetadataV0 */ +/** @name FunctionArgumentMetadataV1 */ export interface FunctionArgumentMetadataV1 extends FunctionArgumentMetadataV0 {} -/** FunctionArgumentMetadataV9 */ +/** @name FunctionArgumentMetadataV10 */ export interface FunctionArgumentMetadataV10 extends FunctionArgumentMetadataV9 {} -/** FunctionArgumentMetadataV1 */ +/** @name FunctionArgumentMetadataV2 */ export interface FunctionArgumentMetadataV2 extends FunctionArgumentMetadataV1 {} -/** FunctionArgumentMetadataV2 */ +/** @name FunctionArgumentMetadataV3 */ export interface FunctionArgumentMetadataV3 extends FunctionArgumentMetadataV2 {} -/** FunctionArgumentMetadataV3 */ +/** @name FunctionArgumentMetadataV4 */ export interface FunctionArgumentMetadataV4 extends FunctionArgumentMetadataV3 {} -/** FunctionArgumentMetadataV4 */ +/** @name FunctionArgumentMetadataV5 */ export interface FunctionArgumentMetadataV5 extends FunctionArgumentMetadataV4 {} -/** FunctionArgumentMetadataV5 */ +/** @name FunctionArgumentMetadataV6 */ export interface FunctionArgumentMetadataV6 extends FunctionArgumentMetadataV5 {} -/** FunctionArgumentMetadataV6 */ +/** @name FunctionArgumentMetadataV7 */ export interface FunctionArgumentMetadataV7 extends FunctionArgumentMetadataV6 {} -/** FunctionArgumentMetadataV7 */ +/** @name FunctionArgumentMetadataV8 */ export interface FunctionArgumentMetadataV8 extends FunctionArgumentMetadataV7 {} -/** FunctionArgumentMetadataV8 */ +/** @name FunctionArgumentMetadataV9 */ export interface FunctionArgumentMetadataV9 extends FunctionArgumentMetadataV8 {} -/** FunctionMetadataV10 */ +/** @name FunctionMetadataLatest */ export interface FunctionMetadataLatest extends FunctionMetadataV10 {} -/** Struct */ +/** @name FunctionMetadataV0 */ export interface FunctionMetadataV0 extends Struct { - /** u16 */ readonly id: u16; - /** Text */ readonly name: Text; - /** Vec */ readonly args: Vec; - /** Vec */ readonly documentation: Vec; } -/** Struct */ +/** @name FunctionMetadataV1 */ export interface FunctionMetadataV1 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly args: Vec; - /** Vec */ readonly documentation: Vec; } -/** FunctionMetadataV9 */ +/** @name FunctionMetadataV10 */ export interface FunctionMetadataV10 extends FunctionMetadataV9 {} -/** FunctionMetadataV1 */ +/** @name FunctionMetadataV2 */ export interface FunctionMetadataV2 extends FunctionMetadataV1 {} -/** FunctionMetadataV2 */ +/** @name FunctionMetadataV3 */ export interface FunctionMetadataV3 extends FunctionMetadataV2 {} -/** FunctionMetadataV3 */ +/** @name FunctionMetadataV4 */ export interface FunctionMetadataV4 extends FunctionMetadataV3 {} -/** FunctionMetadataV4 */ +/** @name FunctionMetadataV5 */ export interface FunctionMetadataV5 extends FunctionMetadataV4 {} -/** FunctionMetadataV5 */ +/** @name FunctionMetadataV6 */ export interface FunctionMetadataV6 extends FunctionMetadataV5 {} -/** FunctionMetadataV6 */ +/** @name FunctionMetadataV7 */ export interface FunctionMetadataV7 extends FunctionMetadataV6 {} -/** FunctionMetadataV7 */ +/** @name FunctionMetadataV8 */ export interface FunctionMetadataV8 extends FunctionMetadataV7 {} -/** FunctionMetadataV8 */ +/** @name FunctionMetadataV9 */ export interface FunctionMetadataV9 extends FunctionMetadataV8 {} -/** MapTypeV10 */ +/** @name MapTypeLatest */ export interface MapTypeLatest extends MapTypeV10 {} -/** Struct */ +/** @name MapTypeV0 */ export interface MapTypeV0 extends Struct { - /** Type */ readonly key: Type; - /** Type */ readonly value: Type; } -/** Struct */ +/** @name MapTypeV10 */ export interface MapTypeV10 extends Struct { - /** StorageHasherV10 */ readonly hasher: StorageHasherV10; - /** Type */ readonly key: Type; - /** Type */ readonly value: Type; - /** bool */ readonly linked: bool; } -/** Struct */ +/** @name MapTypeV2 */ export interface MapTypeV2 extends Struct { - /** Type */ readonly key: Type; - /** Type */ readonly value: Type; - /** bool */ readonly linked: bool; } -/** MapTypeV2 */ +/** @name MapTypeV3 */ export interface MapTypeV3 extends MapTypeV2 {} -/** Struct */ +/** @name MapTypeV4 */ export interface MapTypeV4 extends Struct { - /** StorageHasherV4 */ readonly hasher: StorageHasherV4; - /** Type */ readonly key: Type; - /** Type */ readonly value: Type; - /** bool */ readonly linked: bool; } -/** MapTypeV4 */ +/** @name MapTypeV5 */ export interface MapTypeV5 extends MapTypeV4 {} -/** MapTypeV5 */ +/** @name MapTypeV6 */ export interface MapTypeV6 extends MapTypeV5 {} -/** MapTypeV6 */ +/** @name MapTypeV7 */ export interface MapTypeV7 extends MapTypeV6 {} -/** MapTypeV7 */ +/** @name MapTypeV8 */ export interface MapTypeV8 extends MapTypeV7 {} -/** MapTypeV8 */ +/** @name MapTypeV9 */ export interface MapTypeV9 extends MapTypeV8 {} -/** Enum */ +/** @name MetadataAll */ export interface MetadataAll extends Enum { - /** 0:: V0(MetadataV0) */ readonly isV0: boolean; - /** MetadataV0 */ readonly asV0: MetadataV0; - /** 1:: V1(MetadataV1) */ readonly isV1: boolean; - /** MetadataV1 */ readonly asV1: MetadataV1; - /** 2:: V2(MetadataV2) */ readonly isV2: boolean; - /** MetadataV2 */ readonly asV2: MetadataV2; - /** 3:: V3(MetadataV3) */ readonly isV3: boolean; - /** MetadataV3 */ readonly asV3: MetadataV3; - /** 4:: V4(MetadataV4) */ readonly isV4: boolean; - /** MetadataV4 */ readonly asV4: MetadataV4; - /** 5:: V5(MetadataV5) */ readonly isV5: boolean; - /** MetadataV5 */ readonly asV5: MetadataV5; - /** 6:: V6(MetadataV6) */ readonly isV6: boolean; - /** MetadataV6 */ readonly asV6: MetadataV6; - /** 7:: V7(MetadataV7) */ readonly isV7: boolean; - /** MetadataV7 */ readonly asV7: MetadataV7; - /** 8:: V8(MetadataV8) */ readonly isV8: boolean; - /** MetadataV8 */ readonly asV8: MetadataV8; - /** 9:: V9(MetadataV9) */ readonly isV9: boolean; - /** MetadataV9 */ readonly asV9: MetadataV9; - /** 10:: V10(MetadataV10) */ readonly isV10: boolean; - /** MetadataV10 */ readonly asV10: MetadataV10; } -/** MetadataV10 */ +/** @name MetadataLatest */ export interface MetadataLatest extends MetadataV10 {} -/** Struct */ +/** @name MetadataV0 */ export interface MetadataV0 extends Struct { - /** OuterEventMetadataV0 */ readonly outerEvent: OuterEventMetadataV0; - /** Vec */ readonly modules: Vec; - /** OuterDispatchMetadataV0 */ readonly outerDispatch: OuterDispatchMetadataV0; } -/** Struct */ +/** @name MetadataV1 */ export interface MetadataV1 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV10 */ export interface MetadataV10 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV2 */ export interface MetadataV2 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV3 */ export interface MetadataV3 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV4 */ export interface MetadataV4 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV5 */ export interface MetadataV5 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV6 */ export interface MetadataV6 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV7 */ export interface MetadataV7 extends Struct { - /** Vec */ readonly modules: Vec; } -/** Struct */ +/** @name MetadataV8 */ export interface MetadataV8 extends Struct { - /** Vec */ readonly modules: Vec; } -/** MetadataV8 */ +/** @name MetadataV9 */ export interface MetadataV9 extends MetadataV8 {} -/** ModuleConstantMetadataV10 */ +/** @name ModuleConstantMetadataLatest */ export interface ModuleConstantMetadataLatest extends ModuleConstantMetadataV10 {} -/** ModuleConstantMetadataV9 */ +/** @name ModuleConstantMetadataV10 */ export interface ModuleConstantMetadataV10 extends ModuleConstantMetadataV9 {} -/** Struct */ +/** @name ModuleConstantMetadataV6 */ export interface ModuleConstantMetadataV6 extends Struct { - /** Text */ readonly name: Text; - /** Type */ readonly type: Type; - /** Bytes */ readonly value: Bytes; - /** Vec */ readonly documentation: Vec; } -/** ModuleConstantMetadataV6 */ +/** @name ModuleConstantMetadataV7 */ export interface ModuleConstantMetadataV7 extends ModuleConstantMetadataV6 {} -/** ModuleConstantMetadataV7 */ +/** @name ModuleConstantMetadataV8 */ export interface ModuleConstantMetadataV8 extends ModuleConstantMetadataV7 {} -/** ModuleConstantMetadataV8 */ +/** @name ModuleConstantMetadataV9 */ export interface ModuleConstantMetadataV9 extends ModuleConstantMetadataV8 {} -/** ModuleMetadataV10 */ +/** @name ModuleMetadataLatest */ export interface ModuleMetadataLatest extends ModuleMetadataV10 {} -/** Struct */ +/** @name ModuleMetadataV0 */ export interface ModuleMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** CallMetadataV0 */ readonly call: CallMetadataV0; } -/** Struct */ +/** @name ModuleMetadataV1 */ export interface ModuleMetadataV1 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; } -/** Struct */ +/** @name ModuleMetadataV10 */ export interface ModuleMetadataV10 extends Struct { - /** Text */ readonly name: Text; - /** Option */ readonly storage: Option; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; - /** Vec */ readonly constants: Vec; - /** Vec */ readonly errors: Vec; } -/** Struct */ +/** @name ModuleMetadataV2 */ export interface ModuleMetadataV2 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; } -/** Struct */ +/** @name ModuleMetadataV3 */ export interface ModuleMetadataV3 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; } -/** Struct */ +/** @name ModuleMetadataV4 */ export interface ModuleMetadataV4 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; } -/** Struct */ +/** @name ModuleMetadataV5 */ export interface ModuleMetadataV5 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; } -/** Struct */ +/** @name ModuleMetadataV6 */ export interface ModuleMetadataV6 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** Option> */ readonly storage: Option>; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; - /** Vec */ readonly constants: Vec; } -/** Struct */ +/** @name ModuleMetadataV7 */ export interface ModuleMetadataV7 extends Struct { - /** Text */ readonly name: Text; - /** Option */ readonly storage: Option; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; - /** Vec */ readonly constants: Vec; } -/** Struct */ +/** @name ModuleMetadataV8 */ export interface ModuleMetadataV8 extends Struct { - /** Text */ readonly name: Text; - /** Option */ readonly storage: Option; - /** Option> */ readonly calls: Option>; - /** Option> */ readonly events: Option>; - /** Vec */ readonly constants: Vec; - /** Vec */ readonly errors: Vec; } -/** ModuleMetadataV8 */ +/** @name ModuleMetadataV9 */ export interface ModuleMetadataV9 extends ModuleMetadataV8 {} -/** Struct */ +/** @name OuterDispatchCallV0 */ export interface OuterDispatchCallV0 extends Struct { - /** Text */ readonly name: Text; - /** Text */ readonly prefix: Text; - /** u16 */ readonly index: u16; } -/** Struct */ +/** @name OuterDispatchMetadataV0 */ export interface OuterDispatchMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly calls: Vec; } -/** Vec */ +/** @name OuterEventEventMetadataEventsV0 */ export interface OuterEventEventMetadataEventsV0 extends Vec {} -/** ITuple<[Text, OuterEventEventMetadataEventsV0]> */ +/** @name OuterEventEventMetadataV0 */ export interface OuterEventEventMetadataV0 extends ITuple<[Text, OuterEventEventMetadataEventsV0]> {} -/** Struct */ +/** @name OuterEventMetadataV0 */ export interface OuterEventMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** Vec */ readonly events: Vec; } -/** PlainTypeV10 */ +/** @name PlainTypeLatest */ export interface PlainTypeLatest extends PlainTypeV10 {} -/** Type */ +/** @name PlainTypeV0 */ export interface PlainTypeV0 extends Type {} -/** Type */ +/** @name PlainTypeV10 */ export interface PlainTypeV10 extends Type {} -/** Type */ +/** @name PlainTypeV2 */ export interface PlainTypeV2 extends Type {} -/** Type */ +/** @name PlainTypeV3 */ export interface PlainTypeV3 extends Type {} -/** Type */ +/** @name PlainTypeV4 */ export interface PlainTypeV4 extends Type {} -/** Type */ +/** @name PlainTypeV5 */ export interface PlainTypeV5 extends Type {} -/** Type */ +/** @name PlainTypeV6 */ export interface PlainTypeV6 extends Type {} -/** Type */ +/** @name PlainTypeV7 */ export interface PlainTypeV7 extends Type {} -/** Type */ +/** @name PlainTypeV8 */ export interface PlainTypeV8 extends Type {} -/** Type */ +/** @name PlainTypeV9 */ export interface PlainTypeV9 extends Type {} -/** Struct */ +/** @name RuntimeModuleMetadataV0 */ export interface RuntimeModuleMetadataV0 extends Struct { - /** Text */ readonly prefix: Text; - /** ModuleMetadataV0 */ readonly module: ModuleMetadataV0; - /** Option */ readonly storage: Option; } -/** StorageEntryMetadataV10 */ +/** @name StorageEntryMetadataLatest */ export interface StorageEntryMetadataLatest extends StorageEntryMetadataV10 {} -/** Struct */ +/** @name StorageEntryMetadataV10 */ export interface StorageEntryMetadataV10 extends Struct { - /** Text */ readonly name: Text; - /** StorageEntryModifierV10 */ readonly modifier: StorageEntryModifierV10; - /** StorageEntryTypeV10 */ readonly type: StorageEntryTypeV10; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** StorageFunctionMetadataV5 */ +/** @name StorageEntryMetadataV6 */ export interface StorageEntryMetadataV6 extends StorageFunctionMetadataV5 {} -/** StorageEntryMetadataV6 */ +/** @name StorageEntryMetadataV7 */ export interface StorageEntryMetadataV7 extends StorageEntryMetadataV6 {} -/** StorageEntryMetadataV7 */ +/** @name StorageEntryMetadataV8 */ export interface StorageEntryMetadataV8 extends StorageEntryMetadataV7 {} -/** StorageEntryMetadataV8 */ +/** @name StorageEntryMetadataV9 */ export interface StorageEntryMetadataV9 extends StorageEntryMetadataV8 {} -/** StorageEntryModifierV10 */ +/** @name StorageEntryModifierLatest */ export interface StorageEntryModifierLatest extends StorageEntryModifierV10 {} -/** StorageEntryModifierV9 */ +/** @name StorageEntryModifierV10 */ export interface StorageEntryModifierV10 extends StorageEntryModifierV9 {} -/** StorageFunctionModifierV5 */ +/** @name StorageEntryModifierV6 */ export interface StorageEntryModifierV6 extends StorageFunctionModifierV5 {} -/** StorageEntryModifierV6 */ +/** @name StorageEntryModifierV7 */ export interface StorageEntryModifierV7 extends StorageEntryModifierV6 {} -/** StorageEntryModifierV7 */ +/** @name StorageEntryModifierV8 */ export interface StorageEntryModifierV8 extends StorageEntryModifierV7 {} -/** StorageEntryModifierV8 */ +/** @name StorageEntryModifierV9 */ export interface StorageEntryModifierV9 extends StorageEntryModifierV8 {} -/** StorageEntryTypeV10 */ +/** @name StorageEntryTypeLatest */ export interface StorageEntryTypeLatest extends StorageEntryTypeV10 {} -/** Enum */ +/** @name StorageEntryTypeV10 */ export interface StorageEntryTypeV10 extends Enum { - /** 0:: Plain(PlainTypeV10) */ readonly isPlain: boolean; - /** PlainTypeV10 */ readonly asPlain: PlainTypeV10; - /** 1:: Map(MapTypeV10) */ readonly isMap: boolean; - /** MapTypeV10 */ readonly asMap: MapTypeV10; - /** 2:: DoubleMap(DoubleMapTypeV10) */ readonly isDoubleMap: boolean; - /** DoubleMapTypeV10 */ readonly asDoubleMap: DoubleMapTypeV10; } -/** StorageFunctionTypeV5 */ +/** @name StorageEntryTypeV6 */ export interface StorageEntryTypeV6 extends StorageFunctionTypeV5 {} -/** StorageEntryTypeV6 */ +/** @name StorageEntryTypeV7 */ export interface StorageEntryTypeV7 extends StorageEntryTypeV6 {} -/** StorageEntryTypeV7 */ +/** @name StorageEntryTypeV8 */ export interface StorageEntryTypeV8 extends StorageEntryTypeV7 {} -/** StorageEntryTypeV8 */ +/** @name StorageEntryTypeV9 */ export interface StorageEntryTypeV9 extends StorageEntryTypeV8 {} -/** Struct */ +/** @name StorageFunctionMetadataV0 */ export interface StorageFunctionMetadataV0 extends Struct { - /** Text */ readonly name: Text; - /** StorageFunctionModifierV0 */ readonly modifier: StorageFunctionModifierV0; - /** StorageFunctionTypeV0 */ readonly type: StorageFunctionTypeV0; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** StorageFunctionMetadataV0 */ +/** @name StorageFunctionMetadataV1 */ export interface StorageFunctionMetadataV1 extends StorageFunctionMetadataV0 {} -/** Struct */ +/** @name StorageFunctionMetadataV2 */ export interface StorageFunctionMetadataV2 extends Struct { - /** Text */ readonly name: Text; - /** StorageFunctionModifierV2 */ readonly modifier: StorageFunctionModifierV2; - /** StorageFunctionTypeV2 */ readonly type: StorageFunctionTypeV2; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** Struct */ +/** @name StorageFunctionMetadataV3 */ export interface StorageFunctionMetadataV3 extends Struct { - /** Text */ readonly name: Text; - /** StorageFunctionModifierV3 */ readonly modifier: StorageFunctionModifierV3; - /** StorageFunctionTypeV3 */ readonly type: StorageFunctionTypeV3; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** Struct */ +/** @name StorageFunctionMetadataV4 */ export interface StorageFunctionMetadataV4 extends Struct { - /** Text */ readonly name: Text; - /** StorageFunctionModifierV4 */ readonly modifier: StorageFunctionModifierV4; - /** StorageFunctionTypeV4 */ readonly type: StorageFunctionTypeV4; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** Struct */ +/** @name StorageFunctionMetadataV5 */ export interface StorageFunctionMetadataV5 extends Struct { - /** Text */ readonly name: Text; - /** StorageFunctionModifierV5 */ readonly modifier: StorageFunctionModifierV5; - /** StorageFunctionTypeV5 */ readonly type: StorageFunctionTypeV5; - /** Bytes */ readonly fallback: Bytes; - /** Vec */ readonly documentation: Vec; } -/** Enum */ +/** @name StorageFunctionModifierV0 */ export interface StorageFunctionModifierV0 extends Enum { - /** 0:: Optional */ readonly isOptional: boolean; - /** 1:: Default */ readonly isDefault: boolean; - /** 2:: Required */ readonly isRequired: boolean; } -/** StorageFunctionModifierV0 */ +/** @name StorageFunctionModifierV1 */ export interface StorageFunctionModifierV1 extends StorageFunctionModifierV0 {} -/** StorageFunctionModifierV1 */ +/** @name StorageFunctionModifierV2 */ export interface StorageFunctionModifierV2 extends StorageFunctionModifierV1 {} -/** StorageFunctionModifierV2 */ +/** @name StorageFunctionModifierV3 */ export interface StorageFunctionModifierV3 extends StorageFunctionModifierV2 {} -/** StorageFunctionModifierV3 */ +/** @name StorageFunctionModifierV4 */ export interface StorageFunctionModifierV4 extends StorageFunctionModifierV3 {} -/** StorageFunctionModifierV4 */ +/** @name StorageFunctionModifierV5 */ export interface StorageFunctionModifierV5 extends StorageFunctionModifierV4 {} -/** Enum */ +/** @name StorageFunctionTypeV0 */ export interface StorageFunctionTypeV0 extends Enum { - /** 0:: Plain(PlainTypeV0) */ readonly isPlain: boolean; - /** PlainTypeV0 */ readonly asPlain: PlainTypeV0; - /** 1:: Map(MapTypeV0) */ readonly isMap: boolean; - /** MapTypeV0 */ readonly asMap: MapTypeV0; } -/** StorageFunctionTypeV0 */ +/** @name StorageFunctionTypeV1 */ export interface StorageFunctionTypeV1 extends StorageFunctionTypeV0 {} -/** Enum */ +/** @name StorageFunctionTypeV2 */ export interface StorageFunctionTypeV2 extends Enum { - /** 0:: Plain(PlainTypeV2) */ readonly isPlain: boolean; - /** PlainTypeV2 */ readonly asPlain: PlainTypeV2; - /** 1:: Map(MapTypeV2) */ readonly isMap: boolean; - /** MapTypeV2 */ readonly asMap: MapTypeV2; } -/** Enum */ +/** @name StorageFunctionTypeV3 */ export interface StorageFunctionTypeV3 extends Enum { - /** 0:: Plain(PlainTypeV3) */ readonly isPlain: boolean; - /** PlainTypeV3 */ readonly asPlain: PlainTypeV3; - /** 1:: Map(MapTypeV3) */ readonly isMap: boolean; - /** MapTypeV3 */ readonly asMap: MapTypeV3; - /** 2:: DoubleMap(DoubleMapTypeV3) */ readonly isDoubleMap: boolean; - /** DoubleMapTypeV3 */ readonly asDoubleMap: DoubleMapTypeV3; } -/** Enum */ +/** @name StorageFunctionTypeV4 */ export interface StorageFunctionTypeV4 extends Enum { - /** 0:: Plain(PlainTypeV4) */ readonly isPlain: boolean; - /** PlainTypeV4 */ readonly asPlain: PlainTypeV4; - /** 1:: Map(MapTypeV4) */ readonly isMap: boolean; - /** MapTypeV4 */ readonly asMap: MapTypeV4; - /** 2:: DoubleMap(DoubleMapTypeV4) */ readonly isDoubleMap: boolean; - /** DoubleMapTypeV4 */ readonly asDoubleMap: DoubleMapTypeV4; } -/** Enum */ +/** @name StorageFunctionTypeV5 */ export interface StorageFunctionTypeV5 extends Enum { - /** 0:: Plain(PlainTypeV5) */ readonly isPlain: boolean; - /** PlainTypeV5 */ readonly asPlain: PlainTypeV5; - /** 1:: Map(MapTypeV5) */ readonly isMap: boolean; - /** MapTypeV5 */ readonly asMap: MapTypeV5; - /** 2:: DoubleMap(DoubleMapTypeV5) */ readonly isDoubleMap: boolean; - /** DoubleMapTypeV5 */ readonly asDoubleMap: DoubleMapTypeV5; } -/** StorageHasherV10 */ +/** @name StorageHasher */ export interface StorageHasher extends StorageHasherV10 {} -/** Enum */ +/** @name StorageHasherV10 */ export interface StorageHasherV10 extends Enum { - /** 0:: Blake2_128 */ readonly isBlake2128: boolean; - /** 1:: Blake2_256 */ readonly isBlake2256: boolean; - /** 2:: Blake2_128Concat */ readonly isBlake2128Concat: boolean; - /** 3:: Twox128 */ readonly isTwox128: boolean; - /** 4:: Twox256 */ readonly isTwox256: boolean; - /** 5:: Twox64Concat */ readonly isTwox64Concat: boolean; } -/** Enum */ +/** @name StorageHasherV4 */ export interface StorageHasherV4 extends Enum { - /** 0:: Blake2_128 */ readonly isBlake2128: boolean; - /** 1:: Blake2_256 */ readonly isBlake2256: boolean; - /** 2:: Twox128 */ readonly isTwox128: boolean; - /** 3:: Twox256 */ readonly isTwox256: boolean; - /** 4:: Twox64Concat */ readonly isTwox64Concat: boolean; - /** 5:: InvalidEntry */ readonly isInvalidEntry: boolean; } -/** StorageHasherV4 */ +/** @name StorageHasherV5 */ export interface StorageHasherV5 extends StorageHasherV4 {} -/** StorageHasherV5 */ +/** @name StorageHasherV6 */ export interface StorageHasherV6 extends StorageHasherV5 {} -/** StorageHasherV6 */ +/** @name StorageHasherV7 */ export interface StorageHasherV7 extends StorageHasherV6 {} -/** StorageHasherV7 */ +/** @name StorageHasherV8 */ export interface StorageHasherV8 extends StorageHasherV7 {} -/** StorageHasherV8 */ +/** @name StorageHasherV9 */ export interface StorageHasherV9 extends StorageHasherV8 {} -/** StorageMetadataV10 */ +/** @name StorageMetadataLatest */ export interface StorageMetadataLatest extends StorageMetadataV10 {} -/** Struct */ +/** @name StorageMetadataV0 */ export interface StorageMetadataV0 extends Struct { - /** Text */ readonly prefix: Text; - /** Vec */ readonly functions: Vec; } -/** Struct */ +/** @name StorageMetadataV10 */ export interface StorageMetadataV10 extends Struct { - /** Text */ readonly prefix: Text; - /** Vec */ readonly items: Vec; } -/** Struct */ +/** @name StorageMetadataV7 */ export interface StorageMetadataV7 extends Struct { - /** Text */ readonly prefix: Text; - /** Vec */ readonly items: Vec; } -/** StorageMetadataV7 */ +/** @name StorageMetadataV8 */ export interface StorageMetadataV8 extends StorageMetadataV7 {} -/** StorageMetadataV8 */ +/** @name StorageMetadataV9 */ export interface StorageMetadataV9 extends StorageMetadataV8 {} diff --git a/packages/types/src/interfaces/offences/types.ts b/packages/types/src/interfaces/offences/types.ts index 4894154350..0e4d1d3db6 100644 --- a/packages/types/src/interfaces/offences/types.ts +++ b/packages/types/src/interfaces/offences/types.ts @@ -7,25 +7,23 @@ import { Bytes } from '@polkadot/types/primitive'; import { AccountId, Hash } from '@polkadot/types/interfaces/runtime'; import { IdentificationTuple } from '@polkadot/types/interfaces/session'; -/** Uint8Array, Codec */ +/** @name Kind */ export interface Kind extends Uint8Array, Codec {} -/** Struct */ +/** @name OffenceDetails */ export interface OffenceDetails extends Struct { - /** Offender */ readonly offender: Offender; - /** Vec */ readonly reporters: Vec; } -/** IdentificationTuple */ +/** @name Offender */ export interface Offender extends IdentificationTuple {} -/** Bytes */ +/** @name OpaqueTimeSlot */ export interface OpaqueTimeSlot extends Bytes {} -/** AccountId */ +/** @name Reporter */ export interface Reporter extends AccountId {} -/** Hash */ +/** @name ReportIdOf */ export interface ReportIdOf extends Hash {} diff --git a/packages/types/src/interfaces/parachains/types.ts b/packages/types/src/interfaces/parachains/types.ts index df0086a783..5bad9431b9 100644 --- a/packages/types/src/interfaces/parachains/types.ts +++ b/packages/types/src/interfaces/parachains/types.ts @@ -6,205 +6,154 @@ import { Enum, Struct, Vec } from '@polkadot/types/codec'; import { Bytes, H256, u32, u64 } from '@polkadot/types/primitive'; import { AccountId, BalanceOf, BlockNumber, Hash, Signature } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name AttestedCandidate */ export interface AttestedCandidate extends Struct { - /** CandidateReceipt */ readonly candidate: CandidateReceipt; - /** Vec */ readonly validityVotes: Vec; } -/** u32 */ +/** @name AuctionIndex */ export interface AuctionIndex extends u32 {} -/** ITuple<[AccountId, u64]> */ +/** @name BalanceUpload */ export interface BalanceUpload extends ITuple<[AccountId, u64]> {} -/** Enum */ +/** @name Bidder */ export interface Bidder extends Enum { - /** 0:: New(NewBidder) */ readonly isNew: boolean; - /** NewBidder */ readonly asNew: NewBidder; - /** 1:: Existing(ParaId) */ readonly isExisting: boolean; - /** ParaId */ readonly asExisting: ParaId; } -/** Struct */ +/** @name CandidateReceipt */ export interface CandidateReceipt extends Struct { - /** ParaId */ readonly parachainIndex: ParaId; - /** AccountId */ readonly collator: AccountId; - /** CollatorSignature */ readonly signature: CollatorSignature; - /** HeadData */ readonly headData: HeadData; - /** Vec */ readonly balanceUploads: Vec; - /** Vec */ readonly egressQueueRoots: Vec; - /** u64 */ readonly fees: u64; - /** Hash */ readonly blockDataHash: Hash; } -/** H256 */ +/** @name CollatorId */ export interface CollatorId extends H256 {} -/** Signature */ +/** @name CollatorSignature */ export interface CollatorSignature extends Signature {} -/** ITuple<[ParaId, Hash]> */ +/** @name EgressQueueRoot */ export interface EgressQueueRoot extends ITuple<[ParaId, Hash]> {} -/** Bytes */ +/** @name HeadData */ export interface HeadData extends Bytes {} -/** Enum */ +/** @name IncomingParachain */ export interface IncomingParachain extends Enum { - /** 0:: Unset(NewBidder) */ readonly isUnset: boolean; - /** NewBidder */ readonly asUnset: NewBidder; - /** 1:: Fixed(IncomingParachainFixed) */ readonly isFixed: boolean; - /** IncomingParachainFixed */ readonly asFixed: IncomingParachainFixed; - /** 2:: Deploy(IncomingParachainDeploy) */ readonly isDeploy: boolean; - /** IncomingParachainDeploy */ readonly asDeploy: IncomingParachainDeploy; } -/** Struct */ +/** @name IncomingParachainDeploy */ export interface IncomingParachainDeploy extends Struct { - /** Bytes */ readonly code: Bytes; - /** Bytes */ readonly initialHeadData: Bytes; } -/** Struct */ +/** @name IncomingParachainFixed */ export interface IncomingParachainFixed extends Struct { - /** Hash */ readonly codeHash: Hash; - /** Bytes */ readonly initialHeadData: Bytes; } -/** BlockNumber */ +/** @name LeasePeriod */ export interface LeasePeriod extends BlockNumber {} -/** LeasePeriod */ +/** @name LeasePeriodOf */ export interface LeasePeriodOf extends LeasePeriod {} -/** Struct */ +/** @name NewBidder */ export interface NewBidder extends Struct { - /** AccountId */ readonly who: AccountId; - /** SubId */ readonly sub: SubId; } -/** Enum */ +/** @name ParachainDispatchOrigin */ export interface ParachainDispatchOrigin extends Enum { - /** 0:: Signed */ readonly isSigned: boolean; - /** 1:: Parachain */ readonly isParachain: boolean; } -/** u32 */ +/** @name ParaId */ export interface ParaId extends u32 {} -/** ParaId */ +/** @name ParaIdOf */ export interface ParaIdOf extends ParaId {} -/** Struct */ +/** @name ParaInfo */ export interface ParaInfo extends Struct { - /** ParaScheduling */ readonly scheduling: ParaScheduling; } -/** Enum */ +/** @name ParaScheduling */ export interface ParaScheduling extends Enum { - /** 0:: Always */ readonly isAlways: boolean; - /** 1:: Dynamic */ readonly isDynamic: boolean; } -/** Enum */ +/** @name Retriable */ export interface Retriable extends Enum { - /** 0:: Never */ readonly isNever: boolean; - /** 1:: WithRetries(u32) */ readonly isWithRetries: boolean; - /** u32 */ readonly asWithRetries: u32; } -/** Enum */ +/** @name SlotRange */ export interface SlotRange extends Enum { - /** 0:: ZeroZero */ readonly isZeroZero: boolean; - /** 1:: ZeroOne */ readonly isZeroOne: boolean; - /** 2:: ZeroTwo */ readonly isZeroTwo: boolean; - /** 3:: ZeroThree */ readonly isZeroThree: boolean; - /** 4:: OneOne */ readonly isOneOne: boolean; - /** 5:: OneTwo */ readonly isOneTwo: boolean; - /** 6:: OneThree */ readonly isOneThree: boolean; - /** 7:: TwoTwo */ readonly isTwoTwo: boolean; - /** 8:: TwoThree */ readonly isTwoThree: boolean; - /** 9:: ThreeThree */ readonly isThreeThree: boolean; } -/** u32 */ +/** @name SubId */ export interface SubId extends u32 {} -/** Struct */ +/** @name UpwardMessage */ export interface UpwardMessage extends Struct { - /** ParachainDispatchOrigin */ readonly origin: ParachainDispatchOrigin; - /** Bytes */ readonly data: Bytes; } -/** u32 */ +/** @name ValidatorIndex */ export interface ValidatorIndex extends u32 {} -/** Enum */ +/** @name ValidityAttestation */ export interface ValidityAttestation extends Enum { - /** 0:: None */ readonly isNone: boolean; - /** 1:: Implicit(CollatorSignature) */ readonly isImplicit: boolean; - /** CollatorSignature */ readonly asImplicit: CollatorSignature; - /** 2:: Explicit(CollatorSignature) */ readonly isExplicit: boolean; - /** CollatorSignature */ readonly asExplicit: CollatorSignature; } -/** ITuple<[ValidatorIndex, ValidityAttestation]> */ +/** @name ValidityVote */ export interface ValidityVote extends ITuple<[ValidatorIndex, ValidityAttestation]> {} -/** Vec */ +/** @name WinningData */ export interface WinningData extends Vec {} -/** ITuple<[AccountId, ParaIdOf, BalanceOf]> */ +/** @name WinningDataEntry */ export interface WinningDataEntry extends ITuple<[AccountId, ParaIdOf, BalanceOf]> {} diff --git a/packages/types/src/interfaces/recovery/types.ts b/packages/types/src/interfaces/recovery/types.ts index 86fd6487b8..df601f26b9 100644 --- a/packages/types/src/interfaces/recovery/types.ts +++ b/packages/types/src/interfaces/recovery/types.ts @@ -5,24 +5,17 @@ import { Struct, Vec } from '@polkadot/types/codec'; import { u16 } from '@polkadot/types/primitive'; import { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name ActiveRecovery */ export interface ActiveRecovery extends Struct { - /** BlockNumber */ readonly created: BlockNumber; - /** Balance */ readonly deposit: Balance; - /** Vec */ readonly friends: Vec; } -/** Struct */ +/** @name RecoveryConfig */ export interface RecoveryConfig extends Struct { - /** BlockNumber */ readonly delayPeriod: BlockNumber; - /** Balance */ readonly deposit: Balance; - /** Vec */ readonly friends: Vec; - /** u16 */ readonly threshold: u16; } diff --git a/packages/types/src/interfaces/rpc/types.ts b/packages/types/src/interfaces/rpc/types.ts index 399e632640..55465e7dfe 100644 --- a/packages/types/src/interfaces/rpc/types.ts +++ b/packages/types/src/interfaces/rpc/types.ts @@ -6,132 +6,93 @@ import { Enum, Option, Struct, Vec } from '@polkadot/types/codec'; import { Bytes, StorageData, StorageKey, Text, bool, u32, u64, u8 } from '@polkadot/types/primitive'; import { Balance, BlockNumber, DispatchClass, Hash, Weight } from '@polkadot/types/interfaces/runtime'; -/** Uint8Array, Codec */ +/** @name ApiId */ export interface ApiId extends Uint8Array, Codec {} -/** Hash */ +/** @name BlockHash */ export interface BlockHash extends Hash {} -/** Struct */ +/** @name ChainProperties */ export interface ChainProperties extends Struct { - /** Option */ readonly ss58Format: Option; - /** Option */ readonly tokenDecimals: Option; - /** Option */ readonly tokenSymbol: Option; } -/** Enum */ +/** @name ExtrinsicOrHash */ export interface ExtrinsicOrHash extends Enum { - /** 0:: Hash(Hash) */ readonly isHash: boolean; - /** Hash */ readonly asHash: Hash; - /** 1:: Extrinsic(Bytes) */ readonly isExtrinsic: boolean; - /** Bytes */ readonly asExtrinsic: Bytes; } -/** Enum */ +/** @name ExtrinsicStatus */ export interface ExtrinsicStatus extends Enum { - /** 0:: Future */ readonly isFuture: boolean; - /** 1:: Ready */ readonly isReady: boolean; - /** 2:: Finalized(Hash) */ readonly isFinalized: boolean; - /** Hash */ readonly asFinalized: Hash; - /** 3:: Usurped(Hash) */ readonly isUsurped: boolean; - /** Hash */ readonly asUsurped: Hash; - /** 4:: Broadcast(Vec) */ readonly isBroadcast: boolean; - /** Vec */ readonly asBroadcast: Vec; - /** 5:: Dropped */ readonly isDropped: boolean; - /** 6:: Invalid */ readonly isInvalid: boolean; } -/** Struct */ +/** @name Health */ export interface Health extends Struct { - /** u64 */ readonly peers: u64; - /** bool */ readonly isSyncing: bool; - /** bool */ readonly shouldHavePeers: bool; } -/** ITuple<[StorageKey, Option]> */ +/** @name KeyValueOption */ export interface KeyValueOption extends ITuple<[StorageKey, Option]> {} -/** Struct */ +/** @name NetworkState */ export interface NetworkState extends Struct { - /** Text */ readonly peerId: Text; } -/** Struct */ +/** @name PeerInfo */ export interface PeerInfo extends Struct { - /** Text */ readonly peerId: Text; - /** Text */ readonly roles: Text; - /** u32 */ readonly protocolVersion: u32; - /** Hash */ readonly bestHash: Hash; - /** BlockNumber */ readonly bestNumber: BlockNumber; } -/** Struct */ +/** @name RpcMethods */ export interface RpcMethods extends Struct { - /** u32 */ readonly version: u32; - /** Vec */ readonly methods: Vec; } -/** Struct */ +/** @name RuntimeDispatchInfo */ export interface RuntimeDispatchInfo extends Struct { - /** Weight */ readonly weight: Weight; - /** DispatchClass */ readonly class: DispatchClass; - /** Balance */ readonly partialFee: Balance; } -/** Struct */ +/** @name RuntimeVersion */ export interface RuntimeVersion extends Struct { - /** Text */ readonly specName: Text; - /** Text */ readonly implName: Text; - /** u32 */ readonly authoringVersion: u32; - /** u32 */ readonly specVersion: u32; - /** u32 */ readonly implVersion: u32; - /** Vec */ readonly apis: Vec; } -/** ITuple<[ApiId, u32]> */ +/** @name RuntimeVersionApi */ export interface RuntimeVersionApi extends ITuple<[ApiId, u32]> {} -/** Struct */ +/** @name StorageChangeSet */ export interface StorageChangeSet extends Struct { - /** Hash */ readonly block: Hash; - /** Vec */ readonly changes: Vec; } diff --git a/packages/types/src/interfaces/runtime/types.ts b/packages/types/src/interfaces/runtime/types.ts index 49142ef040..ee32bc2023 100644 --- a/packages/types/src/interfaces/runtime/types.ts +++ b/packages/types/src/interfaces/runtime/types.ts @@ -5,236 +5,214 @@ import { Codec, ITuple } from '@polkadot/types/types'; import { Compact, Enum, Struct } from '@polkadot/types/codec'; import { Bytes, Fixed64, GenericAccountId, GenericAccountIndex, GenericAddress, GenericBlock, GenericCall, GenericConsensusEngineId, GenericDigest, GenericDigestItem, GenericExtrinsic, GenericExtrinsicEra, GenericExtrinsicPayload, GenericExtrinsicPayloadUnknown, GenericExtrinsicPayloadV1, GenericExtrinsicPayloadV2, GenericExtrinsicPayloadV3, GenericExtrinsicPayloadV4, GenericExtrinsicUnknown, GenericExtrinsicV1, GenericExtrinsicV2, GenericExtrinsicV3, GenericExtrinsicV4, GenericImmortalEra, GenericMortalEra, GenericOrigin, GenericSignerPayload, H256, H512, Null, StorageData, StorageKey, bool, u128, u32, u64, u8 } from '@polkadot/types/primitive'; -/** GenericAccountId */ +/** @name AccountId */ export interface AccountId extends GenericAccountId {} -/** AccountId */ +/** @name AccountIdOf */ export interface AccountIdOf extends AccountId {} -/** GenericAccountIndex */ +/** @name AccountIndex */ export interface AccountIndex extends GenericAccountIndex {} -/** GenericAddress */ +/** @name Address */ export interface Address extends GenericAddress {} -/** u32 */ +/** @name AssetId */ export interface AssetId extends u32 {} -/** u128 */ +/** @name Balance */ export interface Balance extends u128 {} -/** Balance */ +/** @name BalanceOf */ export interface BalanceOf extends Balance {} -/** GenericBlock */ +/** @name Block */ export interface Block extends GenericBlock {} -/** u32 */ +/** @name BlockNumber */ export interface BlockNumber extends u32 {} -/** GenericCall */ +/** @name Call */ export interface Call extends GenericCall {} -/** Struct */ +/** @name ChangesTrieConfiguration */ export interface ChangesTrieConfiguration extends Struct { - /** u32 */ readonly digestInterval: u32; - /** u32 */ readonly digestLevels: u32; } -/** ITuple<[ConsensusEngineId, Bytes]> */ +/** @name Consensus */ export interface Consensus extends ITuple<[ConsensusEngineId, Bytes]> {} -/** GenericConsensusEngineId */ +/** @name ConsensusEngineId */ export interface ConsensusEngineId extends GenericConsensusEngineId {} -/** GenericDigest */ +/** @name Digest */ export interface Digest extends GenericDigest {} -/** GenericDigestItem */ +/** @name DigestItem */ export interface DigestItem extends GenericDigestItem {} -/** Enum */ +/** @name DispatchClass */ export interface DispatchClass extends Enum { - /** 0:: Normal */ readonly isNormal: boolean; - /** 1:: Operational */ readonly isOperational: boolean; } -/** Struct */ +/** @name DispatchInfo */ export interface DispatchInfo extends Struct { - /** Weight */ readonly weight: Weight; - /** DispatchClass */ readonly class: DispatchClass; - /** bool */ readonly paysFee: bool; } -/** Struct */ +/** @name DispatchInfoTo190 */ export interface DispatchInfoTo190 extends Struct { - /** Weight */ readonly weight: Weight; - /** DispatchClass */ readonly class: DispatchClass; } -/** Uint8Array, Codec */ +/** @name EcdsaSignature */ export interface EcdsaSignature extends Uint8Array, Codec {} -/** Signature */ +/** @name Ed25519Signature */ export interface Ed25519Signature extends Signature {} -/** GenericExtrinsic */ +/** @name Extrinsic */ export interface Extrinsic extends GenericExtrinsic {} -/** GenericExtrinsicEra */ +/** @name ExtrinsicEra */ export interface ExtrinsicEra extends GenericExtrinsicEra {} -/** GenericExtrinsicPayload */ +/** @name ExtrinsicPayload */ export interface ExtrinsicPayload extends GenericExtrinsicPayload {} -/** GenericExtrinsicPayloadUnknown */ +/** @name ExtrinsicPayloadUnknown */ export interface ExtrinsicPayloadUnknown extends GenericExtrinsicPayloadUnknown {} -/** GenericExtrinsicPayloadV1 */ +/** @name ExtrinsicPayloadV1 */ export interface ExtrinsicPayloadV1 extends GenericExtrinsicPayloadV1 {} -/** GenericExtrinsicPayloadV2 */ +/** @name ExtrinsicPayloadV2 */ export interface ExtrinsicPayloadV2 extends GenericExtrinsicPayloadV2 {} -/** GenericExtrinsicPayloadV3 */ +/** @name ExtrinsicPayloadV3 */ export interface ExtrinsicPayloadV3 extends GenericExtrinsicPayloadV3 {} -/** GenericExtrinsicPayloadV4 */ +/** @name ExtrinsicPayloadV4 */ export interface ExtrinsicPayloadV4 extends GenericExtrinsicPayloadV4 {} -/** GenericExtrinsicUnknown */ +/** @name ExtrinsicUnknown */ export interface ExtrinsicUnknown extends GenericExtrinsicUnknown {} -/** GenericExtrinsicV1 */ +/** @name ExtrinsicV1 */ export interface ExtrinsicV1 extends GenericExtrinsicV1 {} -/** GenericExtrinsicV2 */ +/** @name ExtrinsicV2 */ export interface ExtrinsicV2 extends GenericExtrinsicV2 {} -/** GenericExtrinsicV3 */ +/** @name ExtrinsicV3 */ export interface ExtrinsicV3 extends GenericExtrinsicV3 {} -/** GenericExtrinsicV4 */ +/** @name ExtrinsicV4 */ export interface ExtrinsicV4 extends GenericExtrinsicV4 {} -/** H256 */ +/** @name Hash */ export interface Hash extends H256 {} -/** Struct */ +/** @name Header */ export interface Header extends Struct { - /** Hash */ readonly parentHash: Hash; - /** Compact */ readonly number: Compact; - /** Hash */ readonly stateRoot: Hash; - /** Hash */ readonly extrinsicsRoot: Hash; - /** Digest */ readonly digest: Digest; } -/** GenericImmortalEra */ +/** @name ImmortalEra */ export interface ImmortalEra extends GenericImmortalEra {} -/** u32 */ +/** @name Index */ export interface Index extends u32 {} -/** Bytes */ +/** @name Justification */ export interface Justification extends Bytes {} -/** u32 */ +/** @name KeyTypeId */ export interface KeyTypeId extends u32 {} -/** ITuple<[StorageKey, StorageData]> */ +/** @name KeyValue */ export interface KeyValue extends ITuple<[StorageKey, StorageData]> {} -/** Uint8Array, Codec */ +/** @name LockIdentifier */ export interface LockIdentifier extends Uint8Array, Codec {} -/** u64 */ +/** @name Moment */ export interface Moment extends u64 {} -/** GenericMortalEra */ +/** @name MortalEra */ export interface MortalEra extends GenericMortalEra {} -/** Enum */ +/** @name MultiSignature */ export interface MultiSignature extends Enum { - /** 0:: Ed25519(Ed25519Signature) */ readonly isEd25519: boolean; - /** Ed25519Signature */ readonly asEd25519: Ed25519Signature; - /** 1:: Sr25519(Sr25519Signature) */ readonly isSr25519: boolean; - /** Sr25519Signature */ readonly asSr25519: Sr25519Signature; - /** 2:: Ecdsa(EcdsaSignature) */ readonly isEcdsa: boolean; - /** EcdsaSignature */ readonly asEcdsa: EcdsaSignature; } -/** GenericOrigin */ +/** @name Origin */ export interface Origin extends GenericOrigin {} -/** u32 */ +/** @name Perbill */ export interface Perbill extends u32 {} -/** u8 */ +/** @name Percent */ export interface Percent extends u8 {} -/** u32 */ +/** @name Permill */ export interface Permill extends u32 {} -/** u64 */ +/** @name Perquintill */ export interface Perquintill extends u64 {} -/** Null */ +/** @name Phantom */ export interface Phantom extends Null {} -/** Null */ +/** @name PhantomData */ export interface PhantomData extends Null {} -/** ITuple<[ConsensusEngineId, Bytes]> */ +/** @name PreRuntime */ export interface PreRuntime extends ITuple<[ConsensusEngineId, Bytes]> {} -/** ITuple<[ConsensusEngineId, Bytes]> */ +/** @name Seal */ export interface Seal extends ITuple<[ConsensusEngineId, Bytes]> {} -/** ITuple<[u64, Signature]> */ +/** @name SealV0 */ export interface SealV0 extends ITuple<[u64, Signature]> {} -/** H512 */ +/** @name Signature */ export interface Signature extends H512 {} -/** Struct */ +/** @name SignedBlock */ export interface SignedBlock extends Struct { - /** Block */ readonly block: Block; - /** Justification */ readonly justification: Justification; } -/** GenericSignerPayload */ +/** @name SignerPayload */ export interface SignerPayload extends GenericSignerPayload {} -/** Signature */ +/** @name Sr25519Signature */ export interface Sr25519Signature extends Signature {} -/** AccountId */ +/** @name ValidatorId */ export interface ValidatorId extends AccountId {} -/** u32 */ +/** @name Weight */ export interface Weight extends u32 {} -/** Fixed64 */ +/** @name WeightMultiplier */ export interface WeightMultiplier extends Fixed64 {} diff --git a/packages/types/src/interfaces/session/types.ts b/packages/types/src/interfaces/session/types.ts index b1abcd0fb4..2469155def 100644 --- a/packages/types/src/interfaces/session/types.ts +++ b/packages/types/src/interfaces/session/types.ts @@ -6,32 +6,32 @@ import { u32 } from '@polkadot/types/primitive'; import { AccountId, ValidatorId } from '@polkadot/types/interfaces/runtime'; import { Exposure } from '@polkadot/types/interfaces/staking'; -/** Exposure */ +/** @name FullIdentification */ export interface FullIdentification extends Exposure {} -/** ITuple<[ValidatorId, FullIdentification]> */ +/** @name IdentificationTuple */ export interface IdentificationTuple extends ITuple<[ValidatorId, FullIdentification]> {} -/** SessionKeys4 */ +/** @name Keys */ export interface Keys extends SessionKeys4 {} -/** u32 */ +/** @name SessionIndex */ export interface SessionIndex extends u32 {} -/** AccountId */ +/** @name SessionKeys1 */ export interface SessionKeys1 extends AccountId {} -/** ITuple<[AccountId, AccountId]> */ +/** @name SessionKeys2 */ export interface SessionKeys2 extends ITuple<[AccountId, AccountId]> {} -/** ITuple<[AccountId, AccountId, AccountId]> */ +/** @name SessionKeys3 */ export interface SessionKeys3 extends ITuple<[AccountId, AccountId, AccountId]> {} -/** ITuple<[AccountId, AccountId, AccountId, AccountId]> */ +/** @name SessionKeys4 */ export interface SessionKeys4 extends ITuple<[AccountId, AccountId, AccountId, AccountId]> {} -/** ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId]> */ +/** @name SessionKeys5 */ export interface SessionKeys5 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId]> {} -/** ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> */ +/** @name SessionKeys6 */ export interface SessionKeys6 extends ITuple<[AccountId, AccountId, AccountId, AccountId, AccountId, AccountId]> {} diff --git a/packages/types/src/interfaces/society/types.ts b/packages/types/src/interfaces/society/types.ts index 867658f5d3..fa2084bd27 100644 --- a/packages/types/src/interfaces/society/types.ts +++ b/packages/types/src/interfaces/society/types.ts @@ -6,58 +6,43 @@ import { Enum, Struct } from '@polkadot/types/codec'; import { u32 } from '@polkadot/types/primitive'; import { AccountId, Balance } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name Bid */ export interface Bid extends Struct { - /** AccountId */ readonly who: AccountId; - /** BidKind */ readonly kind: BidKind; - /** Balance */ readonly value: Balance; } -/** Enum */ +/** @name BidKind */ export interface BidKind extends Enum { - /** 0:: Deposit(Balance) */ readonly isDeposit: boolean; - /** Balance */ readonly asDeposit: Balance; - /** 1:: Vouch(BidKindVouch) */ readonly isVouch: boolean; - /** BidKindVouch */ readonly asVouch: BidKindVouch; } -/** ITuple<[AccountId, Balance]> */ +/** @name BidKindVouch */ export interface BidKindVouch extends ITuple<[AccountId, Balance]> {} -/** Enum */ +/** @name SocietyJudgement */ export interface SocietyJudgement extends Enum { - /** 0:: Rebid */ readonly isRebid: boolean; - /** 1:: Reject */ readonly isReject: boolean; - /** 2:: Approve */ readonly isApprove: boolean; } -/** Enum */ +/** @name SocietyVote */ export interface SocietyVote extends Enum { - /** 0:: Skeptic */ readonly isSkeptic: boolean; - /** 1:: Reject */ readonly isReject: boolean; - /** 2:: Approve */ readonly isApprove: boolean; } -/** u32 */ +/** @name StrikeCount */ export interface StrikeCount extends u32 {} -/** Enum */ +/** @name VouchingStatus */ export interface VouchingStatus extends Enum { - /** 0:: Vouching */ readonly isVouching: boolean; - /** 1:: Banned */ readonly isBanned: boolean; } diff --git a/packages/types/src/interfaces/staking/types.ts b/packages/types/src/interfaces/staking/types.ts index 3a226324ea..55af1bcebf 100644 --- a/packages/types/src/interfaces/staking/types.ts +++ b/packages/types/src/interfaces/staking/types.ts @@ -6,177 +6,131 @@ import { Compact, Enum, Struct, Vec } from '@polkadot/types/codec'; import { bool, u32 } from '@polkadot/types/primitive'; import { AccountId, Balance, BlockNumber, Moment, Perbill } from '@polkadot/types/interfaces/runtime'; -/** u32 */ +/** @name EraIndex */ export interface EraIndex extends u32 {} -/** Struct */ +/** @name EraPoints */ export interface EraPoints extends Struct { - /** Points */ readonly total: Points; - /** Vec */ readonly individual: Vec; } -/** Struct */ +/** @name EraRewards */ export interface EraRewards extends Struct { - /** u32 */ readonly total: u32; - /** Vec */ readonly rewards: Vec; } -/** Struct */ +/** @name Exposure */ export interface Exposure extends Struct { - /** Compact */ readonly total: Compact; - /** Compact */ readonly own: Compact; - /** Vec */ readonly others: Vec; } -/** Enum */ +/** @name Forcing */ export interface Forcing extends Enum { - /** 0:: NotForcing */ readonly isNotForcing: boolean; - /** 1:: ForceNew */ readonly isForceNew: boolean; - /** 2:: ForceNone */ readonly isForceNone: boolean; - /** 3:: ForceAlways */ readonly isForceAlways: boolean; } -/** Struct */ +/** @name IndividualExposure */ export interface IndividualExposure extends Struct { - /** AccountId */ readonly who: AccountId; - /** Compact */ readonly value: Compact; } -/** Moment */ +/** @name MomentOf */ export interface MomentOf extends Moment {} -/** Struct */ +/** @name Nominations */ export interface Nominations extends Struct { - /** Vec */ readonly targets: Vec; - /** EraIndex */ readonly submittedIn: EraIndex; - /** bool */ readonly suppressed: bool; } -/** u32 */ +/** @name Points */ export interface Points extends u32 {} -/** Enum */ +/** @name RewardDestination */ export interface RewardDestination extends Enum { - /** 0:: Staked */ readonly isStaked: boolean; - /** 1:: Stash */ readonly isStash: boolean; - /** 2:: Controller */ readonly isController: boolean; } -/** Struct */ +/** @name SlashingSpans */ export interface SlashingSpans extends Struct { - /** SpanIndex */ readonly spanIndex: SpanIndex; - /** EraIndex */ readonly lastStart: EraIndex; - /** EraIndex */ readonly lastNonzeroSlash: EraIndex; - /** Vec */ readonly prior: Vec; } -/** Struct */ +/** @name SlashingSpansTo204 */ export interface SlashingSpansTo204 extends Struct { - /** SpanIndex */ readonly spanIndex: SpanIndex; - /** EraIndex */ readonly lastStart: EraIndex; - /** Vec */ readonly prior: Vec; } -/** Struct */ +/** @name SlashJournalEntry */ export interface SlashJournalEntry extends Struct { - /** AccountId */ readonly who: AccountId; - /** Balance */ readonly amount: Balance; - /** Balance */ readonly ownSlash: Balance; } -/** u32 */ +/** @name SpanIndex */ export interface SpanIndex extends u32 {} -/** Struct */ +/** @name SpanRecord */ export interface SpanRecord extends Struct { - /** Balance */ readonly slashed: Balance; - /** Balance */ readonly paidOut: Balance; } -/** Struct */ +/** @name StakingLedger */ export interface StakingLedger extends Struct { - /** AccountId */ readonly stash: AccountId; - /** Compact */ readonly total: Compact; - /** Compact */ readonly active: Compact; - /** Vec */ readonly unlocking: Vec; } -/** Struct */ +/** @name UnappliedSlash */ export interface UnappliedSlash extends Struct { - /** AccountId */ readonly validator: AccountId; - /** Balance */ readonly own: Balance; - /** Vec */ readonly others: Vec; - /** Vec */ readonly reporters: Vec; - /** Balance */ readonly payout: Balance; } -/** ITuple<[AccountId, Balance]> */ +/** @name UnappliedSlashOther */ export interface UnappliedSlashOther extends ITuple<[AccountId, Balance]> {} -/** Struct */ +/** @name UnlockChunk */ export interface UnlockChunk extends Struct { - /** Compact */ readonly value: Compact; - /** Compact */ readonly era: Compact; } -/** Struct */ +/** @name ValidatorPrefs */ export interface ValidatorPrefs extends Struct { - /** Compact */ readonly commission: Compact; } -/** Struct */ +/** @name ValidatorPrefsTo145 */ export interface ValidatorPrefsTo145 extends Struct { - /** Compact */ readonly unstakeThreshold: Compact; - /** Compact */ readonly validatorPayment: Compact; } -/** Struct */ +/** @name ValidatorPrefsTo196 */ export interface ValidatorPrefsTo196 extends Struct { - /** Compact */ readonly validatorPayment: Compact; } diff --git a/packages/types/src/interfaces/system/types.ts b/packages/types/src/interfaces/system/types.ts index 4e41bd66a6..180c6a60f5 100644 --- a/packages/types/src/interfaces/system/types.ts +++ b/packages/types/src/interfaces/system/types.ts @@ -6,102 +6,77 @@ import { Enum, Option, Result, Struct, Vec } from '@polkadot/types/codec'; import { Bytes, GenericEvent, Text, u32, u8 } from '@polkadot/types/primitive'; import { Digest, Hash } from '@polkadot/types/interfaces/runtime'; -/** Digest */ +/** @name DigestOf */ export interface DigestOf extends Digest {} -/** Enum */ +/** @name DispatchError */ export interface DispatchError extends Enum { - /** 0:: Other */ readonly isOther: boolean; - /** 1:: CannotLookup */ readonly isCannotLookup: boolean; - /** 2:: BadOrigin */ readonly isBadOrigin: boolean; - /** 3:: Module(DispatchErrorModule) */ readonly isModule: boolean; - /** DispatchErrorModule */ readonly asModule: DispatchErrorModule; } -/** Struct */ +/** @name DispatchErrorModule */ export interface DispatchErrorModule extends Struct { - /** u8 */ readonly index: u8; - /** u8 */ readonly error: u8; } -/** Struct */ +/** @name DispatchErrorTo198 */ export interface DispatchErrorTo198 extends Struct { - /** Option */ readonly module: Option; - /** u8 */ readonly error: u8; } -/** Result, DispatchError> */ +/** @name DispatchResult */ export interface DispatchResult extends Result, DispatchError> { - /** Error:: (DispatchError) */ readonly isError: boolean; - /** DispatchError */ readonly asError: DispatchError; - /** Ok:: (()) */ readonly isOk: boolean; - /** ITuple<[]> */ readonly asOk: ITuple<[]>; } -/** DispatchResult */ +/** @name DispatchResultOf */ export interface DispatchResultOf extends DispatchResult {} -/** Result, Text> */ +/** @name DispatchResultTo198 */ export interface DispatchResultTo198 extends Result, Text> { - /** Error:: (Text) */ readonly isError: boolean; - /** Text */ readonly asError: Text; - /** Ok:: (()) */ readonly isOk: boolean; - /** ITuple<[]> */ readonly asOk: ITuple<[]>; } -/** GenericEvent */ +/** @name Event */ export interface Event extends GenericEvent {} -/** Uint8Array, Codec */ +/** @name EventId */ export interface EventId extends Uint8Array, Codec {} -/** u32 */ +/** @name EventIndex */ export interface EventIndex extends u32 {} -/** Struct */ +/** @name EventRecord */ export interface EventRecord extends Struct { - /** Phase */ readonly phase: Phase; - /** Event */ readonly event: Event; - /** Vec */ readonly topics: Vec; } -/** Struct */ +/** @name EventRecordTo76 */ export interface EventRecordTo76 extends Struct { - /** Phase */ readonly phase: Phase; - /** Event */ readonly event: Event; } -/** Bytes */ +/** @name Key */ export interface Key extends Bytes {} -/** Enum */ +/** @name Phase */ export interface Phase extends Enum { - /** 0:: ApplyExtrinsic(u32) */ readonly isApplyExtrinsic: boolean; - /** u32 */ readonly asApplyExtrinsic: u32; - /** 1:: Finalization */ readonly isFinalization: boolean; } diff --git a/packages/types/src/interfaces/treasury/types.ts b/packages/types/src/interfaces/treasury/types.ts index c52fb95779..da6eba805f 100644 --- a/packages/types/src/interfaces/treasury/types.ts +++ b/packages/types/src/interfaces/treasury/types.ts @@ -5,34 +5,25 @@ import { ITuple } from '@polkadot/types/types'; import { Option, Struct, Vec } from '@polkadot/types/codec'; import { AccountId, Balance, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name OpenTip */ export interface OpenTip extends Struct { - /** Hash */ readonly reason: Hash; - /** AccountId */ readonly who: AccountId; - /** Option */ readonly finder: Option; - /** Option */ readonly closes: Option; - /** Vec */ readonly tips: Vec; } -/** ITuple<[AccountId, Balance]> */ +/** @name OpenTipFinder */ export interface OpenTipFinder extends ITuple<[AccountId, Balance]> {} -/** ITuple<[AccountId, Balance]> */ +/** @name OpenTipTip */ export interface OpenTipTip extends ITuple<[AccountId, Balance]> {} -/** Struct */ +/** @name TreasuryProposal */ export interface TreasuryProposal extends Struct { - /** AccountId */ readonly proposer: AccountId; - /** Balance */ readonly value: Balance; - /** AccountId */ readonly beneficiary: AccountId; - /** Balance */ readonly bond: Balance; } diff --git a/packages/types/src/interfaces/txpayment/types.ts b/packages/types/src/interfaces/txpayment/types.ts index 425da10fd1..257d8e0418 100644 --- a/packages/types/src/interfaces/txpayment/types.ts +++ b/packages/types/src/interfaces/txpayment/types.ts @@ -3,5 +3,5 @@ import { Fixed64 } from '@polkadot/types/primitive'; -/** Fixed64 */ +/** @name Multiplier */ export interface Multiplier extends Fixed64 {} diff --git a/packages/types/src/interfaces/utility/types.ts b/packages/types/src/interfaces/utility/types.ts index 290ea54091..585f0f5ed4 100644 --- a/packages/types/src/interfaces/utility/types.ts +++ b/packages/types/src/interfaces/utility/types.ts @@ -5,22 +5,16 @@ import { Struct, Vec } from '@polkadot/types/codec'; import { u32 } from '@polkadot/types/primitive'; import { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces/runtime'; -/** Struct */ +/** @name Multisig */ export interface Multisig extends Struct { - /** Timepoint */ readonly when: Timepoint; - /** Balance */ readonly deposit: Balance; - /** AccountId */ readonly depositor: AccountId; - /** Vec */ readonly approvals: Vec; } -/** Struct */ +/** @name Timepoint */ export interface Timepoint extends Struct { - /** BlockNumber */ readonly height: BlockNumber; - /** u32 */ readonly index: u32; } diff --git a/packages/types/src/scripts/generateTypes/tsDef.ts b/packages/types/src/scripts/generateTypes/tsDef.ts index fc088dc036..62956d9602 100644 --- a/packages/types/src/scripts/generateTypes/tsDef.ts +++ b/packages/types/src/scripts/generateTypes/tsDef.ts @@ -18,10 +18,10 @@ interface Imports extends TypeImports { // helper to generate a `readonly : ;` getter /** @internal */ -export function createGetter (definitions: object, name = '', type: string, imports: TypeImports, doc?: string): string { +export function createGetter (definitions: object, name = '', type: string, imports: TypeImports): string { setImports(definitions, imports, [type]); - return ` /** ${doc || type} */\n readonly ${name}: ${type};\n`; + return ` readonly ${name}: ${type};\n`; } /** @internal */ @@ -46,12 +46,12 @@ const tsTuple = tsExport; function tsEnum (definitions: object, { name: enumName, sub }: TypeDef, imports: TypeImports): string { setImports(definitions, imports, ['Enum']); - const keys = (sub as TypeDef[]).map(({ info, name = '', type }, index): string => { + const keys = (sub as TypeDef[]).map(({ info, name = '', type }): string => { const getter = stringUpperFirst(stringCamelCase(name.replace(' ', '_'))); - const [enumType, asGetter] = type === 'Null' - ? ['', ''] - : [`(${type})`, createGetter(definitions, `as${getter}`, type, imports)]; - const isGetter = createGetter(definitions, `is${getter}`, 'boolean', imports, `${index}:: ${name}${enumType}`); + const asGetter = type === 'Null' + ? '' + : createGetter(definitions, `as${getter}`, type, imports); + const isGetter = createGetter(definitions, `is${getter}`, 'boolean', imports); switch (info) { case TypeDefInfo.Plain: @@ -68,11 +68,11 @@ function tsEnum (definitions: object, { name: enumName, sub }: TypeDef, imports: /** @internal */ function tsResultGetter (definitions: object, resultName = '', getter: 'Ok' | 'Error', def: TypeDef, imports: TypeImports): string { - const { info, name = '', type } = def; - const [resultType, asGetter] = type === 'Null' - ? ['', ''] - : [`(${type})`, createGetter(definitions, `as${getter}`, info === TypeDefInfo.Tuple ? formatType(definitions, def, imports) : type, imports)]; - const isGetter = createGetter(definitions, `is${getter}`, 'boolean', imports, `${getter}:: ${name}${resultType}`); + const { info, type } = def; + const asGetter = type === 'Null' + ? '' + : createGetter(definitions, `as${getter}`, info === TypeDefInfo.Tuple ? formatType(definitions, def, imports) : type, imports); + const isGetter = createGetter(definitions, `is${getter}`, 'boolean', imports); switch (info) { case TypeDefInfo.Plain: diff --git a/packages/types/src/scripts/util/formatting.ts b/packages/types/src/scripts/util/formatting.ts index 443888fbb0..6a87c640a7 100644 --- a/packages/types/src/scripts/util/formatting.ts +++ b/packages/types/src/scripts/util/formatting.ts @@ -26,7 +26,10 @@ export function createImportCode (header: string, checks: { file: string; types: // helper to generate a `export interface extends {} /** @internal */ export function exportInterface (name = '', base: string, body = ''): string { - return `/** ${base} */\nexport interface ${name} extends ${base} {${body.length ? '\n' : ''}${body}}`; + // * @description extends [[${base}]] + const doc = `/** @name ${name} */\n`; + + return `${doc}export interface ${name} extends ${base} {${body.length ? '\n' : ''}${body}}`; } // helper to create an `export type = `