MessageFormat class
What the body's bytes are, which the off-chain header states and a verifier may enforce.
The numbers here are this proto's own, not the standard's: the standard writes restricted ASCII as format byte 0 and UTF-8 as 1, and the header byte comes from a mapping rather than from this value. UTF-8 sits at 0 so that an input naming no format keeps signing the bytes it signed before this field existed.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
This enum's name, as specified in the .proto file.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
This enum's integer value, as specified in the .proto file.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns this enum's
nameor thevalueif names are not represented.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
valueOf(
int value) → MessageFormat?
Constants
- MessageFormat_restricted_ascii → const MessageFormat
-
Restricted ASCII (header byte 0): every byte printable ASCII, 0x20..=0x7e. That excludes
the newline and the tab, so a
StructuredMessageof more than one line cannot be signed in this format, and a body that needs one is refused rather than silently mislabeled. What it buys is the only format a hardware wallet displays, so the person approving reads the message instead of signing a hash they cannot check. - MessageFormat_utf8 → const MessageFormat
- UTF-8 (header byte 1). Carries anything a string can hold, including the newline a labeled body is built from. A hardware wallet cannot render it, so approving one is blind-signing.
-
values
→ const List<
MessageFormat>