Skip to main content

Parameters

object

Response

string
Public key of the current slot leader (base-58 encoded)

Code Examples

Basic Request

Request with Commitment

Using web3.js

Notes

  1. Returns the public key of the current slot leader
  2. The slot leader is responsible for producing the next block
  3. Different commitment levels can be specified
  4. The response is immediate as it reads from the current state
  5. The slot leader changes based on the network’s leader schedule

Best Practices

  1. Cache the slot leader when appropriate
  2. Consider using websocket subscription for real-time updates
  3. Handle network errors and retry when appropriate
  4. Use appropriate commitment level based on your needs
  5. Monitor slot leader changes for network analysis

Common Errors

Use Cases

  1. Slot Leader Monitoring
  2. Slot Leader Analysis
  3. Slot Leader Tracking