vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.3k stars 860 forks source link

bitcoin.electrum_privkey giving error #170

Open deveshaggrawal19 opened 7 years ago

deveshaggrawal19 commented 7 years ago

Below is the error when i use bitcoin.electrum_privkey('', 0)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/devesh/.local/lib/python2.7/site-packages/bitcoin/deterministic.py", line 26, in electrum_privkey
    mpk = electrum_mpk(seed)
  File "/home/devesh/.local/lib/python2.7/site-packages/bitcoin/deterministic.py", line 17, in electrum_mpk
    return privkey_to_pubkey(seed)[2:]
  File "/home/devesh/.local/lib/python2.7/site-packages/bitcoin/main.py", line 291, in privkey_to_pubkey
    f = get_privkey_format(privkey)
  File "/home/devesh/.local/lib/python2.7/site-packages/bitcoin/main.py", line 217, in get_privkey_format
    bin_p = b58check_to_bin(priv)
  File "/home/devesh/.local/lib/python2.7/site-packages/bitcoin/main.py", line 427, in b58check_to_bin
    assert bin_dbl_sha256(data[:-4])[:4] == data[-4:]
AssertionError

What should I do