const response = await fetch('http://srpc.solapi.pro/?api_key=<api-key>', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "1",
"method": "getBlockProduction",
"params": [
{}
]
}),
});
const data = await response.json();
{
"jsonrpc": "2.0",
"id": "text",
"result": {
"context": {
"slot": 9887
},
"value": {
"byIdentity": {
"85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr": [
9888,
9886
]
},
"range": {
"firstSlot": 0,
"lastSlot": 9887
}
}
}
}