signTypeData method
Calculates an Ethereum-specific signature.
address
- 20B address
typedData
- message to sign containing type information, a domain separator, and data
Returns a signature.
Implementation
Future<String> signTypeData({
required String address,
required Map<String, dynamic> typedData,
}) async {
final encodedTypedData = jsonEncode(typedData);
final result = await connector.sendCustomRequest(
method: 'eth_signTypedData',
params: [address, encodedTypedData],
);
return result;
}