> ## 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.

# Solana Sign Transaction

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

<Snippet file="authorization.mdx" />

## Path Parameters

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

## Request Body

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

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

  <Expandable title="params">
    <ParamField body="transaction" type="string" required>
      Solana transaction encoded string.
    </ParamField>

    <ParamField body="encoding" type="string" required>
      Transaction encoding used. Possible values: `base58`, `base64`.
    </ParamField>
  </Expandable>
</ParamField>

## Response

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

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

  <Expandable title="data">
    <ResponseField name="encoding" type="string">
      Encoding of the signed transaction.
    </ResponseField>

    <ResponseField name="signed_transaction" type="string">
      Fully signed Solana transaction, encoded using the specified encoding. Can be submitted directly to Solana-compatible RPC nodes using the `sendTransaction` method.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.moonkey.fun/v1/wallets/wallet_35ptpWOqO2SnacamII91ecIzmKT/rpc \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "method": "sol_signTransaction",
      "params": {
        "encoding": "base64",
        "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAGDA08vWamfyIoyDhsI9yXdCvPecZ9v0v5euJrLB0K6fjbMxFRGHto/5mWD8A8pcP0XHqpGj8K0Vm5O245V+KqDgps+5nkIR4PjeMZwsR2+Qiefp0oEjWHZp3gMlVOPI7f0o2B49tF+KpAT2ief/W17eIyjcJ+S+7/nCvt5uidaWZUx6cy3d6gYOG8RvmFb/9ot878LyGTQ+hvRoA/69odNeDUycpxa+n4mgf3tLMujqWHDrG/9WPbc6RBUhzDToQWAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAEedVb8jHAbu50xW7OaBUH/bGy3qP0jlECsc2iVrwTj3l4txRFPNPoeusfwJvwZ/ls0tTWm1cTlaqb8Yav+do/jJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+Fm0P/on9df2SnTAmx8pWHneSwmrNt/J3VFLMhqns4zl6IxiJRccY+n9NPLdZvDyol2uSO+Doy45hKJFKMtAVz2GBAcABQLAXBUABwAJA9dxAwAAAAAACgYABAAJBhEBAQgYEQADBAgJCAsIEwASDgMEDw0QEQEMBQIII+UXy5d6460qAQAAABpkAAFAQg8AAAAAAP1pLwAAAAAAMgAAAf1558D6beNj/gjdJig+JU7n5ciKJQoVvFO+Z0PkSEBBBfL2LzIuAwb1MQ=="
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "method": "sol_signTransaction",
    "data": {
      "encoding": "base64",
      "signed_transaction": "ASsuR7sDXtEMREFI4Vq2m4D7zH5aXEXkffVKB7b/A8JX+x0mRxI9UE8NkWuCUSIcf1DjKl06EY37RcOU5xVDugWAAQAGDA08vWamfyIoyDhsI9yXdCvPecZ9v0v5euJrLB0K6fjbMxFRGHto/5mWD8A8pcP0XHqpGj8K0Vm5O245V+KqDgps+5nkIR4PjeMZwsR2+Qiefp0oEjWHZp3gMlVOPI7f0o2B49tF+KpAT2ief/W17eIyjcJ+S+7/nCvt5uidaWZUx6cy3d6gYOG8RvmFb/9ot878LyGTQ+hvRoA/69odNeDUycpxa+n4mgf3tLMujqWHDrG/9WPbc6RBUhzDToQWAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAEedVb8jHAbu50xW7OaBUH/bGy3qP0jlECsc2iVrwTj3l4txRFPNPoeusfwJvwZ/ls0tTWm1cTlaqb8Yav+do/jJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+Fm0P/on9df2SnTAmx8pWHneSwmrNt/J3VFLMhqns4zl6IxiJRccY+n9NPLdZvDyol2uSO+Doy45hKJFKMtAVz2GBAcABQLAXBUABwAJA9dxAwAAAAAACgYABAAJBhEBAQgYEQADBAgJCAsIEwASDgMEDw0QEQEMBQIII+UXy5d6460qAQAAABpkAAFAQg8AAAAAAP1pLwAAAAAAMgAAAf1558D6beNj/gjdJig+JU7n5ciKJQoVvFO+Z0PkSEBBBfL2LzIuAwb1MQ=="
    }
  }
  ```
</ResponseExample>
