Skip to content

convertBytes

Algorand TypeScript


Algorand TypeScript / arc4 / convertBytes

convertBytes<T>(bytes, options): T

Defined in: arc4/index.ts:232

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

"log" | "none"

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

"validate" | "unsafe-cast"

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