EthereumMessageSigner

Ethereum message signing and verification. Ethereum and some other wallets support a message signing &verification format, to create a proof (a signature) that someone has access to the private keys of a specific address.

Functions

Link copied to clipboard
open fun signMessage(privateKey: PrivateKey, message: String): String
Sign a message.
Link copied to clipboard
open fun signMessageEip155(privateKey: PrivateKey, message: String, chainId: Int): String
Sign a message with Eip-155 msg type.
Link copied to clipboard
open fun signMessageImmutableX(privateKey: PrivateKey, message: String): String
Sign a message with Immutable X msg type.
Link copied to clipboard
open fun signTypedMessage(privateKey: PrivateKey, messageJson: String): String
Sign a typed message EIP-712 V4.
Link copied to clipboard
open fun signTypedMessageEip155(privateKey: PrivateKey, messageJson: String, chainId: Int): String
Sign a typed message EIP-712 V4 with EIP-155 replay attack protection.
Link copied to clipboard
open fun verifyMessage(pubKey: PublicKey, message: String, signature: String): Boolean
Verify signature for a message.