Exemplo n.º 1
0
 def __str__(self):
     ret = "  Asset:\n"
     ret += "     asset_id: %s\n" % bbclib_binary.str_binary(self.asset_id)
     ret += "     user_id: %s\n" % bbclib_binary.str_binary(self.user_id)
     ret += "     nonce: %s\n" % bbclib_binary.str_binary(self.nonce)
     ret += "     file_size: %d\n" % self.asset_file_size
     ret += "     file_digest: %s\n" % bbclib_binary.str_binary(
         self.asset_file_digest)
     ret += "     body_size: %d\n" % self.asset_body_size
     ret += "     body: %s\n" % self.asset_body
     return ret
Exemplo n.º 2
0
 def __str__(self):
     ret = "------- Dump of the transaction data ------\n"
     ret += "* transaction_id: %s\n" % bbclib_binary.str_binary(
         self.transaction_id)
     ret += "version: %d\n" % self.version
     ret += "timestamp: %d\n" % self.timestamp
     if self.version != 0:
         ret += "id_length of transaction_id: %d\n" % self.idlen_conf[
             "transaction_id"]
     ret += "Event[]: %d\n" % len(self.events)
     for i, evt in enumerate(self.events):
         ret += " [%d]\n" % i
         ret += str(evt)
     ret += "Reference[]: %d\n" % len(self.references)
     for i, refe in enumerate(self.references):
         ret += " [%d]\n" % i
         ret += str(refe)
     ret += "Relation[]: %d\n" % len(self.relations)
     for i, rtn in enumerate(self.relations):
         ret += " [%d]\n" % i
         ret += str(rtn)
     if self.witness is None:
         ret += "Witness: None\n"
     else:
         ret += str(self.witness)
     if self.cross_ref is None:
         ret += "Cross_Ref: None\n"
     else:
         ret += str(self.cross_ref)
     ret += "Signature[]: %d\n" % len(self.signatures)
     for i, sig in enumerate(self.signatures):
         ret += " [%d]\n" % i
         ret += str(sig)
     return ret
Exemplo n.º 3
0
 def __str__(self):
     ret =  "  asset_group_id: %s\n" % bbclib_binary.str_binary(self.asset_group_id)
     ret += "  reference_indices: %s\n" % self.reference_indices
     ret += "  mandatory_approvers:\n"
     if len(self.mandatory_approvers) > 0:
         for user in self.mandatory_approvers:
             ret += "    - %s\n" % bbclib_binary.str_binary(user)
     else:
         ret += "    - None\n"
     ret += "  option_approvers:\n"
     if len(self.option_approvers) > 0:
         for user in self.option_approvers:
             ret += "    - %s\n" % bbclib_binary.str_binary(user)
     else:
         ret += "    - None\n"
     ret += "  option_approver_num_numerator: %d\n" % self.option_approver_num_numerator
     ret += "  option_approver_num_denominator: %d\n" % self.option_approver_num_denominator
     ret += str(self.asset)
     return ret
Exemplo n.º 4
0
 def __str__(self):
     ret = "  asset_group_id: %s\n" % bbclib_binary.str_binary(
         self.asset_group_id)
     if len(self.pointers) > 0:
         ret += "  Pointers[]: %d\n" % len(self.pointers)
         for i, pt in enumerate(self.pointers):
             ret += "   [%d]\n" % i
             ret += str(pt)
     if self.asset is not None:
         ret += str(self.asset)
     if self.asset_raw is not None:
         ret += str(self.asset_raw)
     if self.asset_hash is not None:
         ret += str(self.asset_hash)
     return ret
Exemplo n.º 5
0
 def __str__(self):
     ret = "  AssetRaw:\n"
     ret += "     asset_id: %s\n" % bbclib_binary.str_binary(self.asset_id)
     ret += "     body_size: %d\n" % self.asset_body_size
     ret += "     body: %s\n" % self.asset_body
     return ret
Exemplo n.º 6
0
 def __str__(self):
     ret =  "  asset_group_id: %s\n" % bbclib_binary.str_binary(self.asset_group_id)
     ret += "  transaction_id: %s\n" % bbclib_binary.str_binary(self.transaction_id)
     ret += "  event_index_in_ref: %d\n" % self.event_index_in_ref
     ret += "  sig_indices: %s\n" % self.sig_indices
     return ret
Exemplo n.º 7
0
 def __str__(self):
     ret  = "Cross_Ref:\n"
     ret += "  domain_id: %s\n" % bbclib_binary.str_binary(self.domain_id)
     ret += "  transaction_id: %s\n" % bbclib_binary.str_binary(self.transaction_id)
     return ret
Exemplo n.º 8
0
 def __str__(self):
     ret = "     transaction_id: %s\n" % bbclib_binary.str_binary(
         self.transaction_id)
     ret += "     asset_id: %s\n" % bbclib_binary.str_binary(self.asset_id)
     return ret
Exemplo n.º 9
0
 def __str__(self):
     ret = "  AssetHash:\n"
     ret += "     num of hashes: %s\n" % len(self.asset_ids)
     for h in self.asset_ids:
         ret += "     asset_id(hash): %s\n" % bbclib_binary.str_binary(h)
     return ret