Is there a simple way to find out if a given block is finalized in PoS Ethereum?
Currently, I'm calling the endpoint ../eth/v1/beacon/states/finalized/finality_checkpoints
of the Beacon Node and it delivers me the number of latest finalized Epoch.
After that, I'm using the returned Epoch number to get all blocks using an endpoint provided by beaconcha.in https://beaconcha.in/api/v1/epoch/<epoch-number>/blocks
which lists all the Blocks in that Epoch
And the last step I do is check if the number of my block is smaller than the lowest blocknumber in the Epoch.
I'm looking for a simpler way to get that information using a library or the Beacon Node or execution Node or some API providers like Etherscan, Infura, beaconcha.in, etc...
Thanks