Пример #1
0
 def swap_get(self, swap_id):
     atomic_swap_info = AtomicSwapInfo()
     atomic_swap_info.ParseFromString(self.get_value(self.make_address_from_data(swap_id)))
     return atomic_swap_info
Пример #2
0
 async def swap_get(self, swap_id):
     atomic_swap_info = AtomicSwapInfo()
     swap_address = self.make_address_from_data(swap_id)
     raw_swap = await self.get_value(swap_address)
     atomic_swap_info.ParseFromString(raw_swap)
     return atomic_swap_info