author_rotateKeys
Description#
Generates new session keys on the node and returns the public keys. This RPC is restricted to collators running in validator mode.
Parameters#
This method does not require parameters.
Response Example (public endpoint)#
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "RPC call is unsafe to be called externally"
}
}
Public infrastructure providers disable this method. Run a self-hosted collator with access control to use it.
Collator Usage (illustrative)#
curl http://localhost:9933 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"author_rotateKeys","params":[],"id":1}'
The response returns the SCALE-encoded new session keys, which must be submitted on-chain via the session.setKeys extrinsic.