Skip to main content

index/functions/calculatePersonalSignPrefix.md

calculatePersonalSignPrefix(message): string

The EIP-191 header for message: "\x19Ethereum Signed Message:\n" + the message's UTF-8 BYTE length. This is what a wallet's personal_sign prepends, and what the chain recomputes when it recovers a personal-signed DTO.

Parameters​

ParameterType
messagestring

Returns​

string