> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Signing by Wallet Type

> Send the correct REST transaction or raw-byte payload for EVM, Cosmos, Solana, Stellar, and Sui wallets

For a simple EVM or Solana payment, use `transfer()`: Para builds the transaction and fills in omitted nonce and fees.
Choose [wallet-paid or sponsored gas](https://docs.getpara.com/v3/rest/gas-sponsorship.md#choose-who-pays-gas), and add
[automatic fee retry](https://docs.getpara.com/v3/rest/automatic-retry.md) when you want Para to manage further attempts for a pending wallet-paid payment.

Use `POST /v1/wallets/{walletId}/sign-transaction` for custom EVM, Solana, Stellar, and Sui transaction payloads. The wallet
ID selects the parser. Cosmos does not support this route, so send the exact chain-specific bytes to `sign-raw` instead.

The examples use `ParaRestClient`. The object passed to each SDK method is the JSON body for the matching REST route.
See [REST SDK](https://docs.getpara.com/v3/rest/sdk.md) to initialize the client.

## Sign transactions

### EVM transaction

Pass an unsigned transaction object. REST supports ordinary legacy type `0` and EIP-1559 type `2` transactions.

```typescript theme={null}
const { signedTransaction } = await para.signTransaction(evmWalletId, {
  transaction: {
    to: "0x1111111111111111111111111111111111111111",
    value: "1000000000000000",
    chainId: 11155111,
    type: 2,
    nonce: 0,
    gasLimit: "21000",
    maxFeePerGas: "30000000000",
    maxPriorityFeePerGas: "1000000000",
  },
});
```

Set top-level `broadcast: true` to submit the signed transaction and create a transaction-history record. EVM also
supports `signTypedData()` for EIP-712 and `signAuthorization()` for EIP-7702. Both REST adapters cover message,
transaction, and typed-data signing. Only the Viem REST adapter exposes `signAuthorization()`; ethers callers use the
core client's `para.signAuthorization()` method.

#### Automatic recovery for broadcasts

Add `autoRetry` and a durable `Idempotency-Key` to a supported EVM or legacy Solana `broadcast: true` request. Para returns `202` with `transactionId`, `status`, and retry metadata before signing; poll the same transaction lookup for all attempts. No signed bytes are returned in this mode.

With the REST SDK, call `para.signTransactionWithAutoRetry(walletId, body, { idempotencyKey })`. The `signTransaction()` request type does not accept `autoRetry`.

EVM contract calls retain their original nonce, calldata, value, gas limit and type `2` access list while fees increase within your execution-gas ceiling and deadline. Solana requires a still-valid finalized recent blockhash with verifiable recent anchor history, one wallet signer/fee payer, and exactly one 120000-unit compute limit plus one compute-unit-price instruction. Versioned and durable nonce Solana transactions are excluded. Every attempt requires current permission to sign; an earlier review approval is not blanket replacement authorization.

See [Automatic fee retry](https://docs.getpara.com/v3/rest/automatic-retry.md#recover-a-contract-call-or-caller-built-transaction) for request examples, exact supported shapes and unresolved-outcome handling.

#### Estimate transfer fees

You can send a transfer without estimating fees first. Use an estimate when you want to display the wallet's
expected funding requirement or supply explicit wallet-paid fee settings. Sponsored transfers use Para-selected fees.

Call `POST /v1/wallets/{walletId}/estimate-fee` with the same `to`, `value`, `chainId`, and optional `tokenAddress`
you plan to transfer. EVM responses include `feeOptions.normal` and `feeOptions.urgent`. The top-level transaction
and funding fields match `normal`. Both options use the same quote timestamp and block.

`quote` below is the parsed JSON response from a direct HTTP `estimate-fee` request; `transferRequest` contains the same
transfer parameters. The `@getpara/rest-sdk` `EstimateFeeResponse` type does not expose `feeOptions`,
execution budgets, or quote metadata.

To use a fresh recommendation without copying fee fields, send `urgency: "urgent"` on a wallet-paid EVM transfer.
Omit it or send `"normal"` for normal pricing. The current `@getpara/rest-sdk` `TransferRequest` type does not yet
expose `urgency`, so use a direct HTTP request:

```bash urgent-transfer.sh theme={null}
curl -X POST "https://api.beta.getpara.com/v1/wallets/$WALLET_ID/transfer" \
  -H "X-API-Key: $PARA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $TRANSFER_KEY" \
  -d '{"chainId":"11155111","to":"0x1111111111111111111111111111111111111111","value":"1000000000000","urgency":"urgent"}'
```

To pin an earlier quote instead, copy its `type`, `gasLimit`, and matching fee fields into your transfer request:

```typescript selected-fees.ts theme={null}
const fees = quote.feeOptions.urgent;

const result = await para.transfer(evmWalletId, {
  ...transferRequest,
  sponsoredGas: false,
  type: fees.type,
  gasLimit: fees.gasLimit,
  ...(fees.type === 2
    ? {
        maxFeePerGas: fees.maxFeePerGas,
        maxPriorityFeePerGas: fees.maxPriorityFeePerGas,
      }
    : { gasPrice: fees.gasPrice }),
});
```

Explicit initial prices, including zero, remain pinned even with urgency. Para applies the preference only to
missing prices; a pinned maximum is never increased to fit a generated priority fee. An inconsistent resulting
pair is rejected. Supplying only `type` or `gasLimit` still uses the preference for generated prices.
Supplied fee overrides do not expire or refresh automatically. Selecting fees does not bypass permission checks
or policy approval. Sponsored transfers reject urgency and manual fee fields; use `sponsoredGas: true` without
those fields to require [Para-paid gas](https://docs.getpara.com/v3/rest/gas-sponsorship.md).

The selector also works on [automatic transfer retry](https://docs.getpara.com/v3/rest/automatic-retry.md),
[manual speed-up and cancellation](https://docs.getpara.com/v3/rest/transaction-history.md#manual-evm-recovery), and
[yield deposits and withdrawals](https://docs.getpara.com/v3/rest/yield.md). Explicit urgency is rejected on non-EVM execution and
`sign-transaction`, including its automatic retry mode. Estimate-fee always returns both options and needs no selector.

`urgent` increases the normal EIP-1559 priority fee by 25%, rounded up, and adds that increase to the maximum fee cap.
A zero tip stays zero. For legacy transactions, it increases `gasPrice` by 25%, rounded up. It does not guarantee
inclusion or a confirmation time.

`gasLimit` counts gas units and includes a 20% buffer. Each option's `maxExecutionFeeWei` is the execution-gas ceiling:
`gasLimit × maxFeePerGas` for type `2`, or `gasLimit × gasPrice` for type `0`. Actual gas usage can be lower, and
type `2` can pay less than its fee cap. `estimatedFee` displays the normal ceiling in the native currency's standard units.

For a native transfer, `maxExecutionCostWei` adds the requested transfer value to `maxExecutionFeeWei`. For an ERC-20 transfer,
it equals `maxExecutionFeeWei`; fund the native currency for gas and hold the token amount separately. Read these decimal wei
strings with `BigInt` to avoid rounding. The ceilings exclude separate chain charges, such as L1 data and operator fees
on OP Stack chains. See [OP Stack transaction fees](https://docs.optimism.io/op-stack/transactions/fees).

`quotedAt` records when Para read the RPC fee data and latest block; `blockNumber` identifies that provider block.
Use the ISO timestamp and decimal block number to assess the quote's age. Refresh before signing, especially after
a delay or a change in base fees. The quote does not reserve fees or have a guaranteed validity TTL.
See the [fee-estimate API reference](https://docs.getpara.com/v3/rest/api/signing/estimate-transfer-fee.md) for the response fields.

#### EIP-712 typed data

EIP-712 is EVM-only. Pass the structured domain, types, primary type, and message directly. Para builds and signs the
EIP-712 digest.

```typescript theme={null}
const { signature } = await para.signTypedData(evmWalletId, {
  typedData: {
    domain: {
      name: "MyDApp",
      version: "1",
      chainId: 11155111,
      verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
    },
    types: {
      Mail: [
        { name: "from", type: "address" },
        { name: "to", type: "address" },
        { name: "contents", type: "string" },
      ],
    },
    primaryType: "Mail",
    message: {
      from: "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
      to: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
      contents: "Hello, world!",
    },
  },
});
```

Do not include `EIP712Domain` in `types`; Para derives it from the `domain` fields.

#### EIP-7702 authorization

EIP-7702 authorization signing is EVM-only.

```typescript theme={null}
const authorization = await para.signAuthorization(evmWalletId, {
  authorization: {
    address: "0x1234567890abcdef1234567890abcdef12345678",
    chainId: 1,
    nonce: 0,
  },
});
```

The response includes `r`, `s`, `yParity`, and the combined signature. `yParity` is `0` or `1`, rather than the legacy
EVM `v` value of `27` or `28`. `contractAddress` is accepted as an alias for `address`.

Signing does not apply the authorization on-chain. Once a transaction applies it, the delegation persists until
another authorization replaces or clears it. It does not expire after one transaction, and an execution revert does
not undo an applied delegation. See [Gas sponsorship](https://docs.getpara.com/v3/rest/gas-sponsorship.md) for Para's managed transfer flow.

### Cosmos transaction

The chain-specific `sign-transaction` route does not support Cosmos Direct or Amino sign documents. Construct the exact
bytes required by the target Cosmos signing flow, encode them as hex, and send them through `signRaw()`.

```typescript theme={null}
const { signature } = await para.signRaw(cosmosWalletId, {
  data: cosmosSignBytesHex,
  walletType: "COSMOS",
});
```

> [!WARNING]
>
> `sign-raw` does not add a Cosmos prefix, serialize a sign document, or hash the supplied bytes. Your backend produces
> the exact hex bytes that the target chain expects Para to sign.

### Solana transaction

Pass a base64-encoded serialized Solana transaction. Both legacy `Transaction` and v0 `VersionedTransaction` formats are
accepted and auto-detected.

```typescript theme={null}
const { signedTransaction } = await para.signTransaction(solanaWalletId, {
  transaction: solanaTransactionBase64,
  network: "SOLANA_DEVNET",
  broadcast: false,
});
```

Set `broadcast: true` when Para should submit the transaction and create a transaction-history record. In beta,
`SOLANA_DEVNET` is the supported broadcast network.

### Stellar transaction

Pass a base64-encoded Stellar transaction envelope in XDR format and the exact network passphrase used to build it.

```typescript theme={null}
const { signedTransaction } = await para.signTransaction(stellarWalletId, {
  transaction: stellarTransactionXdr,
  networkPassphrase: "Test SDF Network ; September 2015",
});
```

Para adds the wallet's signature to the envelope and returns signed XDR. Stellar transaction signing is sign-only;
`broadcast: true` is not supported.

### Sui transaction

Pass a base64-encoded BCS serialization of Sui `TransactionData`.

```bash theme={null}
curl -X POST "https://api.beta.getpara.com/v1/wallets/$SUI_WALLET_ID/sign-transaction" \
  -H "X-API-Key: $PARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"transaction\":\"$SUI_TRANSACTION_BASE64\"}"
```

Para returns the serialized Sui signature separately from the unchanged transaction bytes:

```json theme={null}
{
  "signature": "BASE64_SERIALIZED_SUI_SIGNATURE",
  "transaction": "BASE64_BCS_TRANSACTION_DATA"
}
```

Sui transaction signing is sign-only. `broadcast: true` is not supported. `networkPassphrase` is ignored for Sui. The
REST SDK can submit the route through `para.signTransaction()`, but its generic response type models `signedTransaction`.
Use the raw HTTP response when TypeScript code needs typed access to Sui's separate `signature` and `transaction` fields.

## Sign exact bytes

Use `signRaw()` or `POST /v1/wallets/{walletId}/sign-raw` when your backend owns chain-specific serialization and
hashing. The input is hex, and Para signs those exact bytes without adding a prefix or hash.

```typescript theme={null}
const { signature } = await para.signRaw(walletId, {
  data: digestHex,
  walletType: "STELLAR",
});
```

Passing `walletType` is optional, but it is a useful guard: Para rejects the request if it does not match the wallet
referenced by `walletId`.

> [!WARNING]
>
> REST signing is available only while the wallet remains API-key-managed. After the user claims the wallet, sign through
> a user-facing Para SDK and the user's authenticated session instead.

For message payloads, see [Sign messages by wallet type](https://docs.getpara.com/v3/rest/signing.md). See
[Wallet lifecycle by wallet type](https://docs.getpara.com/v3/rest/wallet-lifecycle.md) to create each wallet type, or use the **Endpoints** section
in the REST API navigation for complete request and response schemas.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.