Nyzo techData formatsNormalized sender-data string

Normalized sender-data string

A normalized sender-data string is used to unambiguously specify binary sender data for a transaction.

The sender-data field in a transaction may contain from 0 to 32 bytes, and those bytes often represent a UTF-8 encoded character string. Therefore, many input strings could be ambiguous without further information. For example, "aa" could represent the hexadecimal value aa (decimal 170), or it could simply be a text string, which would be encoded as hexadecimal 6161.

To reduce the probability for confusion, the Nyzo tools will continue to interpret most sender-data input as text strings, encoding them in UTF-8 for storage in the sender-data field. The one exception will be the normalized sender-data string, which will be used to directly specify the byte values of the sender-data field.

A normalized sender-data string is defined as follows.

An empty data field would be represented by a normalized sender-data string with a data section of underscores only.


The character string "Nyzo" would be represented by a normalized sender-data string whose data section begins with hexadecimal representation of the UTF-8 encoding of "Nyzo" and pads the remaining characters with underscores.


The previous two examples can be input properly in all of the Nyzo tools as character strings. Normalized sender-data strings were designed specifically for data that cannot be input properly as character strings. For instance, the Git hash of the first commit containing NTTP-2 is 297632ff2f9c810c2cca1f3a2b3ac320aea04ac9. The correct sender-data field to indicate support for this proposal at that commit would contain the UTF-8 encoding of "NTTP 2: " followed by the bytes of the hash, 297632ff2f9c810c2cca1f3a2b3ac320aea04ac9.


This format was introduced in version 559 for generation of NTTP sender-data fields, and full support across all Nyzo tools will be an ongoing effort.