Adjust session Keys for Babe (#1209)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Compact, Option, Vec } from './codec';
|
||||
import { Bytes, Data, Fixed64, H160, H256, H512, Moment, Null, StorageHasher, StorageKey, Text, Type, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from './primitive';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, Balance, BalanceOf, Block, BlockNumber, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Method, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, SessionKeys, Signature, SignedBlock, Sr25519Signature, StorageData, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, Balance, BalanceOf, Block, BlockNumber, Consensus, ConsensusEngineId, Digest, DigestItem, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Method, MortalEra, Origin, Perbill, Permill, Phantom, PreRuntime, Seal, SealV0, Signature, SignedBlock, Sr25519Signature, StorageData, ValidatorId, Weight, WeightMultiplier } from './interfaces/runtime';
|
||||
import { AuthorityId } from './interfaces/consensus';
|
||||
import { Keys, SessionIndex } from './interfaces/session';
|
||||
import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, StoredPendingChange, StoredState } from './interfaces/grandpa';
|
||||
@@ -200,9 +200,6 @@ export interface InterfaceRegistry {
|
||||
Phantom: Phantom;
|
||||
'Option<Phantom>': Option<Phantom>;
|
||||
'Vec<Phantom>': Vec<Phantom>;
|
||||
SessionKeys: SessionKeys;
|
||||
'Option<SessionKeys>': Option<SessionKeys>;
|
||||
'Vec<SessionKeys>': Vec<SessionKeys>;
|
||||
StorageData: StorageData;
|
||||
'Option<StorageData>': Option<StorageData>;
|
||||
'Vec<StorageData>': Vec<StorageData>;
|
||||
|
||||
@@ -48,9 +48,6 @@ export default {
|
||||
Perbill: 'u32',
|
||||
Permill: 'u32',
|
||||
Phantom: 'Null',
|
||||
SessionKeys: {
|
||||
ed25519: 'AccountId'
|
||||
},
|
||||
StorageData: 'Bytes',
|
||||
KeyValue: '(StorageKey, StorageData)',
|
||||
ValidatorId: 'AccountId',
|
||||
|
||||
@@ -114,12 +114,6 @@ export type Seal = [ConsensusEngineId, Bytes] & Codec;
|
||||
/** [u64, Signature] & Codec */
|
||||
export type SealV0 = [u64, Signature] & Codec;
|
||||
|
||||
/** Struct */
|
||||
export interface SessionKeys extends Struct {
|
||||
/** AccountId */
|
||||
readonly ed25519: AccountId;
|
||||
}
|
||||
|
||||
/** H512 */
|
||||
export type Signature = H512;
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
export default {
|
||||
types: {
|
||||
SessionIndex: 'u32',
|
||||
Keys: 'SessionKeys'
|
||||
// node/runtime/src/lib.rs, impl_opaque_keys
|
||||
Keys: {
|
||||
ed25519: 'AccountId', // Grandpa, aka GrandpaId
|
||||
sr25519: 'AccountId' // Babe, aka BabeId
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
// Auto-generated via `yarn build:interfaces`, do not edit
|
||||
|
||||
import { Struct } from '../../codec';
|
||||
import { u32 } from '../../primitive';
|
||||
import { SessionKeys } from '../runtime';
|
||||
import { AccountId } from '../runtime';
|
||||
|
||||
/** SessionKeys */
|
||||
export type Keys = SessionKeys;
|
||||
/** Struct */
|
||||
export interface Keys extends Struct {
|
||||
/** AccountId */
|
||||
readonly ed25519: AccountId;
|
||||
/** AccountId */
|
||||
readonly sr25519: AccountId;
|
||||
}
|
||||
|
||||
/** u32 */
|
||||
export type SessionIndex = u32;
|
||||
|
||||
Reference in New Issue
Block a user