Add AuthorityList types (#1557)
This commit is contained in:
committed by
Jaco Greeff
parent
d405ed1005
commit
5b5d0a3fb8
@@ -15,7 +15,7 @@ import { Conviction, PropIndex, Proposal, ReferendumIndex, ReferendumInfo } from
|
||||
import { AccountInfo, Amount, AssetOf, InherentOfflineReport, LockPeriods, NewAccountOutcome, OpaqueKey, SessionKey } from '@polkadot/types/interfaces/deprecated';
|
||||
import { ApprovalFlag, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
|
||||
import { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
|
||||
import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import { AuthorityIndex, AuthorityList, AuthorityWeight, NextAuthority, PendingPause, PendingResume, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import { AuthIndex, AuthoritySignature, Heartbeat, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||
import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeysPolkadot, SessionKeysSubstrate } from '@polkadot/types/interfaces/session';
|
||||
@@ -498,6 +498,13 @@ export interface InterfaceRegistry {
|
||||
PermissionLatest: PermissionLatest;
|
||||
'Option<PermissionLatest>': Option<PermissionLatest>;
|
||||
'Vec<PermissionLatest>': Vec<PermissionLatest>;
|
||||
AuthorityIndex: AuthorityIndex;
|
||||
'Compact<AuthorityIndex>': Compact<AuthorityIndex>;
|
||||
'Option<AuthorityIndex>': Option<AuthorityIndex>;
|
||||
'Vec<AuthorityIndex>': Vec<AuthorityIndex>;
|
||||
AuthorityList: AuthorityList;
|
||||
'Option<AuthorityList>': Option<AuthorityList>;
|
||||
'Vec<AuthorityList>': Vec<AuthorityList>;
|
||||
AuthorityWeight: AuthorityWeight;
|
||||
'Compact<AuthorityWeight>': Compact<AuthorityWeight>;
|
||||
'Option<AuthorityWeight>': Option<AuthorityWeight>;
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
export default {
|
||||
types: {
|
||||
AuthorityIndex: 'u64',
|
||||
AuthorityList: 'Vec<NextAuthority>',
|
||||
AuthorityWeight: 'u64',
|
||||
NextAuthority: '(AuthorityId, u64)',
|
||||
NextAuthority: '(AuthorityId, AuthorityWeight)',
|
||||
PendingPause: {
|
||||
/// Block at which the intention to pause was scheduled.
|
||||
scheduledAt: 'BlockNumber',
|
||||
@@ -22,7 +24,7 @@ export default {
|
||||
StoredPendingChange: {
|
||||
scheduledAt: 'BlockNumber',
|
||||
delay: 'BlockNumber',
|
||||
nextAuthorities: 'Vec<NextAuthority>'
|
||||
nextAuthorities: 'AuthorityList'
|
||||
},
|
||||
StoredState: {
|
||||
_enum: {
|
||||
|
||||
@@ -7,11 +7,17 @@ import { u64 } from '@polkadot/types/primitive';
|
||||
import { BlockNumber } from '@polkadot/types/interfaces/runtime';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
|
||||
/** u64 */
|
||||
export interface AuthorityIndex extends u64 {}
|
||||
|
||||
/** Vec<NextAuthority> */
|
||||
export interface AuthorityList extends Vec<NextAuthority> {}
|
||||
|
||||
/** u64 */
|
||||
export interface AuthorityWeight extends u64 {}
|
||||
|
||||
/** ITuple<[AuthorityId, u64]> */
|
||||
export interface NextAuthority extends ITuple<[AuthorityId, u64]> {}
|
||||
/** ITuple<[AuthorityId, AuthorityWeight]> */
|
||||
export interface NextAuthority extends ITuple<[AuthorityId, AuthorityWeight]> {}
|
||||
|
||||
/** Struct */
|
||||
export interface PendingPause extends Struct {
|
||||
@@ -38,8 +44,8 @@ export interface StoredPendingChange extends Struct {
|
||||
readonly scheduledAt: BlockNumber;
|
||||
/** BlockNumber */
|
||||
readonly delay: BlockNumber;
|
||||
/** Vec<NextAuthority> */
|
||||
readonly nextAuthorities: Vec<NextAuthority>;
|
||||
/** AuthorityList */
|
||||
readonly nextAuthorities: AuthorityList;
|
||||
}
|
||||
|
||||
/** Enum */
|
||||
|
||||
Reference in New Issue
Block a user