@@ -185,6 +185,33 @@ GethPersonal API
185185
186186The following methods are available on the ``web3.geth.personal `` namespace.
187187
188+ .. py :method :: ec_recover(message, signature)
189+
190+ * Delegates to ``personal_ecRecover `` RPC Method
191+
192+ Returns the address associated with a signature created with ``personal.sign ``.
193+
194+ .. code-block :: python
195+
196+ >> > web3.geth.personal.sign(' snakesnax' , ' 0x9ad3c920dce5cea9a31d69467bb8d7c954e5acff' , ' ' )
197+ ' 0x8eb502165dec388af1c45c4bc835fd1852eaf358316ae5d248a40af8cd8dd7dc6373a6e606d8b411f788718b8b09a6cf87d980639731f530e4481148f14abfdf1b'
198+ >> > web3.geth.personal.ec_recover(' snakesnax' , ' 0x8eb502165dec388af1c45c4bc835fd1852eaf358316ae5d248a40af8cd8dd7dc6373a6e606d8b411f788718b8b09a6cf87d980639731f530e4481148f14abfdf1b' )
199+ ' 0x9ad3c920dce5cea9a31d69467bb8d7c954e5acff'
200+
201+
202+ .. py :method :: import_raw_key(private_key, passphrase)
203+
204+ * Delegates to ``personal_importRawKey `` RPC Method
205+
206+ Adds the given ``private_key `` to the node's keychain, encrypted with the
207+ given ``passphrase ``. Returns the address of the imported account.
208+
209+ .. code-block :: python
210+
211+ >> > web3.geth.personal.import_raw_key(some_private_key, ' the-passphrase' )
212+ ' 0xd3CdA913deB6f67967B99D67aCDFa1712C293601'
213+
214+
188215 .. py :method :: list_accounts()
189216
190217 * Delegates to ``personal_listAccounts `` RPC Method
@@ -216,20 +243,19 @@ The following methods are available on the ``web3.geth.personal`` namespace.
216243 }]
217244
218245
219- .. py :method :: import_raw_key( self , private_key, passphrase )
246+ .. py :method :: lock_account(account )
220247
221- * Delegates to ``personal_importRawKey `` RPC Method
248+ * Delegates to ``personal_lockAccount `` RPC Method
222249
223- Adds the given ``private_key `` to the node's keychain, encrypted with the
224- given ``passphrase ``. Returns the address of the imported account.
250+ Locks the given ``account ``.
225251
226252 .. code-block :: python
227253
228- >> > web3.geth.personal.import_raw_key(some_private_key, ' the-passphrase ' )
229- ' 0xd3CdA913deB6f67967B99D67aCDFa1712C293601 '
254+ >> > web3.geth.personal.lock_account( ' 0xd3CdA913deB6f67967B99D67aCDFa1712C293601 ' )
255+ True
230256
231257
232- .. py :method :: new_account(self , passphrase)
258+ .. py :method :: new_account(passphrase)
233259
234260 * Delegates to ``personal_newAccount `` RPC Method
235261
@@ -242,18 +268,26 @@ The following methods are available on the ``web3.geth.personal`` namespace.
242268 ' 0xd3CdA913deB6f67967B99D67aCDFa1712C293601'
243269
244270
245- .. py :method :: lock_account( self , account )
271+ .. py :method :: send_transaction(transaction, passphrase )
246272
247- * Delegates to ``personal_lockAccount `` RPC Method
273+ * Delegates to ``personal_sendTransaction `` RPC Method
248274
249- Locks the given `` account `` .
275+ Sends the transaction .
250276
277+
278+ .. py :method :: sign(message, account, passphrase)
279+
280+ * Delegates to ``personal_sign `` RPC Method
281+
282+ Generates an Ethereum-specific signature for ``keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)) ``
283+
251284 .. code-block :: python
252285
253- >> > web3.geth.personal.lock_account(' 0xd3CdA913deB6f67967B99D67aCDFa1712C293601' )
286+ >> > web3.geth.personal.sign(' snakesnax' , ' 0x9ad3c920dce5cea9a31d69467bb8d7c954e5acff' , ' ' )
287+ ' 0x8eb502165dec388af1c45c4bc835fd1852eaf358316ae5d248a40af8cd8dd7dc6373a6e606d8b411f788718b8b09a6cf87d980639731f530e4481148f14abfdf1b'
254288
255289
256- .. py :method :: unlock_account(self , account, passphrase, duration = None )
290+ .. py :method :: unlock_account(account, passphrase, duration = None )
257291
258292 * Delegates to ``personal_unlockAccount `` RPC Method
259293
@@ -271,13 +305,6 @@ The following methods are available on the ``web3.geth.personal`` namespace.
271305 True
272306
273307
274- .. py :method :: send_transaction(self , transaction, passphrase)
275-
276- * Delegates to ``personal_sendTransaction `` RPC Method
277-
278- Sends the transaction.
279-
280-
281308 .. py :module :: web3.geth.txpool
282309
283310 GethTxPool API
0 commit comments