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

# Sign a Tempo transaction

> Sign a Tempo transaction without broadcasting it using Privy embedded wallets

Sign a Tempo transaction without broadcasting it—useful for relaying through a custom
broadcaster or inspecting the signed bytes before submission.

<Info>
  Unlike standard EVM transactions, Tempo transactions use a `calls` array instead of a single
  `to`/`data`/`value`. This enables multiple contract calls to execute atomically in one
  transaction. View the [Tempo transaction
  recipe](/recipes/tempo/send-transactions#using-privy-sdk-or-rest-api) for full examples.
</Info>

<View title="React" icon="react">
  ```tsx theme={"system"}
  import {useWallets} from '@privy-io/react-auth';
  import {useSignTransaction} from '@privy-io/react-auth/tempo';

  const {wallets} = useWallets();
  const {signTransaction} = useSignTransaction();

  const {signedTransaction} = await signTransaction({
    transaction: {
      type: 118,
      chainId: 4217, // use 42431 for Tempo Moderato (testnet)
      feeToken: '0x20c000000000000000000000b9537d11c60e8b50', // pay Tempo fees in USDC-e
      calls: [{to: '0xRecipientAddress', data: '0x...'}]
    },
    wallet: wallets[0]
  });
  ```

  ### Parameters

  <ParamField path="transaction.type" type="118" required>
    Transaction type for Tempo's native envelope.
  </ParamField>

  <ParamField path="transaction.chainId" type="number" required>
    The Tempo chain ID. Use `4217` for mainnet or `42431` for Moderato (testnet).
  </ParamField>

  <ParamField path="transaction.calls" type="TempoCall[]" required>
    An array of calls to execute atomically. At least one call is required. Each call has `to`
    (required), `data`, and `value`.
  </ParamField>

  <ParamField path="transaction.feeToken" type="Hex">
    Address of the supported TIP-20 token used to pay Tempo fees. If omitted, Tempo's [fee-token
    preference rules](https://docs.tempo.xyz/protocol/fees/spec-fee#fee-lifecycle) apply. Tempo has no
    native gas token.
  </ParamField>

  <ParamField path="transaction.nonceKey" type="bigint">
    2D nonce key. Use `0` for the protocol-managed sequential nonce, or a non-zero value to use a
    parallel user nonce slot, enabling concurrent transactions.
  </ParamField>

  <ParamField path="transaction.nonce" type="bigint">
    Sequential nonce within the nonce key slot. Populated automatically if omitted.
  </ParamField>

  <ParamField path="transaction.validBefore" type="bigint">
    Transaction expiration as a Unix timestamp in seconds. The transaction will not be included after
    this time.
  </ParamField>

  <ParamField path="transaction.validAfter" type="bigint">
    Earliest inclusion time as a Unix timestamp in seconds. The transaction will not be included
    before this time.
  </ParamField>

  <ParamField path="transaction.gasLimit" type="bigint">
    Gas limit for the transaction. Estimated automatically if omitted.
  </ParamField>

  <ParamField path="transaction.maxFeePerGas" type="bigint">
    Maximum total fee per gas unit in wei. Estimated automatically if omitted.
  </ParamField>

  <ParamField path="transaction.maxPriorityFeePerGas" type="bigint">
    Maximum priority fee per gas unit in wei. Estimated automatically if omitted.
  </ParamField>

  <ParamField path="wallet" type="ConnectedWallet" required>
    The wallet to sign the transaction with.
  </ParamField>

  <Tip>
    Most apps should omit `nonceKey`. It defaults to `0`, using Tempo's sequential protocol nonce.
    Only set a non-zero value if you need concurrent transactions in parallel nonce slots. [Learn
    more.](/controls/policies/example-policies/tempo#restrict-nonce-key)
  </Tip>

  <Tip>
    When building a relay flow, set `validBefore` to enforce a submission deadline—signed bytes
    submitted after that timestamp will be rejected by the network. [Learn
    more.](/controls/policies/example-policies/tempo#time-bound-a-validity-window)
  </Tip>

  ### Returns

  <ResponseField name="signedTransaction" type="HexString">
    The signed transaction, ready to broadcast.
  </ResponseField>
</View>

<View title="REST API" icon="terminal">
  ```bash theme={"system"}
  curl --request POST https://api.privy.io/v1/wallets/<wallet_id>/rpc \
    -u "<app-id>:<app-secret>" \
    -H "privy-app-id: <app-id>" \
    -H "Content-Type: application/json" \
    -d '{
      "method": "eth_signTransaction",
      "caip2": "eip155:4217",
      "params": {
        "transaction": {
          "type": 118,
          "fee_token": "0x20c000000000000000000000b9537d11c60e8b50",
          "calls": [{"to": "0xRecipientAddress", "data": "0x..."}]
        }
      }
    }'
  ```

  ### Parameters and Returns

  View the [API reference](/api-reference/wallets/ethereum/eth-sign-transaction) for details.
</View>

For full examples, view the [Tempo transaction recipe](/recipes/tempo/send-transactions#3-send-custom-transactions-on-tempo).
