return python objects from commands, and display them as json
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user