コード例 #1
0
ファイル: main.py プロジェクト: shivaenigma/btxfees
def create_tx(addrs):
  '''Selects txouts and create spend given amount in BTC 
  to construct a transaction tx'''
  tx = Transaction('btc')
  for addr in addrs:
    tx.add_inputs(address=addr)
  return tx
コード例 #2
0
def sweep(crypto, private_key, to_address, fee=None, password=None, **modes):
    """
    Move all funds by private key to another address.
    """
    from moneywagon.tx import Transaction
    tx = Transaction(crypto, verbose=modes.get('verbose', False))
    tx.add_inputs(private_key=private_key, password=password, **modes)
    tx.change_address = to_address
    tx.fee(fee)

    return tx.push()
コード例 #3
0
ファイル: __init__.py プロジェクト: priestc/moneywagon
def sweep(crypto, private_key, to_address, fee=None, password=None, **modes):
    """
    Move all funds by private key to another address.
    """
    from moneywagon.tx import Transaction
    tx = Transaction(crypto, verbose=modes.get('verbose', False))
    tx.add_inputs(private_key=private_key, password=password, **modes)
    tx.change_address = to_address
    tx.fee(fee)

    return tx.push()
コード例 #4
0
 def make_payment(self):
     tx = Transaction(crypto=self.withdraw_currency.code)
     tx.add_inputs(
         self.exchange.withdraw_currency.pop_utxos(self.withdraw_amount))
     tx.add_output(self.withdraw_amount, to_address)
     return tx.push_tx()
コード例 #5
0
ファイル: models.py プロジェクト: shackra/MultiExplorer
 def make_payment(self):
     tx = Transaction(crypto=self.withdraw_currency.code)
     tx.add_inputs(self.exchange.withdraw_currency.pop_utxos(
         self.withdraw_amount))
     tx.add_output(self.withdraw_amount, to_address)
     return tx.push_tx()