Web3JS Online
Viem Online
Webhooks, Alerts, and a simple API.
The hashMessage function from the viem library is a utility function that calculates an Ethereum-specific hash in EIP-191 format. The function takes a message as input and returns the hashed message in hex format.
The function supports three types of input messages:
Here is an example of how to use the hashMessage function:
The function returns the hashed message in hex format. The hash value is a 32-byte value that is computed using the Keccak-256 hash function, with the message prefixed by the bytes "\x19Ethereum Signed Message:\n" followed by the length of the message in bytes, and then the message itself.
Output will appear here. You can scroll the text if it becomes too long.