a message that the address has signed on
the signature after signing the message
import { recoverAddress, getBytes, hashMessage } from "ethers";
const recoverPublicKey = (message, signature) => {
const digest = getBytes(hashMessage(message));
return recoverAddress(digest, signature);
}