Skip to main content

Flush Username Signature Structure

To authorize the flushUsername operation within the MNS service, the user who currently owns the username must generate a cryptographic signature compliant with the EIP-191.

This signature proves the current username owner's intent and authorization to permanently delete their username registration and all associated data from the MNS service. This is an irreversible action.

Signed Message Format

The message is constructed by concatenating the following components as strings, separated by commas (,):

string.concat(
"d22c816c",
",",
username,
",",
Strings.toString(nonce)
)

1. MNS Flush Username Identifier (Hex String):

  • Value: d22c816c
  • Purpose: A specific identifier used within the EIP-191 framework to distinguish MNS flushUsername messages from other types of signed messages.

2. Target Username (String):

  • Value: The username string itself.
  • Purpose: Specifies the username registration that the owner is authorizing to be permanently flushed and deleted from the system.

3. MNS Nonce (String):

  • Value: The result of Strings.toString(nonce).
  • Purpose: The string representation of the current username owner's nonce specific to the MNS contract for this flushUsername action. This prevents replay attacks of the irreversible deletion operation.
tip
  • Strings.toString(uint256 _input): Assumed utility function that converts a uint256 value into its decimal string representation.