• Adds "0x" prefix to a given hex string if it's not already present.

    Parameters

    • hex: string

      The hex string to be prefixed.

    Returns string

    The hex string with "0x" prefix.

    Throws

    An error if the input string is not a valid hex string.

Generated using TypeDoc