Session pallet
Derived from live runtime metadata on TRN root (pallet index 11, captured 2026-05-02). For prose-style documentation see Session on the curated reference side.
- Pallet index
11- Calls
- 2
- Events
- 1
- Errors
- 5
- Storage items
- 7
- Constants
- 0
Calls (extrinsics)
Session.set_keys
See [
Pallet::set_keys].
api.tx.session.set_keys(keys: {"babe":"SpConsensusBabeAppPublic","imOnline":"PalletImOnlineSr25519AppSr25519Public","grandpa":"SpConsensusGrandpaAppPublic","ethy":"SeedPrimitivesEthyCryptoAppCryptoPublic"}, proof: Bytes)| Argument | Type | Doc |
|---|---|---|
keys | {"babe":"SpConsensusBabeAppPublic","imOnline":"PalletImOnlineSr25519AppSr25519Public","grandpa":"SpConsensusGrandpaAppPublic","ethy":"SeedPrimitivesEthyCryptoAppCryptoPublic"} | T::Keys |
proof | Bytes | Vec<u8> |
Call index: 0
Session.purge_keys
See [
Pallet::purge_keys].
api.tx.session.purge_keys()Call index: 1
Events
Session.NewSession
New session has happened. Note that the argument is the session index, not the block number as the type might suggest.
| Field | Type | Doc |
|---|---|---|
session_index | u32 |
Errors
Session.InvalidProof
Invalid ownership proof.
Session.NoAssociatedValidatorId
No associated validator ID for account.
Session.DuplicatedKey
Registered duplicate key.
Session.NoKeys
No keys are associated with this account.
Session.NoAccount
Key setting account is not live, so it's impossible to associate keys.
Storage
Session.Validators
The current set of validators.
await api.query.session.validators()Returns: Vec<SeedPrimitivesSignatureAccountId20>
Modifier: Default
Session.CurrentIndex
Current index of the session.
await api.query.session.currentIndex()Returns: u32
Modifier: Default
Session.QueuedChanged
True if the underlying economic identities or weighting behind the validators has changed in the queued validator set.
await api.query.session.queuedChanged()Returns: bool
Modifier: Default
Session.QueuedKeys
The queued keys for the next session. When the next session begins, these keys will be used to determine the validator's session keys.
await api.query.session.queuedKeys()Returns: Vec<(SeedPrimitivesSignatureAccountId20,SeedRuntimeSessionKeys)>
Modifier: Default
Session.DisabledValidators
Indices of disabled validators. The vec is always kept sorted so that we can find whether a given validator is disabled using binary search. It gets cleared when
on_session_endingreturns a new set of identities.
await api.query.session.disabledValidators()Returns: Vec<u32>
Modifier: Default
Session.NextKeys
The next session keys for a validator.
await api.query.session.nextKeys(key1)- Key:
[u8;20](hasher: Twox64Concat) - Returns:
{"babe":"SpConsensusBabeAppPublic","imOnline":"PalletImOnlineSr25519AppSr25519Public","grandpa":"SpConsensusGrandpaAppPublic","ethy":"SeedPrimitivesEthyCryptoAppCryptoPublic"}
Modifier: Optional
Session.KeyOwner
The owner of a key. The key is the
KeyTypeId+ the encoded key.
await api.query.session.keyOwner(key1)- Key:
(SpCoreCryptoKeyTypeId,Bytes)(hasher: Twox64Concat) - Returns:
[u8;20]
Modifier: Optional
wss://root.rootnet.live/archive/ws · captured 2026-05-02