Skip to content

convertBytes

convertBytes<T>(bytes, options): T

Defined in: arc4/index.ts:241

Interpret the provided bytes as an ARC4 encoded type

T extends ARC4Encoded

BytesCompat

An arc4 encoded bytes value

Options for how the bytes should be converted

"none" | "log"

The prefix (if any), present in the bytes value. This prefix will be validated and removed

"unsafe-cast" | "validate"

The strategy used for converting bytes. unsafe-cast: Reinterpret the value as an ARC4 encoded type without validation validate: Asserts the encoding of the raw bytes matches the expected type

T