Skip to content

Latest commit

 

History

History
62 lines (29 loc) · 1.56 KB

BCS.md

File metadata and controls

62 lines (29 loc) · 1.56 KB

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 https://github.com/diem/diem/tree/master/common/bcs 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>
Implementation
native public fun to_bytes<MoveValue>(v: &MoveValue): vector<u8>;

Module Specification

Native function which is defined in the prover's prelude.

native define serialize<MoveValue>(v: &MoveValue): vector<u8>;