new command: signtx (offline transaction signing)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user