Skip to main content
The Para Server SDK enables secure server-side blockchain operations across different JavaScript runtime environments. With nearly identical functionality to client-side implementations, the server SDK allows you to perform signing operations server-side by either importing client-side sessions or using pregenerated wallets.

Installation

Install the Para Server SDK in your preferred JavaScript runtime environment:
npm install @getpara/server-sdk --save-exact
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:
import { Para as ParaServer } from "@getpara/server-sdk";

// Standard initialization for Node.js 
const paraServer = new ParaServer("YOUR_API_KEY");

Runtime Compatibility

The Server SDK works across multiple JavaScript runtimes. Some runtimes require additional constructor options:
RuntimedisableWebSocketsNotes
Node.jsNot neededFull support out of the box
BunRequiredBun’s WebSocket implementation is incompatible with the SDK’s internal transport
DenoRequiredSame as Bun — the SDK falls back to HTTP polling
Cloudflare WorkersRequiredWorkers runtime doesn’t support persistent WebSocket connections
If you omit disableWebSockets: true in Bun, Deno, or Cloudflare Workers, the SDK may fail silently or hang during signing operations. Always set this option for non-Node.js runtimes.
Signing performance tip: Para’s signing infrastructure runs in us-east-1. For the lowest latency on server-side signing operations, deploy your application servers in or near that region.
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/
Pre-warm the MPC signer: The first signing operation loads the MPC WASM module and spawns a worker thread, which adds latency. Call initializeWorker() after setup to pre-warm the signer so subsequent signing calls are fast:
const paraServer = new ParaServer("YOUR_API_KEY");
await paraServer.initializeWorker();

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:
// Client-side
const serializedSession = await para.exportSession();
// Send this string to your server endpoint
This serialiazed sessions tring can then be sent to your server via an API endpoint or any other secure method.
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.
Then, on your server, import the serialized session to create a functional server-side client:
// Server-side
await paraServer.importSession(serializedSession);
With a session no loaded into the para server instance, you can now perform all operations that the Para Server SDK supports.

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.
import { WalletType } from "@getpara/server-sdk";

await paraServer.createPregenWallet({
  type: 'EVM', // or 'SOLANA', 'COSMOS', 'STELLAR'
  pregenId: { email: "user@example.com" },
});
When using pregenerated wallets, you’ll need to manage the user share of the wallet and store it securely.
Learn more about pregen wallets and their usage on the server in our pregen wallets guide.

Examples

Explore our example implementations of the Para Server SDK across different runtime environments:

Troubleshooting

If you encounter issues while setting up the Para Server SDK, check out our troubleshooting guide:

Next Steps

Once your Para Server SDK is set up and authenticated, you can start performing blockchain operations. The server SDK provides the same functionality as the client SDK, allowing you to: