1
0

return python objects from commands, and display them as json

This commit is contained in:
thomasv
2013-02-26 17:57:48 +01:00
parent 8a14679530
commit 2e9c2c1f96
5 changed files with 50 additions and 29 deletions

View File

@@ -727,6 +727,15 @@ class Transaction:
return is_send, v, fee
def as_dict(self):
import json
out = {
"hex":self.raw,
"complete":self.is_complete
}
if not self.is_complete:
out['input_info'] = repr(self.input_info).replace(' ','')
return out
def test_bip32():