2

I go through all functions in the API, but I didn't find how can I obtain a block slot number by block hash via Web3js.

1 Answer 1

2

There's no great way to do it unfortunately. The only possibility is to query the recent blockhashes sysvar account and see where yours falls on the list. It only maintains the last 150 blockhashes though.

Here's the sysvar in the explorer: https://explorer.solana.com/address/SysvarRecentB1ockHashes11111111111111111111/blockhashes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.