convertBytes
Algorand TypeScript / arc4 / convertBytes
convertBytes<
T>(bytes,options):T
Defined in: arc4/index.ts:232
Interpret the provided bytes as an ARC4 encoded type
Type Parameters
Section titled “Type Parameters”T extends ARC4Encoded
Parameters
Section titled “Parameters”An arc4 encoded bytes value
options
Section titled “options”Options for how the bytes should be converted
prefix?
Section titled “prefix?”"log" | "none"
The prefix (if any), present in the bytes value. This prefix will be validated and removed
strategy
Section titled “strategy”"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
Returns
Section titled “Returns”T