Add types for Bridges (#3552)

* Add types for Bridges

* Bump deps
This commit is contained in:
Jaco
2021-05-20 15:17:42 +02:00
committed by GitHub
parent 32efe83136
commit 47235d01bf
11 changed files with 545 additions and 273 deletions
+2 -2
View File
@@ -25,10 +25,10 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.14.2",
"@babel/core": "^7.14.3",
"@babel/register": "^7.13.16",
"@babel/runtime": "^7.14.0",
"@polkadot/dev": "^0.62.14",
"@polkadot/dev": "^0.62.15",
"@polkadot/ts": "^0.3.66",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.23",
+2 -2
View File
@@ -26,7 +26,7 @@
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
"dependencies": {
"@babel/core": "^7.14.2",
"@babel/core": "^7.14.3",
"@babel/register": "^7.13.16",
"@babel/runtime": "^7.14.0",
"@polkadot/api": "4.10.2-3",
@@ -40,6 +40,6 @@
},
"devDependencies": {
"@types/websocket": "^1.0.2",
"@types/yargs": "^16.0.1"
"@types/yargs": "^16.0.2"
}
}
+51 -1
View File
@@ -10,6 +10,7 @@ import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
import type { BeefyCommitment, BeefyNextAuthoritySet, BeefyPayload, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { BridgedBlockHash, BridgedBlockNumber, BridgedHeader, InitializationData } from '@polkadot/types/interfaces/bridges';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
@@ -27,7 +28,7 @@ import type { EvmAccount, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason,
import type { AnySignature, EcdsaSignature, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
import type { AuthorityIndex, AuthorityList, AuthorityWeight, EncodedFinalityProofs, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaPrevote, JustificationNotification, KeyOwnerProof, NextAuthority, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement } from '@polkadot/types/interfaces/identity';
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
@@ -75,6 +76,7 @@ declare module '@polkadot/types/types/registry' {
'Compact<BalanceOf>': Compact<BalanceOf>;
'Compact<BlockNumber>': Compact<BlockNumber>;
'Compact<BountyIndex>': Compact<BountyIndex>;
'Compact<BridgedBlockNumber>': Compact<BridgedBlockNumber>;
'Compact<ClassId>': Compact<ClassId>;
'Compact<ContractDiscriminant>': Compact<ContractDiscriminant>;
'Compact<CoreIndex>': Compact<CoreIndex>;
@@ -205,6 +207,9 @@ declare module '@polkadot/types/types/registry' {
'Option<AuthorityId>': Option<AuthorityId>;
'Option<AuthorityIndex>': Option<AuthorityIndex>;
'Option<AuthorityList>': Option<AuthorityList>;
'Option<AuthoritySet>': Option<AuthoritySet>;
'Option<AuthoritySetChange>': Option<AuthoritySetChange>;
'Option<AuthoritySetChanges>': Option<AuthoritySetChanges>;
'Option<AuthoritySignature>': Option<AuthoritySignature>;
'Option<AuthorityWeight>': Option<AuthorityWeight>;
'Option<AvailabilityBitfield>': Option<AvailabilityBitfield>;
@@ -252,6 +257,9 @@ declare module '@polkadot/types/types/registry' {
'Option<BountyStatusActive>': Option<BountyStatusActive>;
'Option<BountyStatusCuratorProposed>': Option<BountyStatusCuratorProposed>;
'Option<BountyStatusPendingPayout>': Option<BountyStatusPendingPayout>;
'Option<BridgedBlockHash>': Option<BridgedBlockHash>;
'Option<BridgedBlockNumber>': Option<BridgedBlockNumber>;
'Option<BridgedHeader>': Option<BridgedHeader>;
'Option<BufferedSessionChange>': Option<BufferedSessionChange>;
'Option<Bytes>': Option<Bytes>;
'Option<Call>': Option<Call>;
@@ -331,6 +339,8 @@ declare module '@polkadot/types/types/registry' {
'Option<Data>': Option<Data>;
'Option<DeferredOffenceOf>': Option<DeferredOffenceOf>;
'Option<DefunctVoter>': Option<DefunctVoter>;
'Option<DelayKind>': Option<DelayKind>;
'Option<DelayKindBest>': Option<DelayKindBest>;
'Option<Delegations>': Option<Delegations>;
'Option<DeletedContract>': Option<DeletedContract>;
'Option<DepositBalance>': Option<DepositBalance>;
@@ -461,6 +471,8 @@ declare module '@polkadot/types/types/registry' {
'Option<FixedU128>': Option<FixedU128>;
'Option<FixedU64>': Option<FixedU64>;
'Option<Forcing>': Option<Forcing>;
'Option<ForkTreePendingChange>': Option<ForkTreePendingChange>;
'Option<ForkTreePendingChangeNode>': Option<ForkTreePendingChangeNode>;
'Option<FullIdentification>': Option<FullIdentification>;
'Option<FunctionArgumentMetadataLatest>': Option<FunctionArgumentMetadataLatest>;
'Option<FunctionArgumentMetadataV10>': Option<FunctionArgumentMetadataV10>;
@@ -480,10 +492,14 @@ declare module '@polkadot/types/types/registry' {
'Option<GiltBid>': Option<GiltBid>;
'Option<GlobalValidationData>': Option<GlobalValidationData>;
'Option<GlobalValidationSchedule>': Option<GlobalValidationSchedule>;
'Option<GrandpaCommit>': Option<GrandpaCommit>;
'Option<GrandpaEquivocation>': Option<GrandpaEquivocation>;
'Option<GrandpaEquivocationProof>': Option<GrandpaEquivocationProof>;
'Option<GrandpaEquivocationValue>': Option<GrandpaEquivocationValue>;
'Option<GrandpaJustification>': Option<GrandpaJustification>;
'Option<GrandpaPrecommit>': Option<GrandpaPrecommit>;
'Option<GrandpaPrevote>': Option<GrandpaPrevote>;
'Option<GrandpaSignedPrecommit>': Option<GrandpaSignedPrecommit>;
'Option<GroupIndex>': Option<GroupIndex>;
'Option<H1024>': Option<H1024>;
'Option<H128>': Option<H128>;
@@ -538,6 +554,7 @@ declare module '@polkadot/types/types/registry' {
'Option<Index>': Option<Index>;
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
'Option<IndividualExposure>': Option<IndividualExposure>;
'Option<InitializationData>': Option<InitializationData>;
'Option<InstanceDetails>': Option<InstanceDetails>;
'Option<InstanceId>': Option<InstanceId>;
'Option<InstanceMetadata>': Option<InstanceMetadata>;
@@ -684,6 +701,7 @@ declare module '@polkadot/types/types/registry' {
'Option<PeerEndpointAddr>': Option<PeerEndpointAddr>;
'Option<PeerInfo>': Option<PeerInfo>;
'Option<PeerPing>': Option<PeerPing>;
'Option<PendingChange>': Option<PendingChange>;
'Option<PendingPause>': Option<PendingPause>;
'Option<PendingResume>': Option<PendingResume>;
'Option<Perbill>': Option<Perbill>;
@@ -1057,6 +1075,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<AuthorityId>': Vec<AuthorityId>;
'Vec<AuthorityIndex>': Vec<AuthorityIndex>;
'Vec<AuthorityList>': Vec<AuthorityList>;
'Vec<AuthoritySet>': Vec<AuthoritySet>;
'Vec<AuthoritySetChange>': Vec<AuthoritySetChange>;
'Vec<AuthoritySetChanges>': Vec<AuthoritySetChanges>;
'Vec<AuthoritySignature>': Vec<AuthoritySignature>;
'Vec<AuthorityWeight>': Vec<AuthorityWeight>;
'Vec<AvailabilityBitfield>': Vec<AvailabilityBitfield>;
@@ -1104,6 +1125,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<BountyStatusActive>': Vec<BountyStatusActive>;
'Vec<BountyStatusCuratorProposed>': Vec<BountyStatusCuratorProposed>;
'Vec<BountyStatusPendingPayout>': Vec<BountyStatusPendingPayout>;
'Vec<BridgedBlockHash>': Vec<BridgedBlockHash>;
'Vec<BridgedBlockNumber>': Vec<BridgedBlockNumber>;
'Vec<BridgedHeader>': Vec<BridgedHeader>;
'Vec<BufferedSessionChange>': Vec<BufferedSessionChange>;
'Vec<Bytes>': Vec<Bytes>;
'Vec<Call>': Vec<Call>;
@@ -1183,6 +1207,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<Data>': Vec<Data>;
'Vec<DeferredOffenceOf>': Vec<DeferredOffenceOf>;
'Vec<DefunctVoter>': Vec<DefunctVoter>;
'Vec<DelayKind>': Vec<DelayKind>;
'Vec<DelayKindBest>': Vec<DelayKindBest>;
'Vec<Delegations>': Vec<Delegations>;
'Vec<DeletedContract>': Vec<DeletedContract>;
'Vec<DepositBalance>': Vec<DepositBalance>;
@@ -1313,6 +1339,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<FixedU128>': Vec<FixedU128>;
'Vec<FixedU64>': Vec<FixedU64>;
'Vec<Forcing>': Vec<Forcing>;
'Vec<ForkTreePendingChange>': Vec<ForkTreePendingChange>;
'Vec<ForkTreePendingChangeNode>': Vec<ForkTreePendingChangeNode>;
'Vec<FullIdentification>': Vec<FullIdentification>;
'Vec<FunctionArgumentMetadataLatest>': Vec<FunctionArgumentMetadataLatest>;
'Vec<FunctionArgumentMetadataV10>': Vec<FunctionArgumentMetadataV10>;
@@ -1332,10 +1360,14 @@ declare module '@polkadot/types/types/registry' {
'Vec<GiltBid>': Vec<GiltBid>;
'Vec<GlobalValidationData>': Vec<GlobalValidationData>;
'Vec<GlobalValidationSchedule>': Vec<GlobalValidationSchedule>;
'Vec<GrandpaCommit>': Vec<GrandpaCommit>;
'Vec<GrandpaEquivocation>': Vec<GrandpaEquivocation>;
'Vec<GrandpaEquivocationProof>': Vec<GrandpaEquivocationProof>;
'Vec<GrandpaEquivocationValue>': Vec<GrandpaEquivocationValue>;
'Vec<GrandpaJustification>': Vec<GrandpaJustification>;
'Vec<GrandpaPrecommit>': Vec<GrandpaPrecommit>;
'Vec<GrandpaPrevote>': Vec<GrandpaPrevote>;
'Vec<GrandpaSignedPrecommit>': Vec<GrandpaSignedPrecommit>;
'Vec<GroupIndex>': Vec<GroupIndex>;
'Vec<H1024>': Vec<H1024>;
'Vec<H128>': Vec<H128>;
@@ -1390,6 +1422,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<Index>': Vec<Index>;
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
'Vec<IndividualExposure>': Vec<IndividualExposure>;
'Vec<InitializationData>': Vec<InitializationData>;
'Vec<InstanceDetails>': Vec<InstanceDetails>;
'Vec<InstanceId>': Vec<InstanceId>;
'Vec<InstanceMetadata>': Vec<InstanceMetadata>;
@@ -1536,6 +1569,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<PeerEndpointAddr>': Vec<PeerEndpointAddr>;
'Vec<PeerInfo>': Vec<PeerInfo>;
'Vec<PeerPing>': Vec<PeerPing>;
'Vec<PendingChange>': Vec<PendingChange>;
'Vec<PendingPause>': Vec<PendingPause>;
'Vec<PendingResume>': Vec<PendingResume>;
'Vec<Perbill>': Vec<Perbill>;
@@ -1909,6 +1943,9 @@ declare module '@polkadot/types/types/registry' {
AuthorityId: AuthorityId;
AuthorityIndex: AuthorityIndex;
AuthorityList: AuthorityList;
AuthoritySet: AuthoritySet;
AuthoritySetChange: AuthoritySetChange;
AuthoritySetChanges: AuthoritySetChanges;
AuthoritySignature: AuthoritySignature;
AuthorityWeight: AuthorityWeight;
AvailabilityBitfield: AvailabilityBitfield;
@@ -1956,6 +1993,9 @@ declare module '@polkadot/types/types/registry' {
BountyStatusActive: BountyStatusActive;
BountyStatusCuratorProposed: BountyStatusCuratorProposed;
BountyStatusPendingPayout: BountyStatusPendingPayout;
BridgedBlockHash: BridgedBlockHash;
BridgedBlockNumber: BridgedBlockNumber;
BridgedHeader: BridgedHeader;
BufferedSessionChange: BufferedSessionChange;
Bytes: Bytes;
Call: Call;
@@ -2035,6 +2075,8 @@ declare module '@polkadot/types/types/registry' {
Data: Data;
DeferredOffenceOf: DeferredOffenceOf;
DefunctVoter: DefunctVoter;
DelayKind: DelayKind;
DelayKindBest: DelayKindBest;
Delegations: Delegations;
DeletedContract: DeletedContract;
DepositBalance: DepositBalance;
@@ -2165,6 +2207,8 @@ declare module '@polkadot/types/types/registry' {
FixedU128: FixedU128;
FixedU64: FixedU64;
Forcing: Forcing;
ForkTreePendingChange: ForkTreePendingChange;
ForkTreePendingChangeNode: ForkTreePendingChangeNode;
FullIdentification: FullIdentification;
FunctionArgumentMetadataLatest: FunctionArgumentMetadataLatest;
FunctionArgumentMetadataV10: FunctionArgumentMetadataV10;
@@ -2184,10 +2228,14 @@ declare module '@polkadot/types/types/registry' {
GiltBid: GiltBid;
GlobalValidationData: GlobalValidationData;
GlobalValidationSchedule: GlobalValidationSchedule;
GrandpaCommit: GrandpaCommit;
GrandpaEquivocation: GrandpaEquivocation;
GrandpaEquivocationProof: GrandpaEquivocationProof;
GrandpaEquivocationValue: GrandpaEquivocationValue;
GrandpaJustification: GrandpaJustification;
GrandpaPrecommit: GrandpaPrecommit;
GrandpaPrevote: GrandpaPrevote;
GrandpaSignedPrecommit: GrandpaSignedPrecommit;
GroupIndex: GroupIndex;
H1024: H1024;
H128: H128;
@@ -2242,6 +2290,7 @@ declare module '@polkadot/types/types/registry' {
Index: Index;
IndicesLookupSource: IndicesLookupSource;
IndividualExposure: IndividualExposure;
InitializationData: InitializationData;
InstanceDetails: InstanceDetails;
InstanceId: InstanceId;
InstanceMetadata: InstanceMetadata;
@@ -2388,6 +2437,7 @@ declare module '@polkadot/types/types/registry' {
PeerEndpointAddr: PeerEndpointAddr;
PeerInfo: PeerInfo;
PeerPing: PeerPing;
PendingChange: PendingChange;
PendingPause: PendingPause;
PendingResume: PendingResume;
Perbill: Perbill;
@@ -0,0 +1,22 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
export default {
rpc: {},
types: {
BridgedBlockHash: 'H256',
BridgedBlockNumber: 'BlockNumber',
BridgedHeader: 'Header',
InitializationData: {
header: 'Header',
authorityList: 'AuthorityList',
setId: 'SetId',
isHalted: 'bool'
}
}
} as Definitions;
@@ -0,0 +1,4 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
@@ -0,0 +1,25 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, bool } from '@polkadot/types';
import type { AuthorityList, SetId } from '@polkadot/types/interfaces/grandpa';
import type { BlockNumber, H256, Header } from '@polkadot/types/interfaces/runtime';
/** @name BridgedBlockHash */
export interface BridgedBlockHash extends H256 {}
/** @name BridgedBlockNumber */
export interface BridgedBlockNumber extends BlockNumber {}
/** @name BridgedHeader */
export interface BridgedHeader extends Header {}
/** @name InitializationData */
export interface InitializationData extends Struct {
readonly header: Header;
readonly authorityList: AuthorityList;
readonly setId: SetId;
readonly isHalted: bool;
}
export type PHANTOM_BRIDGES = 'bridges';
@@ -44,6 +44,7 @@ export { default as vesting } from './vesting/definitions';
// polkadot-specific types
export { default as attestations } from './attestations/definitions';
export { default as bridges } from './bridges/definitions';
export { default as claims } from './claims/definitions';
export { default as crowdloan } from './crowdloan/definitions';
export { default as cumulus } from './cumulus/definitions';
@@ -46,7 +46,35 @@ export default {
types: {
AuthorityIndex: 'u64',
AuthorityList: 'Vec<NextAuthority>',
AuthoritySet: {
currentAuthorities: 'AuthorityList',
setId: 'u64',
pendingStandardChanges: 'ForkTreePendingChange',
pendingForcedChanges: 'Vec<PendingChange>',
authoritySetChanges: 'AuthoritySetChanges'
},
ForkTreePendingChange: {
roots: 'Vec<ForkTreePendingChangeNode>',
bestFinalizedNumber: 'Option<BlockNumber>'
},
ForkTreePendingChangeNode: {
hash: 'BlockHash',
number: 'BlockNumber',
data: 'PendingChange', // actual data, here PendingChange
children: 'Vec<ForkTreePendingChangeNode>'
},
AuthoritySetChange: '(U64, BlockNumber)',
AuthoritySetChanges: 'Vec<AuthoritySetChange>',
AuthorityWeight: 'u64',
DelayKind: {
_enum: {
Finalized: 'Null',
Best: 'DelayKindBest'
}
},
DelayKindBest: {
medianLastFinalized: 'BlockNumber'
},
EncodedFinalityProofs: 'Bytes',
GrandpaEquivocation: {
_enum: {
@@ -68,19 +96,41 @@ export default {
targetHash: 'Hash',
targetNumber: 'BlockNumber'
},
GrandpaCommit: {
targetHash: 'BlockHash',
targetNumber: 'BlockNumber',
precommits: 'Vec<GrandpaSignedPrecommit>'
},
GrandpaPrecommit: {
targetHash: 'BlockHash',
targetNumber: 'BlockNumber'
},
GrandpaSignedPrecommit: {
precommit: 'GrandpaPrecommit',
signature: 'AuthoritySignature',
id: 'AuthorityId'
},
GrandpaJustification: {
round: 'u64',
commit: 'GrandpaCommit',
votesAncestries: 'Vec<Header>'
},
JustificationNotification: 'Bytes',
KeyOwnerProof: 'MembershipProof',
NextAuthority: '(AuthorityId, AuthorityWeight)',
PendingChange: {
nextAuthorities: 'AuthorityList',
delay: 'BlockNumber',
canonHeight: 'BlockNumber',
canonHash: 'BlockHash',
delayKind: 'DelayKind'
},
PendingPause: {
/// Block at which the intention to pause was scheduled.
scheduledAt: 'BlockNumber',
/// Number of blocks after which the change will be enacted.
delay: 'BlockNumber'
},
PendingResume: {
/// Block at which the intention to resume was scheduled.
scheduledAt: 'BlockNumber',
/// Number of blocks after which the change will be enacted.
delay: 'BlockNumber'
},
Precommits: {
@@ -111,13 +161,9 @@ export default {
},
StoredState: {
_enum: {
/// The current authority set is live, and GRANDPA is enabled.
Live: 'Null',
/// There is a pending pause event which will be enacted at the given block height.
PendingPause: 'PendingPause',
/// The current GRANDPA authority set is paused.
Paused: 'Null',
/// There is a pending resume event which will be enacted at the given block height.
PendingResume: 'PendingResume'
}
}
+80 -2
View File
@@ -1,11 +1,12 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { BTreeSet, Bytes, Enum, Struct, Vec, u32, u64 } from '@polkadot/types';
import type { BTreeSet, Bytes, Enum, Option, Struct, U64, Vec, u32, u64 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { AuthoritySignature } from '@polkadot/types/interfaces/imOnline';
import type { BlockNumber, Hash } from '@polkadot/types/interfaces/runtime';
import type { BlockNumber, Hash, Header } from '@polkadot/types/interfaces/runtime';
import type { MembershipProof } from '@polkadot/types/interfaces/session';
/** @name AuthorityIndex */
@@ -14,12 +15,60 @@ export interface AuthorityIndex extends u64 {}
/** @name AuthorityList */
export interface AuthorityList extends Vec<NextAuthority> {}
/** @name AuthoritySet */
export interface AuthoritySet extends Struct {
readonly currentAuthorities: AuthorityList;
readonly setId: u64;
readonly pendingStandardChanges: ForkTreePendingChange;
readonly pendingForcedChanges: Vec<PendingChange>;
readonly authoritySetChanges: AuthoritySetChanges;
}
/** @name AuthoritySetChange */
export interface AuthoritySetChange extends ITuple<[U64, BlockNumber]> {}
/** @name AuthoritySetChanges */
export interface AuthoritySetChanges extends Vec<AuthoritySetChange> {}
/** @name AuthorityWeight */
export interface AuthorityWeight extends u64 {}
/** @name DelayKind */
export interface DelayKind extends Enum {
readonly isFinalized: boolean;
readonly isBest: boolean;
readonly asBest: DelayKindBest;
}
/** @name DelayKindBest */
export interface DelayKindBest extends Struct {
readonly medianLastFinalized: BlockNumber;
}
/** @name EncodedFinalityProofs */
export interface EncodedFinalityProofs extends Bytes {}
/** @name ForkTreePendingChange */
export interface ForkTreePendingChange extends Struct {
readonly roots: Vec<ForkTreePendingChangeNode>;
readonly bestFinalizedNumber: Option<BlockNumber>;
}
/** @name ForkTreePendingChangeNode */
export interface ForkTreePendingChangeNode extends Struct {
readonly hash: BlockHash;
readonly number: BlockNumber;
readonly data: PendingChange;
readonly children: Vec<ForkTreePendingChangeNode>;
}
/** @name GrandpaCommit */
export interface GrandpaCommit extends Struct {
readonly targetHash: BlockHash;
readonly targetNumber: BlockNumber;
readonly precommits: Vec<GrandpaSignedPrecommit>;
}
/** @name GrandpaEquivocation */
export interface GrandpaEquivocation extends Enum {
readonly isPrevote: boolean;
@@ -42,12 +91,32 @@ export interface GrandpaEquivocationValue extends Struct {
readonly second: ITuple<[GrandpaPrevote, AuthoritySignature]>;
}
/** @name GrandpaJustification */
export interface GrandpaJustification extends Struct {
readonly round: u64;
readonly commit: GrandpaCommit;
readonly votesAncestries: Vec<Header>;
}
/** @name GrandpaPrecommit */
export interface GrandpaPrecommit extends Struct {
readonly targetHash: BlockHash;
readonly targetNumber: BlockNumber;
}
/** @name GrandpaPrevote */
export interface GrandpaPrevote extends Struct {
readonly targetHash: Hash;
readonly targetNumber: BlockNumber;
}
/** @name GrandpaSignedPrecommit */
export interface GrandpaSignedPrecommit extends Struct {
readonly precommit: GrandpaPrecommit;
readonly signature: AuthoritySignature;
readonly id: AuthorityId;
}
/** @name JustificationNotification */
export interface JustificationNotification extends Bytes {}
@@ -57,6 +126,15 @@ export interface KeyOwnerProof extends MembershipProof {}
/** @name NextAuthority */
export interface NextAuthority extends ITuple<[AuthorityId, AuthorityWeight]> {}
/** @name PendingChange */
export interface PendingChange extends Struct {
readonly nextAuthorities: AuthorityList;
readonly delay: BlockNumber;
readonly canonHeight: BlockNumber;
readonly canonHash: BlockHash;
readonly delayKind: DelayKind;
}
/** @name PendingPause */
export interface PendingPause extends Struct {
readonly scheduledAt: BlockNumber;
+1
View File
@@ -39,6 +39,7 @@ export * from './uniques/types';
export * from './utility/types';
export * from './vesting/types';
export * from './attestations/types';
export * from './bridges/types';
export * from './claims/types';
export * from './crowdloan/types';
export * from './cumulus/types';
+303 -258
View File
File diff suppressed because it is too large Load Diff