The signer can be recovered by taking a block, constructoring the
headers and then using the Ecrecover
of the go-ethereum crypto
library.
First, we’ll download a block, extract the result using jq
and then
save the response in block.json
.
curl -s -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0", "id": 1, "method": "eth_getBlockByNumber", "params": ["0x31b7feb", true]}' https://polygon-rpc.com | jq '.result' | tee block.json