• Signs an EIP-712 typed data object or a JSON string representation of the typed data object.

    Returns

    A promise that resolves to the signature of the typed data object.

    Example

    const signer = ... // Instance of a LitTypeDataSigner
    const msgParams = ... // EIP-712 typed data object or its JSON string representation
    const signature = await signTypedData(signer, msgParams);

    Type Parameters

    • T extends EIP712TypedData

      A generic type that extends the EIP712TypedData interface.

    Parameters

    • signer: LitTypeDataSigner

      An instance of a LitTypeDataSigner, which is used for signing the typed data.

    • msgParams: string | T

      An EIP-712 typed data object that extends EIP712TypedData, or a JSON string representation of the typed data object.

    Returns Promise<string>

Generated using TypeDoc