Algorand TypeScript
    Preparing search index...

    Function convertBytes

    • Interpret the provided bytes as an ARC4 encoded type

      Type Parameters

      Parameters

      • bytes: BytesCompat

        An arc4 encoded bytes value

      • options: { prefix?: "log" | "none"; strategy: "validate" | "unsafe-cast" }

        Options for how the bytes should be converted

        • Optionalprefix?: "log" | "none"

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

        • 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 T