|
|
@ -412,26 +412,18 @@ class Commands: |
|
|
|
return tx |
|
|
|
|
|
|
|
@command('wp') |
|
|
|
def payto(self, destination, amount, tx_fee=None, from_addr=None, change_addr=None, nocheck=False, unsigned=False, deserialized=False, broadcast=False): |
|
|
|
def payto(self, destination, amount, tx_fee=None, from_addr=None, change_addr=None, nocheck=False, unsigned=False, deserialized=False): |
|
|
|
"""Create a transaction. """ |
|
|
|
domain = [from_addr] if from_addr else None |
|
|
|
tx = self._mktx([(destination, amount)], tx_fee, change_addr, domain, nocheck, unsigned) |
|
|
|
if broadcast: |
|
|
|
r, h = self.wallet.sendtx(tx) |
|
|
|
return h |
|
|
|
else: |
|
|
|
return tx.deserialize() if deserialized else tx |
|
|
|
return tx.deserialize() if deserialized else tx |
|
|
|
|
|
|
|
@command('wp') |
|
|
|
def paytomany(self, outputs, tx_fee=None, from_addr=None, change_addr=None, nocheck=False, unsigned=False, deserialized=False, broadcast=False): |
|
|
|
def paytomany(self, outputs, tx_fee=None, from_addr=None, change_addr=None, nocheck=False, unsigned=False, deserialized=False): |
|
|
|
"""Create a multi-output transaction. """ |
|
|
|
domain = [from_addr] if from_addr else None |
|
|
|
tx = self._mktx(outputs, tx_fee, change_addr, domain, nocheck, unsigned) |
|
|
|
if broadcast: |
|
|
|
r, h = self.wallet.sendtx(tx) |
|
|
|
return h |
|
|
|
else: |
|
|
|
return tx.deserialize() if deserialized else tx |
|
|
|
return tx.deserialize() if deserialized else tx |
|
|
|
|
|
|
|
@command('wn') |
|
|
|
def history(self): |
|
|
@ -620,7 +612,6 @@ param_descriptions = { |
|
|
|
} |
|
|
|
|
|
|
|
command_options = { |
|
|
|
'broadcast': (None, "--broadcast", "Broadcast the transaction to the Bitcoin network"), |
|
|
|
'password': ("-W", "--password", "Password"), |
|
|
|
'concealed': ("-C", "--concealed", "Don't echo seed to console when restoring"), |
|
|
|
'receiving': (None, "--receiving", "Show only receiving addresses"), |
|
|
|