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

# Ethereum Sign Transaction

> Sign an Ethereum transaction using a managed wallet. A managed wallet means the private key is never exposed to the client and is always stored encrypted in the vault.

<Snippet file="authorization.mdx" />

## Path Parameters

<ParamField path="wallet_id" type="string" required>
  Unique ID of the wallet used to sign the transaction.
</ParamField>

## Request Body

The request uses an Ethereum JSON-RPC–compatible payload.

<ParamField body="method" type="string" required>
  Must be `eth_signTransaction`.
</ParamField>

<ParamField body="params" type="object" required>
  Parameters for the RPC call.

  <Expandable title="params">
    <ParamField body="transaction" type="object" required>
      The transaction object is compatible with the Ethereum `eth_signTransaction` / MetaMask transaction format.

      <Expandable title="transaction">
        <ParamField body="to" type="string" required>
          Recipient address (hex, 0x-prefixed).
        </ParamField>

        <ParamField body="value" type="string" required>
          Amount in wei (hex).
        </ParamField>

        <ParamField body="nonce" type="string" required>
          Transaction nonce (hex).
        </ParamField>

        <ParamField body="gasPrice" type="string" required>
          Gas price in wei (hex).
        </ParamField>

        <ParamField body="gas" type="string" required>
          Gas limit (hex).
        </ParamField>

        <ParamField body="chainId" type="string" required>
          Ethereum chain ID (hex).
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="method" type="string">
  RPC method that was executed (`eth_signTransaction`).
</ResponseField>

<ResponseField name="data" type="object">
  Signed transaction data.

  <Expandable title="data">
    <ResponseField name="encoding" type="string">
      Encoding format of the signed transaction (`rlp`).
    </ResponseField>

    <ResponseField name="signed_transaction" type="string">
      Fully signed, serialized raw transaction (hex). Can be broadcast using `eth_sendRawTransaction`.
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Private keys are never exposed or returned.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.moonkey.fun/v1/wallets/wallet_36kLvUkIIvyQPbdVr7Ackvh726L/rpc \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "method": "eth_signTransaction",
      "params": {
        "transaction": {
          "to": "0xE9534C9fAF3cDBc636c25E1981A80EfaE03f187a",
          "value": "0x38d7ea4c68000",
          "nonce": "0x05",
          "gasPrice": "0xdf8475800",
          "gas": "0x5208",
          "chainId": "0x5"
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "method": "eth_signTransaction",
    "data": {
      "encoding": "rlp",
      "signed_transaction": "0xf86b05850df847580082520894e9534c9faf3cdbc636c25e1981a80efae03f187a87038d7ea4c68000802da086b0ec61705e3b7c583c09704317733a17dcb8a8101dd26c393a553214bede0da039e23209b1af42aba9e82d5f3601d0f1ba6155cb46004e968205cce54c6a241b"
    }
  }
  ```
</ResponseExample>
