A utility function for signing EIP-712 typed data using an Ethereum wallet that does not support EIP-712.

Throws an error if the runLitAction function is not found in the signer object.

  • Type Parameters

    • T

      The type of the message parameters.

    Parameters

    • signer: LitTypeDataSigner

      An Ethereum wallet signer that does not support EIP-712.

    • msgParams: any

      The parameters of the EIP-712 message.

    Returns Promise<string>

    • The signature of the message. This function computes the message hash using the typedSignatureHash function from the eth-sig-util library. It then uses the runLitAction function of the signer object to sign the hash. The function returns the encoded signature.