Thrown when EIP-712 typed data passed to Salt.signTypedData is not
a well-formed payload — a missing domain/types/message object, a
primaryType that names no struct in types, or a struct definition that
is not a list of { name, type } fields.
The constructor inspects the payload and records the offending field names on
InvalidTypedData.invalidFields, so consumers can surface a precise
reason without re-validating it themselves. The payload as supplied is
preserved on InvalidTypedData.typedData for debugging.
Thrown when EIP-712 typed data passed to Salt.signTypedData is not a well-formed payload — a missing
domain/types/messageobject, aprimaryTypethat names no struct intypes, or a struct definition that is not a list of{ name, type }fields.The constructor inspects the payload and records the offending field names on InvalidTypedData.invalidFields, so consumers can surface a precise reason without re-validating it themselves. The payload as supplied is preserved on InvalidTypedData.typedData for debugging.
Example