示例#1
0
 def generatePrivateKey(self):
     global key
     kg = blocksmith.KeyGenerator()
     kg.seed_input('Seeds words to generate random input')
     key = kg.generate_key()
     print(key)
     self.label.setText("Your Ethereum Address: ")
示例#2
0
def generate_keys():
    btc = BitcoinWallet()
    kg = blocksmith.KeyGenerator()
    kg.seed_input(str(uuid.uuid4()))
    private_key = kg.generate_key()

    public_key = btc._BitcoinWallet__private_to_public(private_key)
    return {
        "private_key": private_key,
        "public_key": public_key.decode('utf-8')
    }
示例#3
0
import blocksmith
import sys
import random

count = int(sys.argv[1])

kg = blocksmith.KeyGenerator()
kg.seed_input('This is the seed.')

with open('./accounts.txt', 'w') as full, open('./addresses.txt', 'w') as addr:
    for i in range(count):
        private_key = kg.generate_key()
        address = blocksmith.EthereumWallet.generate_address(private_key)
        checksum_address = blocksmith.EthereumWallet.checksum_address(address)
        balance = random.randrange(10, 1000) * 1e18
        full.write('%s,%s,%d\n' % (private_key, checksum_address, balance))
        addr.write('%s,%d\n' % (checksum_address, balance))
示例#4
0
import blocksmith
address_1 = str(
    input('Enter the btc address: '))  #'1PQc5NNSdvRwyw2RvrrQcBF4jHnmQFRkaL'
sert = 0
while True:
    paddress_1aphrase = blocksmith.KeyGenerator()
    paddress_1aphrase.seed_input(
        'qwertyuiopasdfghjklzxcvbnm1234567890')  # paddress_1aphrase
    private_Key = paddress_1aphrase.generate_key()
    address = blocksmith.BitcoinWallet.generate_address(private_Key)
    sert += 1
    if address_1 == address:
        print("we found it ")
        print("private private_Key = ", private_Key)
        print("address = ", address)
        break
    else:
        print("trying private private_Key = ", private_Key)
        print("address = ", address)
        continue