version 0.1.4, WIF compatible new private keys, proper bitcoin address verification, worker killing does not drops hash error, private key saved confirmation on site create
This commit is contained in:
parent
e3c0a02ca0
commit
3bec738595
6 changed files with 481 additions and 12 deletions
|
@ -1,11 +1,12 @@
|
|||
from src.lib.BitcoinECC import BitcoinECC
|
||||
import hashlib
|
||||
|
||||
|
||||
def newPrivatekey(): # Return new private key
|
||||
bitcoin = BitcoinECC.Bitcoin()
|
||||
bitcoin.GeneratePrivateKey()
|
||||
return bitcoin.PrivateEncoding()
|
||||
def newPrivatekey(uncompressed=True): # Return new private key
|
||||
from src.lib.BitcoinECC import newBitcoinECC # Use new lib to generate WIF compatible addresses, but keep using the old yet for backward compatiblility issues
|
||||
bitcoin = newBitcoinECC.Bitcoin()
|
||||
d = bitcoin.GenerateD()
|
||||
bitcoin.AddressFromD(d, uncompressed)
|
||||
return bitcoin.PrivFromD(d, uncompressed)
|
||||
|
||||
|
||||
def privatekeyToAddress(privatekey): # Return address from private key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue