Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 22 characters in body
Source Link
gnxvw
  • 277
  • 1
  • 3
  • 13

I cannot unlock my account.

I decrypted my account from encrypted accoun, and want to unlock it to deploy contract.

However, I am getting this error,

 Node error: {"code":-32000,"message":"could not decrypt key with given passphrase"

This is my web3 code.

const decryptEtherAccount = await web3.eth.accounts.decrypt(etherAccount,'test!')
web3.eth.defaultAccount = await decryptEtherAccount.address
const account = await this.props.web3.eth.getAccounts()
const address = await this.props.web3.eth.personal.unlockAccount(account[0], decryptEtherAccount.privateKey, 1000)
console.log(address)

Are there any problems of my code?

Also, could we unlock account, not node?

I cannot unlock my account.

I decrypted my account from encrypted accoun, and want to unlock it to deploy contract.

However, I am getting this error,

 Node error: {"code":-32000,"message":"could not decrypt key with given passphrase"

This is my web3 code.

const decryptEtherAccount = await web3.eth.accounts.decrypt(etherAccount,'test!')
web3.eth.defaultAccount = await decryptEtherAccount.address
const account = await this.props.web3.eth.getAccounts()
const address = await this.props.web3.eth.personal.unlockAccount(account[0], decryptEtherAccount.privateKey, 1000)
console.log(address)

Are there any problems of my code?

Also, could we unlock account, not node?

I cannot unlock my account.

I decrypted my account from encrypted accoun, and want to unlock it to deploy contract.

However, I am getting this error,

 Node error: {"code":-32000,"message":"could not decrypt key with given passphrase"

This is my web3 code.

const decryptEtherAccount = await web3.eth.accounts.decrypt(etherAccount,'test!')
web3.eth.defaultAccount = await decryptEtherAccount.address
const account = await web3.eth.getAccounts()
const address = await web3.eth.personal.unlockAccount(account[0], decryptEtherAccount.privateKey, 1000)
console.log(address)

Are there any problems of my code?

Also, could we unlock account, not node?

Source Link
gnxvw
  • 277
  • 1
  • 3
  • 13

How can I unlock my account

I cannot unlock my account.

I decrypted my account from encrypted accoun, and want to unlock it to deploy contract.

However, I am getting this error,

 Node error: {"code":-32000,"message":"could not decrypt key with given passphrase"

This is my web3 code.

const decryptEtherAccount = await web3.eth.accounts.decrypt(etherAccount,'test!')
web3.eth.defaultAccount = await decryptEtherAccount.address
const account = await this.props.web3.eth.getAccounts()
const address = await this.props.web3.eth.personal.unlockAccount(account[0], decryptEtherAccount.privateKey, 1000)
console.log(address)

Are there any problems of my code?

Also, could we unlock account, not node?