def _encode_bitcoin_payment(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.transaction_trader_id),
         str(payload.transaction_number), str(payload.bitcoin_address), int(payload.price), float(payload.timestamp)
     ))
     return packet,
 def _encode_transaction(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.transaction_trader_id),
         str(payload.transaction_number), float(payload.timestamp)
     ))
     return packet,
 def _encode_declined_trade(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.order_number),
         str(payload.recipient_trader_id), str(payload.recipient_order_number), float(payload.timestamp)
     ))
     return packet,
 def _encode_proposed_trade(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.order_number),
         str(payload.recipient_trader_id), str(payload.recipient_order_number), int(payload.price),
         int(payload.quantity), float(payload.timestamp), str(payload.address.ip), int(payload.address.port)
     ))
     return packet,
 def _encode_offer(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.order_number), int(payload.price),
         int(payload.quantity), float(payload.timeout), float(payload.timestamp), int(payload.ttl),
         str(payload.address.ip), int(payload.address.port)
     ))
     return packet,
 def _encode_start_transaction(self, message):
     payload = message.payload
     packet = encode((
         str(payload.trader_id), str(payload.message_number), str(payload.transaction_trader_id),
         str(payload.transaction_number), str(payload.order_trader_id), str(payload.order_number),
         str(payload.recipient_trader_id), str(payload.recipient_order_number),
         int(payload.price), int(payload.quantity), float(payload.timestamp)
     ))
     return packet,