Currently I am integrating a solution that requires the user to sign a message in order to verify their identity. The solution is currently based on the breacon-sdk. The message is prefixed with 04 according to Sign Payload HEX Prefixed With 05 and formatted according to Generating a signature with Beacon SDK.

The issue we are facing currently is that the message we are displaying to the user in a way that that the new line characters of "\n" are not displayed with new line, instead they are displayed as "\n". This is the case only is some wallets, like: Temple browser extension, Kukai, Umami desktop app.

Our original raw is:

Welcome to Mailchain!

Please sign to start using this address with Mailchain. This will not trigger a blockchain transaction or cost any gas fees.

What's happening?
A messaging key will be registered with this address and used only for messaging. It will replace any existing registered messaging keys.

Technical Details:
Address: tz1P1xs3qkYNk6cBW273W2UbEVhpWYbwxwZ6
Messaging key: 0xe27bc7aaff2005e0d6530fcff163e046cd450259b1db284680c40cd4388f13017a
Nonce: 14

This results in byte payload of:


The final message that is displayed to the user is the same as the original, only difference being that the new lines are not shown, instead there are \n in their places. The final signature is done against the correct payload and the signature is verified successfully.

Is there are way to get the new line characters (line terminators) to be displayed with new line instead of like a character?

1 Answer 1


That message is not formatted as described in the documentation you are referring to. You are missing the Tezos Signed Message: string prefix. If you fix that, Kukai will respect the \n character.

Kukai with correct prefix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.