Browse Source

add listunspent

283
thomasv 12 years ago
parent
commit
a1a5886e57
  1. 10
      electrum

10
electrum

@ -91,11 +91,13 @@ options:\n --fee, -f: set transaction fee\n --fromaddr, -s: send from address
'unfreeze':'', 'unfreeze':'',
'prioritize':'', 'prioritize':'',
'unprioritize':'', 'unprioritize':'',
'dumpprivkey':'', 'dumpprivkey':'similar to bitcoind\'s command',
'listunspent':'similar to bitcoind\'s command',
'createmultisig':'similar to bitcoind\'s command', 'createmultisig':'similar to bitcoind\'s command',
'createrawtransaction':'similar to bitcoind\'s command', 'createrawtransaction':'similar to bitcoind\'s command',
'decoderawtransaction':'similar to bitcoind\'s command', 'decoderawtransaction':'similar to bitcoind\'s command',
'signrawtransaction':'similar to bitcoind\'s command', 'signrawtransaction':'similar to bitcoind\'s command',
} }
@ -109,6 +111,7 @@ offline_commands = [ 'password', 'mktx', 'signtx',
'deseed','reseed', 'deseed','reseed',
'freeze','unfreeze', 'freeze','unfreeze',
'prioritize','unprioritize', 'prioritize','unprioritize',
'dumpprivkey','listunspent',
'createmultisig', 'createrawtransaction', 'decoderawtransaction', 'signrawtransaction' 'createmultisig', 'createrawtransaction', 'decoderawtransaction', 'signrawtransaction'
] ]
@ -776,6 +779,11 @@ if __name__ == '__main__':
print_msg(tx) print_msg(tx)
elif cmd == 'listunspent':
unspent = map(lambda x: {"txid":x[0].split(':')[0],"vout":x[0].split(':')[1],"amount":x[1]*1.e-8}, wallet.prevout_values.items() )
print_json(unspent)
if cmd not in offline_commands and not options.offline: if cmd not in offline_commands and not options.offline:
synchronizer.stop() synchronizer.stop()

Loading…
Cancel
Save