|
@ -755,14 +755,14 @@ class Transaction: |
|
|
def has_address(self, addr): |
|
|
def has_address(self, addr): |
|
|
return (addr in self.get_output_addresses()) or (addr in (tx.get("address") for tx in self.inputs)) |
|
|
return (addr in self.get_output_addresses()) or (addr in (tx.get("address") for tx in self.inputs)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def as_dict(self): |
|
|
def as_dict(self): |
|
|
|
|
|
if self.raw is None: |
|
|
|
|
|
self.raw = self.serialize() |
|
|
self.deserialize() |
|
|
self.deserialize() |
|
|
import json |
|
|
|
|
|
out = { |
|
|
out = { |
|
|
"hex":str(self), |
|
|
'hex': self.raw, |
|
|
"complete":self.is_complete() |
|
|
'complete': self.is_complete() |
|
|
} |
|
|
} |
|
|
return out |
|
|
return out |
|
|
|
|
|
|
|
|
|
|
|
|
|
|