ERC7702.createSessionKey

Creates session key permissions for a specified address.

Example

import { createSessionKey } from "thirdweb/extensions/7702";
import { sendTransaction } from "thirdweb";
const transaction = createSessionKey({
account: account,
contract: accountContract,
sessionKeyAddress: TEST_ACCOUNT_A.address,
durationInSeconds: 86400, // 1 day
grantFullPermissions: true,
});
await sendTransaction({ transaction, account });
function createSessionKey(

Parameters

The options for the createSessionKey function.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

The transaction object to be sent.