@exodus/bytes
    Preparing search index...
    • Decode a hex string to bytes

      Unlike Buffer.from(), throws on invalid input

      Parameters

      • string: string

        The hex encoded string (case-insensitive)

      • Optionalformat: "uint8"

        Output format (default: 'uint8')

      Returns Uint8Array

      The decoded bytes

    • Decode a hex string to bytes

      Unlike Buffer.from(), throws on invalid input

      Parameters

      • string: string

        The hex encoded string (case-insensitive)

      • format: "buffer"

        Output format (default: 'uint8')

      Returns Buffer

      The decoded bytes

    • Decode a hex string to bytes

      Unlike Buffer.from(), throws on invalid input

      Parameters

      • string: string

        The hex encoded string (case-insensitive)

      • Optionalformat: OutputFormat

        Output format (default: 'uint8')

      Returns Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>

      The decoded bytes