StoredSession

data class StoredSession(val credentialId: String, val contractId: String, val connectedAt: Long, val expiresAt: Long)

A stored user session for silent reconnection.

Sessions enable users to reconnect to their smart account wallet without re-authentication, as long as the session has not expired.

Example:

val session = StoredSession(
credentialId = "base64url-encoded-id",
contractId = "CBCD1234...",
connectedAt = currentTimeMillis(),
expiresAt = currentTimeMillis() + (7 * 24 * 60 * 60 * 1000) // 7 days
)

if (!session.isExpired) {
// Silently reconnect
}

Constructors

Link copied to clipboard
constructor(credentialId: String, contractId: String, connectedAt: Long, expiresAt: Long)

Properties

Link copied to clipboard

When the session was established (milliseconds since epoch).

Link copied to clipboard

The smart account contract address.

Link copied to clipboard

The credential ID associated with this session.

Link copied to clipboard

When the session expires (milliseconds since epoch).

Link copied to clipboard

Whether the session has expired.