accounts: improve API and add documentation

- Sign takes common.Address, not Account
- Import/Export methods work with encrypted JSON keys
This commit is contained in:
Felix Lange
2016-04-05 01:08:50 +02:00
parent 91aaddaeb3
commit 46df50be18
6 changed files with 97 additions and 58 deletions

View File

@ -254,8 +254,7 @@ func (be *registryAPIBackend) Transact(fromStr, toStr, nonceStr, valueStr, gasSt
tx = types.NewTransaction(nonce, to, value, gas, price, data)
}
acc := accounts.Account{Address: from}
signature, err := be.am.Sign(acc, tx.SigHash().Bytes())
signature, err := be.am.Sign(from, tx.SigHash().Bytes())
if err != nil {
return "", err
}