I am able to use ecRecover to verify the signer in Javascript, for example:
const ecRecoverAddr = await window.ethereum.request({
method: "personal_ecRecover",
params: [message, signedMessage],
});
However, when I try the following Python code:
from web3 import Web3, HTTPProvider
def verify(request, message, signedMessage):
response = web3.geth.personal.ecRecover(message, signature)
return HttpResponse(response, content_type='text/json')
I get this error:
name 'web3' is not defined
Does this mean that I need to instantiate some sort of provider for web3? What should be done?
Is there a way to retrieve the public key using ecRecover without the use of a provider?
Shouldn't it just be a method that can run without any connections?
Thanks!