Skip to content

SessionKey

Defined in: packages/synapse-core/src/session-key/types.ts:25

Type Parameter
KeyType extends SessionKeyType

readonly account: Account

Defined in: packages/synapse-core/src/session-key/types.ts:29


readonly address: `0x${string}`

Defined in: packages/synapse-core/src/session-key/types.ts:27


readonly client: Client<Transport, Chain, { address: `0x${string}`; keyType: KeyType; nonceManager?: NonceManager; publicKey: `0x${string}`; rootAddress: `0x${string}`; sign: (parameters) => Promise<`0x${string}`>; signAuthorization: (parameters) => Promise<SignAuthorizationReturnType>; signMessage: (__namedParameters) => Promise<`0x${string}`>; signTransaction: <serializer, transaction>(transaction, options?) => Promise<`0x${string}`>; signTypedData: <typedData, primaryType>(parameters) => Promise<`0x${string}`>; source: "sessionKey"; type: "local"; }>

Defined in: packages/synapse-core/src/session-key/types.ts:26


readonly expirations: Expirations

Defined in: packages/synapse-core/src/session-key/types.ts:31


hasPermission: (permission) => boolean

Defined in: packages/synapse-core/src/session-key/types.ts:32

ParameterType
permissionPermission

boolean


hasPermissions: (permissions) => boolean

Defined in: packages/synapse-core/src/session-key/types.ts:33

ParameterType
permissionsPermission[]

boolean


readonly rootAddress: `0x${string}`

Defined in: packages/synapse-core/src/session-key/types.ts:28


syncExpirations: () => Promise<void>

Defined in: packages/synapse-core/src/session-key/types.ts:34

Promise<void>


readonly type: KeyType

Defined in: packages/synapse-core/src/session-key/types.ts:30


unwatch: () => void

Defined in: packages/synapse-core/src/session-key/types.ts:44

Stop watching the session key for expirations updates.

void


watch: () => Promise<() => void>

Defined in: packages/synapse-core/src/session-key/types.ts:40

Watch the session key for expirations updates.

Promise<() => void>

A function to stop watching the session key.

addEventListener<T>(type, callback, options?): void

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:29

Type Parameter
T extends "error" | "expirationsUpdated" | "connected" | "disconnected"
ParameterType
typeT
callbackTypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null
options?boolean | AddEventListenerOptions

void

TypedEventTarget.addEventListener


dispatchEvent(event): boolean

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14386

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

MDN Reference

ParameterType
eventEvent

boolean

TypedEventTarget.dispatchEvent


dispatchTypedEvent<T>(_type, event): boolean

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:20

Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

Type Parameter
T extends keyof SessionKeyEvents
ParameterType
_typeT
eventSessionKeyEvents[T]

boolean

TypedEventTarget.dispatchTypedEvent


emit<T>(…args): boolean

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:21

Type Parameter
T extends keyof SessionKeyEvents
ParameterType
argsSessionKeyEvents[T]["detail"] extends IsAny<SessionKeyEvents[T]["detail"]> ? [T, unknown] : [T, SessionKeyEvents[T]["detail"]]

boolean

TypedEventTarget.emit


off<T>(type, callback, options?): void

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:55

Alias for TypedEventTarget.removeEventListener

Type Parameter
T extends "error" | "expirationsUpdated" | "connected" | "disconnected"
ParameterType
typeT
callbackTypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null
options?boolean | EventListenerOptions

void

TypedEventTarget.off


on<T>(type, callback, options?): void

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:38

Alias for TypedEventTarget.addEventListener

Type Parameter
T extends "error" | "expirationsUpdated" | "connected" | "disconnected"
ParameterType
typeT
callbackTypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null
options?boolean | AddEventListenerOptions

void

TypedEventTarget.on


removeEventListener<T>(type, callback, options?): void

Defined in: node_modules/.pnpm/iso-web@2.2.1/node_modules/iso-web/dist/src/event-target/index.d.ts:46

Type Parameter
T extends "error" | "expirationsUpdated" | "connected" | "disconnected"
ParameterType
typeT
callbackTypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null
options?boolean | EventListenerOptions

void

TypedEventTarget.removeEventListener