Skip to content

Commit

Permalink
feat: Sign message
Browse files Browse the repository at this point in the history
  • Loading branch information
reasje committed Aug 6, 2024
1 parent 7e5a18f commit f949a95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions logic/lib/src/domain/repositories/wallet/token_contract.dart
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,16 @@ class TokenContractRepository {
return result;
}

// Used both for signMessage and signPersonalMessage
String signMessage({required String privateKey, required String message}) {
final result = EthSigUtil.signMessage(
message: Uint8List.fromList(message.codeUnits),
privateKeyInBytes: Uint8List.fromList(privateKey.codeUnits),
privateKey: privateKey,
);
return result;
}

Future<TransactionReceipt?> getTransactionReceipt(String hash) async {
return await _web3Client.getTransactionReceipt(hash);
}
Expand Down

0 comments on commit f949a95

Please sign in to comment.