@@ -58,7 +58,7 @@ func (w *keystoreWallet) Open(passphrase string) error { return nil }
58
58
func (w * keystoreWallet ) Close () error { return nil }
59
59
60
60
// Accounts implements accounts.Wallet, returning an account list consisting of
61
- // a single account that the plain kestore wallet contains.
61
+ // a single account that the plain keystore wallet contains.
62
62
func (w * keystoreWallet ) Accounts () []accounts.Account {
63
63
return []accounts.Account {w .account }
64
64
}
@@ -93,12 +93,12 @@ func (w *keystoreWallet) signHash(account accounts.Account, hash []byte) ([]byte
93
93
return w .keystore .SignHash (account , hash )
94
94
}
95
95
96
- // SignData signs keccak256(data). The mimetype parameter describes the type of data being signed
96
+ // SignData signs keccak256(data). The mimetype parameter describes the type of data being signed.
97
97
func (w * keystoreWallet ) SignData (account accounts.Account , mimeType string , data []byte ) ([]byte , error ) {
98
98
return w .signHash (account , crypto .Keccak256 (data ))
99
99
}
100
100
101
- // SignDataWithPassphrase signs keccak256(data). The mimetype parameter describes the type of data being signed
101
+ // SignDataWithPassphrase signs keccak256(data). The mimetype parameter describes the type of data being signed.
102
102
func (w * keystoreWallet ) SignDataWithPassphrase (account accounts.Account , passphrase , mimeType string , data []byte ) ([]byte , error ) {
103
103
// Make sure the requested account is contained within
104
104
if ! w .Contains (account ) {
@@ -108,12 +108,14 @@ func (w *keystoreWallet) SignDataWithPassphrase(account accounts.Account, passph
108
108
return w .keystore .SignHashWithPassphrase (account , passphrase , crypto .Keccak256 (data ))
109
109
}
110
110
111
+ // SignText implements accounts.Wallet, attempting to sign the hash of
112
+ // the given text with the given account.
111
113
func (w * keystoreWallet ) SignText (account accounts.Account , text []byte ) ([]byte , error ) {
112
114
return w .signHash (account , accounts .TextHash (text ))
113
115
}
114
116
115
117
// SignTextWithPassphrase implements accounts.Wallet, attempting to sign the
116
- // given hash with the given account using passphrase as extra authentication.
118
+ // hash of the given text with the given account using passphrase as extra authentication.
117
119
func (w * keystoreWallet ) SignTextWithPassphrase (account accounts.Account , passphrase string , text []byte ) ([]byte , error ) {
118
120
// Make sure the requested account is contained within
119
121
if ! w .Contains (account ) {
0 commit comments