TypeScript SDK

ERC7702.sessionCreatedEvent

Creates an event object for the SessionCreated event.

Example

import { getContractEvents } from "thirdweb";
import { sessionCreatedEvent } from "thirdweb/extensions/erc7702";
const events = await getContractEvents({
contract,
events: [
sessionCreatedEvent({
user: ...,
newSigner: ...,
})
],
});
function sessionCreatedEvent(filters: Partial) : PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: "user"; readonly type: "address" }, { readonly indexed: true; readonly name: "newSigner"; readonly type: "address" }, { readonly components: readonly [{ readonly name: "signer"; readonly type: "address" }, { readonly name: "isWildcard"; readonly type: "bool" }, { readonly name: "expiresAt"; readonly type: "uint256" }, { readonly components: readonly [{ readonly name: ["Error: Identifier "Unbalanced parentheses. " (uint8 condition, uint64 index, bytes32 refValue, (uint8 limitType, uint256 limit, uint256 period) limit" has too many opening parentheses." cannot contain whitespace."]; readonly type: "Error:" }]; readonly name: ["Error: Identifier "constraints)[] callPolicies" cannot contain whitespace."]; readonly type: "tuple[]" }, { readonly components: readonly [{ readonly name: "target"; readonly type: "address" }, { readonly name: "maxValuePerUse"; readonly type: "uint256" }, { readonly components: readonly [{ readonly name: "limitType"; readonly type: "uint8" }, { readonly name: "limit"; readonly type: "uint256" }, { readonly name: "period"; readonly type: "uint256" }]; readonly name: "valueLimit"; readonly type: "tuple" }]; readonly name: "transferPolicies"; readonly type: "tuple[]" }, { readonly name: "uid"; readonly type: "bytes32" }]; readonly name: "sessionSpec"; readonly type: "tuple" }]; readonly name: "SessionCreated"; readonly type: "event" }>

Parameters

Optional filters to apply to the event.

Type

let filters: Partial;

Returns

let returnType: PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: "user"; readonly type: "address" }, { readonly indexed: true; readonly name: "newSigner"; readonly type: "address" }, { readonly components: readonly [{ readonly name: "signer"; readonly type: "address" }, { readonly name: "isWildcard"; readonly type: "bool" }, { readonly name: "expiresAt"; readonly type: "uint256" }, { readonly components: readonly [{ readonly name: ["Error: Identifier "Unbalanced parentheses. " (uint8 condition, uint64 index, bytes32 refValue, (uint8 limitType, uint256 limit, uint256 period) limit" has too many opening parentheses." cannot contain whitespace."]; readonly type: "Error:" }]; readonly name: ["Error: Identifier "constraints)[] callPolicies" cannot contain whitespace."]; readonly type: "tuple[]" }, { readonly components: readonly [{ readonly name: "target"; readonly type: "address" }, { readonly name: "maxValuePerUse"; readonly type: "uint256" }, { readonly components: readonly [{ readonly name: "limitType"; readonly type: "uint8" }, { readonly name: "limit"; readonly type: "uint256" }, { readonly name: "period"; readonly type: "uint256" }]; readonly name: "valueLimit"; readonly type: "tuple" }]; readonly name: "transferPolicies"; readonly type: "tuple[]" }, { readonly name: "uid"; readonly type: "bytes32" }]; readonly name: "sessionSpec"; readonly type: "tuple" }]; readonly name: "SessionCreated"; readonly type: "event" }>

The prepared event object.