Skip to main content
@getpara/rest-sdk is Para’s typed SDK for REST API wallets. Use it from trusted backend code when your server owns API-key-backed wallet creation, lookup, signing, transfers, and transaction history.
This SDK sends your partner API key as X-API-Key. Never import it from browser, React, mobile, wagmi, RainbowKit, or any user-controlled runtime.

Install

The core client works in Node.js 18+ or any server runtime where you inject fetch. Install adapter peers only when you use those subpaths:

Choose the Right SDK

Core Client

env accepts PROD, BETA, or { baseUrl }. Each request sends X-API-Key and X-Request-Id. Idempotency-Key is caller-supplied; the SDK does not retry requests or generate idempotency keys internally. Pass AbortSignal per call when your server needs a request deadline:

Adapters

EVM message and typed-data signing send unhashed payloads to REST. Para hashes EIP-191 and EIP-712 payloads server-side. EVM transaction adapters support ordinary legacy and EIP-1559 sends; they reject contract deployments, access lists, blob transactions, authorization-list transactions, and custom viem serializers before calling REST. With viem, string messages are treated as text. Pass { raw: bytes } when a 0x... value should be signed as bytes. The Solana adapter implements Solana v2 signer traits by signing message bytes through sign-raw. For broadcasted transactions, call para.signTransaction(walletId, { transaction, broadcast: true }) or para.transfer(...).

Errors

ParaRestValidationError is thrown before fetch for missing local required fields or unsupported adapter inputs. ParaRestSerializationError means the request body cannot be JSON serialized. HTTP errors become ParaRestError with status, code, requestId, and parsed body.

Example

The typed SDK example creates REST wallets and demonstrates core client, ethers, viem, and Solana adapters:
Use examples-hub/server/rest-with-node when you want to inspect the raw HTTP baseline.

Trust Boundary

REST signing uses the wallet ID and your partner API key. Your backend is responsible for deciding which end user or job is allowed to request a wallet operation before calling Para. The SDK validates local required fields and normalizes adapter inputs, but it does not independently reconstruct or audit every signed transaction returned by REST.

Non-goals

The REST SDK does not include browser connectors, React hooks, wagmi or RainbowKit integration, mobile auth, hosted UI, client-side sessions, automatic retries, or user-share encryption helpers. Use @getpara/server-sdk for migrateWalletShare() and share-backed server flows.