Update with new Babe digests (#2309)
* Update with new Babe digests * Naming cleanups
This commit is contained in:
@@ -7,7 +7,7 @@ import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/t
|
||||
import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, 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 { AccountData, BalanceLock, BalanceLockTo212, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
@@ -341,9 +341,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
RawBabePreDigestPrimary: RawBabePreDigestPrimary;
|
||||
'Option<RawBabePreDigestPrimary>': Option<RawBabePreDigestPrimary>;
|
||||
'Vec<RawBabePreDigestPrimary>': Vec<RawBabePreDigestPrimary>;
|
||||
RawBabePreDigestSecondary: RawBabePreDigestSecondary;
|
||||
'Option<RawBabePreDigestSecondary>': Option<RawBabePreDigestSecondary>;
|
||||
'Vec<RawBabePreDigestSecondary>': Vec<RawBabePreDigestSecondary>;
|
||||
RawBabePreDigestSecondaryPlain: RawBabePreDigestSecondaryPlain;
|
||||
'Option<RawBabePreDigestSecondaryPlain>': Option<RawBabePreDigestSecondaryPlain>;
|
||||
'Vec<RawBabePreDigestSecondaryPlain>': Vec<RawBabePreDigestSecondaryPlain>;
|
||||
RawBabePreDigestSecondaryVRF: RawBabePreDigestSecondaryVRF;
|
||||
'Option<RawBabePreDigestSecondaryVRF>': Option<RawBabePreDigestSecondaryVRF>;
|
||||
'Vec<RawBabePreDigestSecondaryVRF>': Vec<RawBabePreDigestSecondaryVRF>;
|
||||
RawBabePreDigestTo159: RawBabePreDigestTo159;
|
||||
'Option<RawBabePreDigestTo159>': Option<RawBabePreDigestTo159>;
|
||||
'Vec<RawBabePreDigestTo159>': Vec<RawBabePreDigestTo159>;
|
||||
@@ -363,6 +366,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
VrfData: VrfData;
|
||||
'Option<VrfData>': Option<VrfData>;
|
||||
'Vec<VrfData>': Vec<VrfData>;
|
||||
VrfOutput: VrfOutput;
|
||||
'Option<VrfOutput>': Option<VrfOutput>;
|
||||
'Vec<VrfOutput>': Vec<VrfOutput>;
|
||||
VrfProof: VrfProof;
|
||||
'Option<VrfProof>': Option<VrfProof>;
|
||||
'Vec<VrfProof>': Vec<VrfProof>;
|
||||
|
||||
@@ -44,19 +44,26 @@ export default {
|
||||
_enum: {
|
||||
Phantom: 'Null', // index starts at 1... empty slot at 0
|
||||
Primary: 'RawBabePreDigestPrimary',
|
||||
Secondary: 'RawBabePreDigestSecondary'
|
||||
SecondaryPlain: 'RawBabePreDigestSecondaryPlain',
|
||||
SecondaryVRF: 'RawBabePreDigestSecondaryVRF'
|
||||
}
|
||||
},
|
||||
RawBabePreDigestPrimary: {
|
||||
authorityIndex: 'u32', // AuthorityIndex (also in aura)
|
||||
slotNumber: 'SlotNumber',
|
||||
vrfOutput: 'VrfData',
|
||||
vrfOutput: 'VrfOutput',
|
||||
vrfProof: 'VrfProof'
|
||||
},
|
||||
RawBabePreDigestSecondary: {
|
||||
RawBabePreDigestSecondaryPlain: {
|
||||
authorityIndex: 'u32', // AuthorityIndex (also in aura)
|
||||
slotNumber: 'SlotNumber'
|
||||
},
|
||||
RawBabePreDigestSecondaryVRF: {
|
||||
authorityIndex: 'u32',
|
||||
slotNumber: 'SlotNumber',
|
||||
vrfOutput: 'VrfOutput',
|
||||
vrfProof: 'VrfProof'
|
||||
},
|
||||
RawBabePreDigestTo159: {
|
||||
_enum: {
|
||||
Primary: 'RawBabePreDigestPrimaryTo159',
|
||||
@@ -67,7 +74,7 @@ export default {
|
||||
authorityIndex: 'u32',
|
||||
slotNumber: 'SlotNumber',
|
||||
weight: 'BabeBlockWeight',
|
||||
vrfOutput: 'VrfData',
|
||||
vrfOutput: 'VrfOutput',
|
||||
vrfProof: 'VrfProof'
|
||||
},
|
||||
RawBabePreDigestSecondaryTo159: {
|
||||
@@ -83,11 +90,13 @@ export default {
|
||||
_enum: {
|
||||
Zero: 'u32',
|
||||
One: 'u32',
|
||||
Two: 'u32'
|
||||
Two: 'u32',
|
||||
Three: 'u32'
|
||||
}
|
||||
},
|
||||
SlotNumber: 'u64',
|
||||
VrfData: '[u8; 32]',
|
||||
VrfOutput: '[u8; 32]',
|
||||
VrfProof: '[u8; 64]'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -55,8 +55,10 @@ export interface RawBabePreDigest extends Enum {
|
||||
readonly isPhantom: boolean;
|
||||
readonly isPrimary: boolean;
|
||||
readonly asPrimary: RawBabePreDigestPrimary;
|
||||
readonly isSecondary: boolean;
|
||||
readonly asSecondary: RawBabePreDigestSecondary;
|
||||
readonly isSecondaryPlain: boolean;
|
||||
readonly asSecondaryPlain: RawBabePreDigestSecondaryPlain;
|
||||
readonly isSecondaryVrf: boolean;
|
||||
readonly asSecondaryVrf: RawBabePreDigestSecondaryVRF;
|
||||
}
|
||||
|
||||
/** @name RawBabePreDigestCompat */
|
||||
@@ -67,13 +69,15 @@ export interface RawBabePreDigestCompat extends Enum {
|
||||
readonly asOne: u32;
|
||||
readonly isTwo: boolean;
|
||||
readonly asTwo: u32;
|
||||
readonly isThree: boolean;
|
||||
readonly asThree: u32;
|
||||
}
|
||||
|
||||
/** @name RawBabePreDigestPrimary */
|
||||
export interface RawBabePreDigestPrimary extends Struct {
|
||||
readonly authorityIndex: u32;
|
||||
readonly slotNumber: SlotNumber;
|
||||
readonly vrfOutput: VrfData;
|
||||
readonly vrfOutput: VrfOutput;
|
||||
readonly vrfProof: VrfProof;
|
||||
}
|
||||
|
||||
@@ -82,12 +86,12 @@ export interface RawBabePreDigestPrimaryTo159 extends Struct {
|
||||
readonly authorityIndex: u32;
|
||||
readonly slotNumber: SlotNumber;
|
||||
readonly weight: BabeBlockWeight;
|
||||
readonly vrfOutput: VrfData;
|
||||
readonly vrfOutput: VrfOutput;
|
||||
readonly vrfProof: VrfProof;
|
||||
}
|
||||
|
||||
/** @name RawBabePreDigestSecondary */
|
||||
export interface RawBabePreDigestSecondary extends Struct {
|
||||
/** @name RawBabePreDigestSecondaryPlain */
|
||||
export interface RawBabePreDigestSecondaryPlain extends Struct {
|
||||
readonly authorityIndex: u32;
|
||||
readonly slotNumber: SlotNumber;
|
||||
}
|
||||
@@ -99,6 +103,14 @@ export interface RawBabePreDigestSecondaryTo159 extends Struct {
|
||||
readonly weight: BabeBlockWeight;
|
||||
}
|
||||
|
||||
/** @name RawBabePreDigestSecondaryVRF */
|
||||
export interface RawBabePreDigestSecondaryVRF extends Struct {
|
||||
readonly authorityIndex: u32;
|
||||
readonly slotNumber: SlotNumber;
|
||||
readonly vrfOutput: VrfOutput;
|
||||
readonly vrfProof: VrfProof;
|
||||
}
|
||||
|
||||
/** @name RawBabePreDigestTo159 */
|
||||
export interface RawBabePreDigestTo159 extends Enum {
|
||||
readonly isPrimary: boolean;
|
||||
@@ -113,6 +125,9 @@ export interface SlotNumber extends u64 {}
|
||||
/** @name VrfData */
|
||||
export interface VrfData extends U8aFixed {}
|
||||
|
||||
/** @name VrfOutput */
|
||||
export interface VrfOutput extends U8aFixed {}
|
||||
|
||||
/** @name VrfProof */
|
||||
export interface VrfProof extends U8aFixed {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user