@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.
Install
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.
Omit idempotencyKey when calling estimateFee(): estimates are not cached. A key already bound to a sponsored or
automatic-retry transfer returns 409 IDEMPOTENCY_CONFLICT.
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. PassEVM, 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.Sponsored transfers
Gas is the network’s processing fee, separate fromvalue, the amount sent to the recipient. Transfer amounts use
the asset’s smallest units: for USDC with 6 decimals, value: "1000000" sends 1 USDC. Wallet-paid transfers need the
chain’s native currency for gas, such as ETH on Ethereum, even when sending USDC.
Set sponsoredGas: true on the transfer body to require Para-paid gas, or sponsoredGas: false for wallet-paid gas.
With true, send the recipient, amount, and supported chain/token; Para manages nonce, gas limits, fees, and submission.
Caller-supplied nonce, gas/fee/type fields, or autoRetry return errors instead of being ignored or silently dropped.
Omitting it selects wallet-paid execution, even for enrolled partners. Only explicit true requests sponsorship.
Set false or omit the flag to use supported wallet-paid fields such as initiatorUserId. EVM sponsorship rejects network.
Unsupported explicit sponsorship returns 400 SPONSORSHIP_UNSUPPORTED_REQUEST; temporarily unavailable admission
returns 503 SPONSORSHIP_UNAVAILABLE. Neither falls back to wallet-paid execution. Do not combine sponsorship with autoRetry.
For Para-paid network gas, use Gas sponsorship; see its billing details
for charges to your organization. For a wallet-paid payment whose fees Para can adjust while it is pending, use
Automatic fee retry. TransferRequest does not expose autoRetry, so use that guide’s direct
HTTP examples for transfers. For a transaction you build, call signTransactionWithAutoRetry(). For yield, set
autoRetry on the yield request. Automatic fee retry is separate from retrying an HTTP request with its saved idempotency key.
The Solana Devnet pilot is separately gated and does not imply deployed
availability. After Para confirms Beta rollout and enrollment, use its direct HTTP example with sponsoredGas: true
and network: "SOLANA_DEVNET"; do not assume your installed SDK exposes this pilot shape. It supports allowlisted
classic SPL transfers between existing associated token accounts, with sponsored network fees only. Mainnet,
Token-2022, native SOL and account-creation rent are excluded. Partners with wallet policies enabled need
Permissions v2 for this flow. The same durable tracking and review/resume contract applies, without an EVM UserOperation hash.
Sponsored transfer() calls return a 202 result without signedTransaction; acceptance does not mean payment completion. Narrow with
isSponsoredTransfer(result) from @getpara/rest-sdk, save transactionId, and use getRestTransaction() to track it. Call
resumeRestTransaction(walletId, transactionId, { reviewId }) after you approve the policy review.
See Gas sponsorship for request constraints and safe retry behavior.
Ordinary SDK transfers return sponsoredGas: false with signed bytes. Read signedTransaction only when isSponsoredTransfer(result) is false;
sponsored and HTTP automatic-retry responses do not contain signed bytes.
sponsoredGas is optional in SDK response types for older API compatibility. The helper reads the Boolean first
and falls back to the deprecated response-only executionMode when it is absent. Do not send executionMode in requests: the API rejects it with 400.
Adapters
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 sign legacy and EIP-1559 transactions. They reject contract deployments and access lists before
calling REST. From @getpara/rest-sdk 3.27.0, the Viem adapter accepts a chain serializer whose output equals viem’s
standard serialization, such as on Base and other OP Stack chains. It rejects chain-specific transactions, such as OP
Stack deposits, Celo feeCurrency transactions, and ZKsync EIP-712 transactions, before calling REST. Earlier versions
reject the serializer that viem passes on Base and other OP Stack chains, so send those transactions with the REST
client’s transfer() or signTransaction(). 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.
ParaRestSponsorshipError means a successful transfer response did not match the requested gas payer, including
unexpectedly sponsored execution when sponsoredGas was false or omitted, or wallet-paid execution when it was true.
Its response preserves the original transfer result for reconciliation. The transaction may already have
been submitted: inspect that result and track its transaction ID instead of automatically retrying with a new key.
The SDK’s response check cannot undo a broadcast or substitute for the API’s sponsorship guarantee.
Example
The typed SDK example creates REST wallets and demonstrates core client, ethers, viem, and Solana adapters: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 HTTP request retries, or user-share encryption helpers. Use@getpara/server-sdk for
migrateWalletShare() and share-backed server flows.