There are api.query.session.nextKeys
and api.query.session.queuedKeys
for obtaining the next session keys for a validator (doc).
But how do I query the current the session keys used by an active validator?
There are api.query.session.nextKeys
and api.query.session.queuedKeys
for obtaining the next session keys for a validator (doc).
But how do I query the current the session keys used by an active validator?
You can query the AccountId's of the validators from the session pallet, and the AuthorityId's from their respective pallet's fn authorities()
(eg: Aura::authorities()
).
Then you can zip them up if you like.
The AccountIds and the keys are communicated to the pallets and stored in the pallets in order.