index/functions/signPersonalMessage.md
signPersonalMessage(
privateKey,prefix,message):string
Personal-sign hash and signature: keccak256(prefix + message), both hashed VERBATIM with no
further EIP-191 wrapping. Passing prefix = calculatePersonalSignPrefix(message) reproduces a
wallet's personal_sign of message. Gala Wallet's gala_signChainDto (personal-sign
scheme) hashes prefix + the exact string it is handed, which can differ from the bare message
(see the signatureOverPrefixlessBody vectors); that quirk is why the two inputs stay separate.
private key calculate personal sign prefix gala chain dto signature over prefixless body
Parameters
| Parameter | Type |
|---|---|
privateKey | Uint8Array |
prefix | string |
message | string |
private key uint8 array
Returns
string