Exemplo n.º 1
0
 def sendBox(self, addr, data, tx_id=None):
     box = BoxContainer()
     box.name = data.__class__.__name__
     box.value = token.node_data(data.SerializeToString(), self.fingerprint)
     # generate random tx id if not given
     if not tx_id:
         tx_id = utils.rand_str(8)
     box.tx_id = tx_id
     self.sendString(addr, box.SerializeToString())
     return tx_id
Exemplo n.º 2
0
 def sendBox(self, addr, data, tx_id = None):
     box = BoxContainer()
     box.name = data.__class__.__name__
     box.value = token.node_data(data.SerializeToString(), self.fingerprint)
     # generate random tx id if not given
     if not tx_id:
         tx_id = utils.rand_str(8)
     box.tx_id = tx_id
     self.sendString(addr, box.SerializeToString())
     return tx_id
Exemplo n.º 3
0
 def sendBox(self, data, tx_id=None):
     box = BoxContainer()
     box.name = data.__class__.__name__
     box.value = data.SerializeToString()
     # generate random tx id if not given
     if not tx_id:
         tx_id = utils.rand_str(8)
     box.tx_id = tx_id
     self.sendString(box.SerializeToString())
     return tx_id
Exemplo n.º 4
0
 def sendBox(self, data, tx_id = None):
     box = BoxContainer()
     box.name = data.__class__.__name__
     box.value = data.SerializeToString()
     # generate random tx id if not given
     if not tx_id:
         tx_id = utils.rand_str(8)
     box.tx_id = tx_id
     self.sendString(box.SerializeToString())
     return tx_id