Polkadot Apps
    Preparing search index...

    Convert a Uint8Array to its lowercase hexadecimal string representation.

    The bytes to encode.

    Hex string (no 0x prefix).

    • Convert byte array to hex string. Uses the built-in function when available and assumes it matches the tested fallback semantics.

      Parameters

      • bytes: TArg<Uint8Array<ArrayBufferLike>>

        bytes to encode

      Returns string

      Lowercase hexadecimal string.

      On wrong argument types. TypeError

      Convert bytes to lowercase hexadecimal.

      bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])); // 'cafe0123'