def createNewBitcoinTx(publicAddrToValueArray): if len(publicAddrToValueArray) == 0: return None tx = TransactionUtils.createFirstTransaction(publicAddrToValueArray) if tx != None: SendMessage.broadcastTransactionMsg(tx) return tx
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
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
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