SessionKey
Defined in: packages/synapse-core/src/session-key/types.ts:25
Extends
Section titled “Extends”TypedEventTarget<SessionKeyEvents>
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
KeyType extends SessionKeyType |
Properties
Section titled “Properties”account
Section titled “account”
readonlyaccount:Account
Defined in: packages/synapse-core/src/session-key/types.ts:29
address
Section titled “address”
readonlyaddress:`0x${string}`
Defined in: packages/synapse-core/src/session-key/types.ts:27
client
Section titled “client”
readonlyclient: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
connect()
Section titled “connect()”connect: () =>
void
Defined in: packages/synapse-core/src/session-key/types.ts:34
Returns
Section titled “Returns”void
disconnect()
Section titled “disconnect()”disconnect: () =>
void
Defined in: packages/synapse-core/src/session-key/types.ts:35
Returns
Section titled “Returns”void
expirations
Section titled “expirations”
readonlyexpirations:Record<SessionKeyPermissions,bigint>
Defined in: packages/synapse-core/src/session-key/types.ts:31
hasPermission()
Section titled “hasPermission()”hasPermission: (
permission) =>boolean
Defined in: packages/synapse-core/src/session-key/types.ts:32
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
permission | SessionKeyPermissions |
Returns
Section titled “Returns”boolean
rootAddress
Section titled “rootAddress”
readonlyrootAddress:`0x${string}`
Defined in: packages/synapse-core/src/session-key/types.ts:28
syncExpirations()
Section titled “syncExpirations()”syncExpirations: () =>
Promise<void>
Defined in: packages/synapse-core/src/session-key/types.ts:33
Returns
Section titled “Returns”Promise<void>
readonlytype:KeyType
Defined in: packages/synapse-core/src/session-key/types.ts:30
Methods
Section titled “Methods”addEventListener()
Section titled “addEventListener()”addEventListener<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/iso-web@2.1.0/node_modules/iso-web/dist/src/event-target/index.d.ts:29
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "error" | "expirationsUpdated" | "connected" | "disconnected" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null |
options? | boolean | AddEventListenerOptions |
Returns
Section titled “Returns”void
Inherit Doc
Section titled “Inherit Doc”Inherited from
Section titled “Inherited from”TypedEventTarget.addEventListener
dispatchEvent()
Section titled “dispatchEvent()”dispatchEvent(
event):boolean
Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11575
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event | Event |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.dispatchEvent
dispatchTypedEvent()
Section titled “dispatchTypedEvent()”dispatchTypedEvent<
T>(_type,event):boolean
Defined in: node_modules/.pnpm/iso-web@2.1.0/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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends keyof SessionKeyEvents |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
_type | T |
event | SessionKeyEvents[T] |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.dispatchTypedEvent
emit()
Section titled “emit()”emit<
T>(…args):boolean
Defined in: node_modules/.pnpm/iso-web@2.1.0/node_modules/iso-web/dist/src/event-target/index.d.ts:21
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends keyof SessionKeyEvents |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args | SessionKeyEvents[T]["detail"] extends IsAny<SessionKeyEvents[T]["detail"]> ? [T, unknown] : [T, SessionKeyEvents[T]["detail"]] |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.emit
off<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/iso-web@2.1.0/node_modules/iso-web/dist/src/event-target/index.d.ts:55
Alias for TypedEventTarget.removeEventListener
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "error" | "expirationsUpdated" | "connected" | "disconnected" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null |
options? | boolean | EventListenerOptions |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TypedEventTarget.off
on<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/iso-web@2.1.0/node_modules/iso-web/dist/src/event-target/index.d.ts:38
Alias for TypedEventTarget.addEventListener
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "error" | "expirationsUpdated" | "connected" | "disconnected" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null |
options? | boolean | AddEventListenerOptions |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TypedEventTarget.on
removeEventListener()
Section titled “removeEventListener()”removeEventListener<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/iso-web@2.1.0/node_modules/iso-web/dist/src/event-target/index.d.ts:46
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "error" | "expirationsUpdated" | "connected" | "disconnected" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<SessionKeyEvents, T> | null |
options? | boolean | EventListenerOptions |
Returns
Section titled “Returns”void
Inherit Doc
Section titled “Inherit Doc”Inherited from
Section titled “Inherited from”TypedEventTarget.removeEventListener