Installation
Install the Para Server SDK in your preferred JavaScript runtime environment:Why
--save-exact? The Para Server SDK may publish breaking changes in minor versions during active development.
Pinning the exact version prevents unexpected breakage when you install or update dependencies.Initialization
Initialize the Para Server SDK with your API key. The initialization process varies slightly depending on your runtime environment:Runtime Compatibility
The Server SDK works across multiple JavaScript runtimes. Some runtimes require additional constructor options:| Runtime | disableWebSockets | Notes |
|---|---|---|
| Node.js | Not needed | Full support out of the box |
| Bun | Required | Bun’s WebSocket implementation is incompatible with the SDK’s internal transport |
| Deno | Required | Same as Bun — the SDK falls back to HTTP polling |
| Cloudflare Workers | Required | Workers runtime doesn’t support persistent WebSocket connections |
If you’re using a legacy API key (one without an environment prefix) you must provide the
Environment as the first argument to the ParaServer constructor. You can retrieve your updated API key from the Para Developer Portal at https://developer.getpara.com/Authentication Methods
After initializing the Para Server SDK, you need to authenticate it before performing any operations. The server SDK supports two authentication methods:Option 1: Importing Client Sessions
Import an active session from your client application to create a server-side replica that can perform the same operations. First, in your client application, export the active session to get a serialized string:If signing on the server isn’t required, you can pass
{ excludeSigners: true } as an argument to exportSession to remove the signer data from the exported wallets:await para.exportSession({ excludeSigners: true }); before sending it to your server.Option 2: Using Pregenerated Wallets
Generate and use deterministic wallets server-side without requiring client-side authentication. This pregen wallet will load the para server instance with a wallet that can be used for all operations that the Para Server SDK supports.When using pregenerated wallets, you’ll need to manage the user share of the wallet and store it securely.