Extend geth console's web3.js to include vault acct lock/unlock

This commit is contained in:
chris-j-h 2019-08-11 12:28:07 +01:00
parent 28ad6812ba
commit 002fc84f2c
2 changed files with 12 additions and 2 deletions

View File

@ -127,8 +127,6 @@ func (b *bridge) OpenWallet(call otto.FunctionCall) (response otto.Value) {
return val
}
// TODO Implement bridge methods for LockVaultAccount and UnlockVaultAccount
// UnlockAccount is a wrapper around the personal.unlockAccount RPC method that
// uses a non-echoing password prompt to acquire the passphrase and executes the
// original RPC method (saved in jeth.unlockAccount) with it to actually execute

View File

@ -613,6 +613,18 @@ web3._extend({
params: 2,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null]
}),
new web3._extend.Method({
name: 'unlockVaultAccount',
call: 'personal_unlockVaultAccount',
params: 2,
inputFormatter: [web3._extend.formatters.inputAddressFormatter, null]
}),
new web3._extend.Method({
name: 'lockVaultAccount',
call: 'personal_lockVaultAccount',
params: 1,
inputFormatter: [web3._extend.formatters.inputAddressFormatter]
}),
],
properties: [
new web3._extend.Property({