Exemple #1
0
def createNewBitcoinTx(publicAddrToValueArray):
    if len(publicAddrToValueArray) == 0:
        return None
    tx = TransactionUtils.createFirstTransaction(publicAddrToValueArray)
    if tx != None:
        SendMessage.broadcastTransactionMsg(tx)
    return tx
Exemple #2
0
def createNormalBitCoinTx(pre_out_ids, publicAddrToValueArray):
    if len(pre_out_ids) == 0 or len(publicAddrToValueArray) == 0:
        return None
    tx = TransactionUtils.createTransaction(pre_out_ids,
                                            publicAddrToValueArray)
    if tx != None:
        SendMessage.broadcastTransactionMsg(tx)
    return tx
Exemple #3
0
def createNewCFBitCoinTx(target_amount,
                         pubkey_addr,
                         end_time,
                         pre_out_ids_for_fee=[]):
    cf = TransactionUtils.createFirstCFTransaction(target_amount, pubkey_addr,
                                                   end_time,
                                                   pre_out_ids_for_fee)
    if cf != None:
        SendMessage.broadcastTransactionMsg(cf)
    return cf
Exemple #4
0
def createNormalCFBitCoinTx(pre_out_ids, pre_cf_hash, spendValue,
                            otherPublicAddrToValueArray, refund_addr):
    if len(pre_out_ids) == 0:
        return None
    cf = TransactionUtils.createNormalCFTransaction(
        pre_out_ids, pre_cf_hash, spendValue, otherPublicAddrToValueArray,
        refund_addr)
    if cf != None:
        SendMessage.broadcastTransactionMsg(cf)
    return cf