Skip to main content

Usage

Parameters

ParameterTypeRequiredDescription
params.walletAddressstringYesWallet address to query
params.sessionPublicKeystringYesSession public key to query
options.enabledbooleanNoEnable/disable the query (default: true)
Pass null as params to disable the query.

Return Value

PropertyTypeDescription
dataSessionDataResponseSession status from contract
isLoadingbooleanWhether query is in progress
isErrorbooleanWhether an error occurred
errorError | nullError details if any
isSuccessbooleanWhether query succeeded
refetchfunctionManually refetch session data

SessionDataResponse Structure

Example Implementation

Conditional Rendering Based on Session

Auto-Refresh Session Status

This is a read-only query that doesn’t require gas or signatures. It directly calls the smart contract’s view function.
If the session doesn’t exist on-chain, isActive will be false with remainingCalls: 0. This is normal for sessions that were never registered or have been revoked.