getEip712Signature function

Future<Map<String, dynamic>> getEip712Signature(
  1. Wallet wallet,
  2. String hash,
  3. bool isDomainEmpty
)

Implementation

Future<Map<String, dynamic>> getEip712Signature(
  Wallet wallet,
  String hash,
  bool isDomainEmpty,
) async {
  // final typeInformation = getTypeInformation();

  // TODO: Make chain id dynamic
  int chainId = 2013;

  // final domain = getDomainInformation(chainId);

  // sign a message using EIP712

  final signedMessage = "";

  final verificationProof = isDomainEmpty
      ? '$SIG_TYPE_V2:$signedMessage'
      : '$SIG_TYPE_V2:$chainId:$signedMessage';

  return {'verificationProof': verificationProof};
}