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:

Wallet type boundaries

The core client uses the same lifecycle methods for every supported wallet type. Pass EVM, COSMOS, SOLANA, STELLAR, or SUI to createWallet(). Later methods infer the chain from the wallet ID. See Wallet Lifecycle for creation examples, Sign Messages for message payloads, and Sign Transactions for transaction and raw-byte payloads.
The Sui transaction-signing route returns signature and transaction, but the SDK’s generic signTransaction() TypeScript response declares signedTransaction, txHash, and transactionId. Use the REST route directly when TypeScript code needs the Sui response fields.
For enrolled partners, transfer() can return a sponsored 202 result without signedTransaction. Narrow on executionMode === "sponsored", save transactionId, and use getRestTransaction() to track it. Call resumeRestTransaction(walletId, transactionId, { reviewId }) after a required policy review is approved. See Gas sponsorship for request constraints and safe retry behavior.

Adapters

Adapters are convenience layers, not separate wallet APIs. REST and session-backed signing use different packages: The session-backed packages use an authenticated Para session. They are not REST adapters. After a user claims the wallet, REST signing is no longer available. Use the matching session-backed integration for later signing. For EVM, string messages use signMessage() and typed data uses signTypedData(), so Para performs the EIP-191 or EIP-712 hash. Byte-like messages are EIP-191 hashed locally by both adapters and sent through signRaw(). In viem, a 0x... string is text. Pass { raw: bytes } when it represents bytes. Both EVM adapters support ordinary legacy and EIP-1559 transaction sends. They reject contract deployments, access lists, blob transactions, and authorization-list transactions before calling REST. The Viem adapter also rejects custom transaction serializers. Only the Viem REST account exposes signAuthorization() for EIP-7702. Ethers callers use para.signAuthorization() directly. 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.