Rename SessionKeys fields (#1046)

* Rename SessionKeys fields

* Shorten
This commit is contained in:
Jaco Greeff
2019-06-21 16:49:20 +02:00
committed by GitHub
parent f30c516099
commit 3b8db2ed3d
2 changed files with 12 additions and 13 deletions
+11 -12
View File
@@ -3,7 +3,6 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import Struct from '../codec/Struct';
import AuthorityId from './AuthorityId';
import SessionKey from './SessionKey';
/**
@@ -14,22 +13,22 @@ import SessionKey from './SessionKey';
export default class SessionKeys extends Struct {
constructor (value?: any) {
super({
authorityId: AuthorityId,
sessionKey: SessionKey
grandpaKey: SessionKey,
auraKey: SessionKey
}, value);
}
/**
* @description The Grandpa Authority
*/
get authorityId (): AuthorityId {
return this.get('authorityId') as AuthorityId;
}
/**
* @description The Aura session
*/
get sessionKey (): SessionKey {
return this.get('sessionKey') as SessionKey;
get auraKey (): SessionKey {
return this.get('auraKey') as SessionKey;
}
/**
* @description The Grandpa Authority
*/
get grandpaKey (): SessionKey {
return this.get('grandpaKey') as SessionKey;
}
}