1

I am using

web3.personal.unlockAccount()

but meeting a issue

" Property 'personal' does not exist on type 'Web3'."

what is the problem?

2
  • 2
    Can you send more details: geth or parity setup, Web3 initialisation. Thanks Nov 24, 2017 at 8:38
  • Which version of web3 do you use? You can find it out with console.log(web3.version.api)
    – Bumblebee
    Nov 24, 2017 at 8:47

2 Answers 2

1

It should be..

 web3.eth.personal.unlockAccount(userId,password,unlockDurationInSeconds)
0

If you are using Geth, you should start it with personal api. geth --testnet --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcapi "admin,db,debug,eth,miner,net,personal,shh,txpool,web3" console. Be careful with what you are going to expose otherwise you may make your node vulnerable for attacks. If it is for tests only, don´t worry, but if it is for production and you are dealing with serious amount of money, use it with a lot of careful.

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.