Account can be unlocked by using personal_unlockAccount
module of JSON_RPC. It unlocks specified account for use.
personal_unlockAccount
Unlocks specified account for use.
If permanent unlocking is disabled (the default) then the duration
argument will be ignored, and the account will be unlocked for a
single signing. With permanent locking enabled, the duration sets the
number of seconds to hold the account open for. It will default to 300
seconds. Passing 0 unlocks the account indefinitely.
There can only be one unlocked account at a time.
Parameters
Address
- 20 Bytes - The address of the account to unlock.
String
- Passphrase to unlock the account.
Quantity
- (default: 300
) Integer or null
- Duration in seconds how long the account should remain unlocked for.
params: [
"0x8f0227d45853a50eefd48dd4fec25d5b3fd2295e",
"hunter2",
null ]
Returns
Boolean
- whether the call was successful
Example:
Request
curl --data '{"method":"personal_unlockAccount","params":["0x8f0227d45853a50eefd48dd4fec25d5b3fd2295e","hunter2",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
Response
{ "id": 1,
"jsonrpc": "2.0",
"result": true
}
Source