Learn getSlotLeader use cases, code examples, request parameters, response structure, and tips.
getSlotLeader
RPC method returns the public key of the validator that is the current leader for block production, based on the node’s view at a specified commitment level. The leader is responsible for producing blocks for the current slot.
options
(object
, optional): An optional configuration object with the following fields:
commitment
(string
, optional): Specifies the commitment level for the query. Supported values are finalized
, confirmed
, or processed
. If omitted, the default commitment of the RPC node is used (usually finalized
). The slot leader is determined based on the slot that matches this commitment level.minContextSlot
(number
, optional): The minimum slot that the request can be evaluated at. This sets the minimum slot for the node’s context.result
field of the JSON-RPC response is a single base-58 encoded string representing the public key (identity) of the current slot leader.
Example Response:
finalized
).
confirmed
Commitmentconfirmed
commitment.
processed
will give you the leader of the very latest slot the node is aware of, which might change rapidly and may not yet be confirmed by the broader network.getLeaderSchedule
.getSlotLeader
provides a quick way to identify the validator currently responsible for producing blocks. For a broader view of the leader rotation, consider getLeaderSchedule
.