BCS (Binary Canonical Serialization) codec for Move/Sui payloads.
import move_bcs_codec as bcs
raw = bcs.uleb128_encode(300) # b'\xac\x02'
value, next_off = bcs.uleb128_decode(raw)
s = bcs.bcs_encode_string("position")For supported interpreters (CPython 3.10–3.13) a prebuilt accelerator is loaded automatically for the varint-heavy inner loops; other interpreters use the pure-Python path. Both are API-identical.
pip install -e .
python -m pytest tests/