1
0

new command: signtx (offline transaction signing)

This commit is contained in:
thomasv
2012-12-05 18:18:47 +01:00
parent c763445734
commit 4e070bda57
3 changed files with 39 additions and 16 deletions

View File

@@ -776,10 +776,11 @@ class Wallet:
change_addr = inputs[-1][0]
print_error( "Sending change to", change_addr )
outputs = self.add_tx_change(outputs, amount, fee, total, change_addr)
s_inputs = self.sign_inputs( inputs, outputs, password )
tx = filter( raw_tx( s_inputs, outputs ) )
if not self.seed:
return {'inputs':inputs, 'outputs':outputs}
tx = repr(self.signed_tx(inputs, outputs, password))
for address, x in outputs:
if address not in self.addressbook and not self.is_mine(address):
@@ -791,6 +792,11 @@ class Wallet:
return tx
def signed_tx(self, inputs, outputs, password):
s_inputs = self.sign_inputs( inputs, outputs, password )
tx = filter( raw_tx( s_inputs, outputs ) )
return tx
def sendtx(self, tx):
# synchronous
h = self.send_tx(tx)