starcoin-framework

Module 0x1::BCS

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

Function to_bytes

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

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

Function to_address

Return the address of key bytes

public fun to_address(key_bytes: vector<u8>): address
Implementation
native public fun to_address(key_bytes: vector<u8>): address;

Module Specification

pragma verify;
pragma aborts_if_is_strict;

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