Skip to main content

Module 0x1::bcs

Utility for converting a Move value to its binary representation in BCS (Binary Canonical Serialization). BCS is the binary encoding for Move resources and other non-module values published on-chain. See for more details on BCS.

Function to_bytes

Return the binary representation of v in BCS (Binary Canonical Serialization) format

public fun to_bytes<MoveValue>(v: &MoveValue): vector<u8>
native public fun to_bytes<MoveValue>(v: &MoveValue): vector<u8>;