Solana
Solana
Solana
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
getSlotLeader is a Solana JSON-RPC method that returns the identity of the validator currently leading — the node producing blocks for the present slot on the chain that secures SOL. The result is a single base-58 pubkey. Because the leader rotates every few slots, this is the point-in-time answer to "who is making blocks right now." Pass an optional config with commitment or minContextSlot, and send it as a JSON-RPC 2.0 POST with positional params to https://solana.therpc.io/YOUR_API_KEY.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | config | object | لا | Options: commitment, minContextSlot. |
| النوع | الوصف |
|---|---|
| string | The base-58 pubkey of the current slot leader. |
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |