Handle signing a message with the provided signer using the 'personal_sign' method.
Validate the address of the signer and the address requested from the payload.
Convert the message from hex to UTF-8, if necessary, and sign it.
If the signature is valid, it returns an object containing the signature.
Returns
A Promise that resolves to an object containing the signature.
Throws
If the addresses do not match or if the signature is invalid.
Parameters
{: ETHHandlerReq
signer, payload } - The input object containing the signer and payload.
Handle signing a message with the provided signer using the 'personal_sign' method. Validate the address of the signer and the address requested from the payload. Convert the message from hex to UTF-8, if necessary, and sign it. If the signature is valid, it returns an object containing the signature.
Returns
A Promise that resolves to an object containing the signature.
Throws
If the addresses do not match or if the signature is invalid.