Ethereum Signed Message hashing
import { hashMessage } from "thirdweb/utils";const hash = hashMessage("hello world");
function hashMessage<TTo extends To = "hex">( message: SignableMessage, to_?: TTo,): HashMessage<TTo>;
The message to hash, either as a string, a Uint8Array, or an object with a raw property containing a Uint8Array.
raw
let message: SignableMessage;
The desired output format of the hash (optional). Defaults to 'hex'.
let to_: TTo;
let returnType: HashMessage<TTo>;
The Ethereum Signed Message hash of the message in the specified format.