Sign/Verify a message
You can sign and verify messages in just 1 line of code.
With Cometh Connect, we deploy a smart account for our users.
When you use a smart account, you need to follow the EIP1271 standard for signature verification. You have to call the isValidSignature function available on the smart contract (here is a more detailed explanation). We created a library that facilitates smart account signature verification using viem.
With Connect, we deploy the smart account at the first transaction of the user, allowing to reduce gas cost for our clients (it's a feature called lazy deployment). You might want to verify the signature of a wallet that is not yet deployed.
To facilitate that, we created an endpoint that allows you to verify an account signature, whether the account is deployed or not:
In practice, this is what it looks like:
You can also verify the signature on the client side:
Last updated