Module bytes

Source
Expand description

Module for handling byte arrays in a oracle program compatible way.

Creating a standardized way to handle byte arrays is important for oracle programs, as they are expected to return promises in a specific format.

This module provides a Bytes type that wraps a vector of bytes and implements the ToBytes and FromBytes traits for various types.

Structs§

Bytes
A wrapper around a vector of bytes that provides convenience methods for the format that oracle promises are expected to be in.

Traits§

FromBytes
A trait to convert Bytes into a specific type.
ToBytes
A trait for types that can be converted to the Bytes type.