Eip712TypedData class
Represents typed data for EIP-712, implementing the EIP712Base interface.
- Implemented types
Constructors
-
Eip712TypedData({required Map<
String, List< types, required String primaryType, required Map<Eip712TypeDetails> >String, dynamic> domain, required Map<String, dynamic> message, EIP712Version version = EIP712Version.v4}) -
Constructor for Eip712TypedData.
const
-
Eip712TypedData.fromJson(Map<
String, dynamic> json, {EIP712Version version = EIP712Version.v4}) -
factory
Properties
-
domain
→ Map<
String, dynamic> -
Domain parameters for the EIP-712 typed data.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
message
→ Map<
String, dynamic> -
Message data for the EIP-712 typed data.
final
- primaryType → String
-
The primary type for the typed data.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
types
→ Map<
String, List< Eip712TypeDetails> > -
Map of type names to their corresponding list of type details.
final
- version → EIP712Version
-
The version of the EIP-712 specification used.
final
Methods
-
encode(
{bool hash = true}) → List< int> -
Encodes the typed data into a bytes, optionally hashing the result.
If
hash
is true (default), the result is hashed using Keccak-256.override -
encodeHex(
{bool hash = true}) → String -
Encodes the data into a hex according to EIP-712.
hashing encoded type bytes using
QuickCrypto.keccack256Hash
override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited