0

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?

ygh
  • 205
  • 1
  • 6

1 Answers1

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:

https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md

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

Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58