Porting personal.importRawKey, personal.sign, personal.ecRecover from go-ethereum to web3.js (#565)

* Porting personal.importRawKey

* Porting personal.sign

* Porting personal.ecRecover
This commit is contained in:
Georgi Georgiev 2017-05-09 11:49:39 +02:00 committed by Fabian Vogelsteller
parent f8aa391351
commit a24df28f1f
1 changed files with 22 additions and 0 deletions

View File

@ -51,6 +51,25 @@ var methods = function () {
inputFormatter: [null]
});
var importRawKey = new Method({
name: 'importRawKey',
call: 'personal_importRawKey',
params: 2
});
var sign = new Method({
name: 'sign',
call: 'personal_sign',
params: 3,
inputFormatter: [null, formatters.inputAddressFormatter, null]
});
var ecRecover = new Method({
name: 'ecRecover',
call: 'personal_ecRecover',
params: 2
});
var unlockAccount = new Method({
name: 'unlockAccount',
call: 'personal_unlockAccount',
@ -74,7 +93,10 @@ var methods = function () {
return [
newAccount,
importRawKey
unlockAccount,
ecRecover,
sign,
sendTransaction,
lockAccount
];