mirror of
https://github.com/MarkParker5/STARK.git
synced 2024-11-24 08:12:13 +02:00
18 lines
435 B
Python
18 lines
435 B
Python
from typing import List
|
|
|
|
class MerlinMessage:
|
|
urdi: bytes
|
|
func: int # unsigned 1 byte int 0...255
|
|
arg: int # unsigned 1 byte int 0...255
|
|
|
|
def __init__(self, urdi, func, arg):
|
|
if type(urdi) == int:
|
|
urdi = urdi.to_bytes(5, byteorder = 'big')
|
|
self.urdi = urdi
|
|
self.func = func
|
|
self.arg = arg
|
|
|
|
@property
|
|
def data(self) -> List[int]:
|
|
return [self.func, self.arg]
|