Files
ccxt_with_mt5/ccxt/static_dependencies/ethereum/utils/encoding.py
lz_db 0fab423a18 add
2025-11-16 12:31:03 +08:00

7 lines
199 B
Python

def int_to_big_endian(value: int) -> bytes:
return value.to_bytes((value.bit_length() + 7) // 8 or 1, "big")
def big_endian_to_int(value: bytes) -> int:
return int.from_bytes(value, "big")