signTypedData
Signs the provided typed data using the inner signer.
Import
import { SessionKeySigner } from "@account-kit/smart-contracts";
Usage
import { SessionKeySigner } from "@account-kit/smart-contracts";
const signer = new SessionKeySigner();
console.log(
await signer.signTypedData({
types: {
Message: [{ name: "content", type: "string" }],
},
primaryType: "Message",
message: { content: "Hello" },
})
);
Parameters
params
TypedDataDefinition<TTypedData, TPrimaryType>
The parameters containing the typed data definition and primary type.
Returns
Promise<string>
A promise that resolves to the signed typed data as a string.