Exemplo n.º 1
0
                                          4,
                                          ]

PREVIOUS_TRANSACTION_HASH_LIST = ["1646cd77cc90849e3cada74270a5103b4886535624f2e0bb8a765a675ef7bc3e",
                                  "aa46cd77cc90849e3cada74270a5103b4886535624f2e0bb8a765a675ef7bcaa",
                                  ]

INPUT_SATOSHIS = 499983620

INITIAL_OUTPUT_TRANSACTIONS = 3
SINGLE_OUTPUT_TRANSACTION_AMOUNT = 5460

TRANSFER_BACK_AMOUNT = INPUT_SATOSHIS - (INITIAL_OUTPUT_TRANSACTIONS * SINGLE_OUTPUT_TRANSACTION_AMOUNT)

ownershipKey = generateAddress.privKey
ownershipPublicAddress = publicKey.getPublicAddress(ownershipKey, "test")

file = open(CREDITOR_OWNERSHIP_LOG_FILE, "a")
getTimeNow = time.time()
getFormattedTime = datetime.datetime.fromtimestamp(getTimeNow).strftime('%Y-%m-%d %H:%M:%S')
file.write(getFormattedTime + ": " + ownershipKey + "," + ownershipPublicAddress)
file.write("\n")
file.close()

DESTINATION_SATOSHIS_LIST = []
DESTINATION_PUBLIC_ADDRESS_LIST = []

DESTINATION_SATOSHIS_LIST.append(TRANSFER_BACK_AMOUNT)
DESTINATION_PUBLIC_ADDRESS_LIST.append(PREVIOUS_TRANSACTION_OUTPUT_PUBLIC_ADDRESS_LIST[0])

for outputIndex in xrange(0, INITIAL_OUTPUT_TRANSACTIONS):
Exemplo n.º 2
0
#     - 0: First, 1: Second, ...
PREVIOUS_TRANSACTION_OUTPUT_INDEX_LIST = [0,
                                          ]

PREVIOUS_TRANSACTION_HASH_LIST = ["1646cd77cc90849e3cada74270a5103b4886535624f2e0bb8a765a675ef7bc3e",
                                  ]

INPUT_SATOSHIS = 499983620

INITIAL_OUTPUT_TRANSACTIONS = 3
SINGLE_OUTPUT_TRANSACTION_AMOUNT = 5460

TRANSFER_BACK_AMOUNT = INPUT_SATOSHIS - (INITIAL_OUTPUT_TRANSACTIONS * SINGLE_OUTPUT_TRANSACTION_AMOUNT)

ownershipKey = generateAddress.privKey
ownershipPublicAddress = publicKey.getPublicAddress(ownershipKey, "test")

file = open(CREDITOR_OWNERSHIP_LOG_FILE, "a")
getTimeNow = time.time()
getFormattedTime = datetime.datetime.fromtimestamp(getTimeNow).strftime('%Y-%m-%d %H:%M:%S')
file.write(getFormattedTime + ": " + ownershipKey + "," + ownershipPublicAddress)
file.write("\n")
file.close()

DESTINATION_SATOSHIS_LIST = []
DESTINATION_PUBLIC_ADDRESS_LIST = []

DESTINATION_SATOSHIS_LIST.append(TRANSFER_BACK_AMOUNT)
DESTINATION_PUBLIC_ADDRESS_LIST.append(PREVIOUS_TRANSACTION_OUTPUT_PUBLIC_ADDRESS_LIST[0])

for outputIndex in xrange(0, INITIAL_OUTPUT_TRANSACTIONS):
Exemplo n.º 3
0
import time, datetime

KEY_GENERATION_LOG_FILE = "keyGenerationLog.txt"

privKey = privateKey.getStrongRandomKey(256)
#privKey = "0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D"
#privKey = "f19c523315891e6e15ae0608a35eec2e00ebd6d1984cf167f46336dabd9b2de4"
#privKey = "52BB9A981288DF29D47E8020093C64CD9539876130F5492D24D303152A6FEA2A"
#privKey = "EF7BADE09BA08731A2AEC3BDA0FBCD06A235C497D32C9FB99A589700540BCA4B"
#privKey = "c9b74446725c99d429848f8093a347976784d133efec971343be004d5f9c7fdc"
#privKey = "e97174e793c7524c0a68eda86458682bd9c5510e6e3614cc5cecdffe966c925b"

mainAddressWIF = privateKey.getWIFPrivateKey(privKey, "main")
testAddressWIF = privateKey.getWIFPrivateKey(privKey, "test")

mainPubKeyPublicAddress = publicKey.getPublicAddress(privKey, "main_pubkey")
mainScriptPublicAddress = publicKey.getPublicAddress(privKey, "main_script")
testPublicAddress = publicKey.getPublicAddress(privKey, "test")

file = open(KEY_GENERATION_LOG_FILE, "a")

getTimeNow = time.time()
getFormattedTime = datetime.datetime.fromtimestamp(getTimeNow).strftime('%Y-%m-%d %H:%M:%S')

file.write(getFormattedTime + ": " + "\n")
file.write("\t" + "Private Key: " + privKey + "\n")
file.write("\t\t" + "Main Address WIF: " + mainAddressWIF + "\n")
file.write("\t\t" + "Test Address WIF: " + testAddressWIF + "\n")
file.write("\t" + "Bitcoin Public Addresses: " + "\n")
file.write("\t\t" + "Main PubKey Address: " + mainPubKeyPublicAddress + "\n")
file.write("\t\t" + "Main Script Address: " + mainScriptPublicAddress + "\n")