Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from web3 import *
  2. web3 = Web3(IPCProvider(ipc_path='/path/to/geth.ipc'))
  3. random_private_key = '0x71a7f0e2ef1b7ff501b65a1650d48b8d5521fadc9539eec146d4faa6f5ca9ccc'
  4. random_password = 'qwertyuiop'
  5. address = web3.personal.importRawKey(random_private_key, random_password)
  6.  
  7. # address -> '0x930198a4bdd322ee3305fcf0bcb106064b38754b'
  8. # web3.eth.accounts -> [..., '0x930198a4bdd322ee3305fcf0bcb106064b38754b']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement