Checks if a string is a valid Ethereum transaction hash.
A valid transaction hash must be 66 characters long (including the '0x' prefix)
and must be a valid hexadecimal string. This function leverages viem's isHex utility
for hex validation.
Parameters
str: string
The string to check
Returns boolean
True if the string is a valid transaction hash, false otherwise
Example
// Check a valid transaction hash isValidTransactionHash('0x4a81638d3cc0d169cb559d165c166f832e2e749847b91d96094f958e8c2b9f91'); // Returns: true
Checks if a string is a valid Ethereum transaction hash.
A valid transaction hash must be 66 characters long (including the '0x' prefix) and must be a valid hexadecimal string. This function leverages viem's isHex utility for hex validation.