I'm using web3 v1.0 beta33 ethereum packages to do some signing and address recovery in a javascript/Angular5 app. I picked this version because I didn't see this function in 0.2x web3 versions' documentation. They only mention an "ecrecover" when referring to Solidity, which I'm not using, so I thought I had to be able to get to it from a v1.x web3 environment. I invoke the function with:web3.eth.personal.ecRecover. Compiling results in the error:....component.ts(77,38): error TS2339: Property 'ecRecover' does not exist on type 'Personal'. I previously had problems ("does not exist", expecting 0 args but got 3) invoking eth.personal.unlockAccount, where I had to add some argument info into its declaration in node_modules/web3/types.d.ts, and add "personal" to the list of "--rpcapi" options in the "geth" invocation to get everything to work. I think I matched any edits I did for unlockAccount in trying to fix ecRecover. I thought I was still in the app's web3/typescript world from the look of the error, but I now think it may be the web3 versions that are being used. In the app, I have "web3": "1.0.0-beta.33" in its package.json. But in the geth I'm using, its version of web3 is the 0.x version:

> web3.version { api: "0.20.1", ethereum: "0x3f", network: "2429", node: "Geth/TestNode1/v1.7.3-stable/darwin-amd64/go1.9.3",

So is TypeScript tripping over its own typings/specification files, or is it actually communicating with geth to see that this function does not exist, and I would need to go to a later geth that uses web3 1.x (if it even exists yet)? Thanks for any help or guidance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.