signTypedData

Signs a typed data object with a given private key according to EIP712.

Example

import { signTypedData } from "thirdweb/utils";
signTypedData({
privateKey: "0x...",
...typedData,
});
function signTypedData(
options: SignTypedDataOptions<typedData, primaryType>,
): Hex;

Parameters

The typed data is passed within options alongside the private key

Type

let options: SignTypedDataOptions<typedData, primaryType>;

Returns

let returnType: ox__Hex.Hex;

The signature as a hex string