I want to use web3's ecRecover functionality and nothing else. Unless I misunderstand its requirements - a signature, the signed data, some cryptomagic and poof you have recovered the signer - why do I need to have a provider for it? What I'm trying to say is that this functionality could be implemented without relying on the RPC connection. So is there a way to do ecRecover in Node.js or even vanilla javascript sans web3?

1 Answer 1


You shouldn't need a provider. If web3.js won't let you use ecrecover without one for some reason or you prefer something more lightweight, take a look at ethereumjs-util:


See the answer to this question for an example: Getting an address from ethereumjs-utils ecrecover

  • Awesome! But I only have the signature hex. Is there a way I can figure out the v, r, s arguments?
    – ygh
    Commented Aug 9, 2018 at 13:25
  • Spoke too soon. Got it. Appreciate your help.
    – ygh
    Commented Aug 9, 2018 at 13:35

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.