Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getpara.com/llms.txt

Use this file to discover all available pages before exploring further.

When using pregenerated wallets, session management works differently as these wallets don’t require traditional authentication.

How Sessions Work with Pregenerated Wallets

For pregenerated wallets, the session is considered always active as long as the UserShare is loaded in the Para client instance. Traditional session expiration doesn’t apply in this scenario.
const para = new Para(apiKey);

// Set a pregenerated wallet
await para.setUserShare(userShare);

// Session checks will return true as long as userShare is loaded
const isActive = await para.isSessionActive(); // Always true for pre-gen wallets

Session Management Methods for Pre-Generated Wallets

When a UserShare is loaded via setUserShare(), the session remains active indefinitely. Methods like isSessionActive() will return true as long as the UserShare remains loaded in the Para client instance.

Learn More

Best Practices

  • UserShare Management: Ensure the UserShare remains loaded in the Para instance for continuous session availability
  • Security: Store UserShares securely and never expose them in client-side code
  • Session Verification: Remember that isSessionActive() will always return true for loaded pregenerated wallets