---
updatedAt: 2025-07-26T15:18:15.000Z
agentTools:
  projectIndex: https://docs.metakeep.xyz/llms.txt
---

# Sign Transaction

/v2/app/sign/transaction

Using this API developers can self-sign custom transactions.

# Sign EVM Transaction

Follows [eth\_signtransaction](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_signtransaction) specification to sign developer transactions. Here's what the response looks like:

```json Sign EVM Transaction Response
{
  "status": "SUCCESS",
  "signature": "0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa7714de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f76600",
  "signedRawTransaction": "0x02f86c8189018203e78203e8179497706df14a769e28ec897dac5ba7bcfa5aa9c444822710850123456789c080a06af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77a014de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766",
  "transactionHash": "0xd6dac05483cb102f4f0fafe2b172f17da2cbb9cf7fa2b97d7b8f332abaa0ec04",
  "r": "0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77",
  "v": "0x0",
  "s": "0x14de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766"
}
```

A signature is a hex-encoded 65-byte array starting with 0x.

The signature encodes the r, s, and v parameters from Appendix F of the yellow paper in big-endian format. Bytes 0…32 contain the r parameter, bytes 32…64 the s parameter, and the last byte the v parameter.

Note that the `v` parameter includes the chain id as specified in EIP-155.

# Sign Solana Transaction

To sign a Solana transaction, send the serialized transaction message in a transaction object. Here's what the request and response look like:

> 👍 Solana versioned transactions are supported

```json Sign Solana Transaction Request
{
  "transactionObject": {
    // Serialized transaction message in hex format.
    // You can get this by calling `transaction.serializeMessage().toString("hex")`
    // For versioned transaction, convert `transaction.message.serialize()` to a `0x` prefixed hex string
    "serializedTransactionMessage": "0x010001034cb5abf6ad79fbf5abbccafcc269d85cd2651ed4b885b5869f241aedf0a5ba2900000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000301020200010c02000000e803000000000000"
  },
  "reason": "test"
}
```
```json Sign Solana Transaction Response
{
  "status": "SUCCESS",
  // Signature in hex format
  "signature": "0x023d9a5700b77971b8de539936143e0d82808809b856cc9ab9bcc41a02a3794ec516a44db6ed666f3e4f7549ae91939062ce076a9ef419febc21c41eebb98f0a"
}
```

# Sign EOS Transaction

To sign an EOS transaction, send the `rawTransaction` in a transaction object. If the signature generation also requires a chainId, you can send it in the `extraSigningData` field. **Note that the action data needs to be sent as a serialized hex string.**

Here's what the request and response look like:

```json Sign EOS Transaction Request
{
  "transactionObject": {
    "rawTransaction": {
      "expiration": "2023-05-06T01:23:45",
      "ref_block_num": 12345,
      "ref_block_prefix": 67890,
      "max_net_usage_words": 0,
      "max_cpu_usage_ms": 0,
      "delay_sec": 0,
      "context_free_actions": [],
      "actions": [
        {
          "account": "eosio.token",
          "name": "transfer",
          "authorization": [
            {
              "actor": "myaccount",
              "permission": "active"
            }
          ],
          // Send action data as a serialized hex string.
          "data": "0000000000ea305500000000487a2b000000000000000004454f530000000000"
        }
      ],
      "transaction_extensions": []
    },
    "extraSigningData": {
      // If chainId is part of the signature generation,
      // send it inside extraSigningData field.
      "chainId": "b20901380af44ef59c5918439a1f9a41d83669020319a80574b804a5f95cbd7e"
    }
  },
  "reason": "test"
}
```
```json Sign EOS Transaction Response
{
  "status": "SUCCESS",
  "signature": "SIG_K1_K1YY3maW1vHjQmmtciiQkkzPaUcpPdCQ631oMqayz4Z3TG9xhjNQwzqL3VCQPV1ZfYTQ14hkoRBkFaUwwrAngLedAxhog6"
}
```

> 🚧 Api Error Status
>
> You can find error status returned by the api [here](https://docs.metakeep.xyz/reference/api-error-status#v2appsigntransaction).

© Copyright 2024, Passbird Research Inc.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "production",
    "version": "3.4"
  },
  "servers": [
    {
      "url": "https://api.metakeep.xyz/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/app/sign/transaction": {
      "post": {
        "summary": "Sign Transaction",
        "description": "/v2/app/sign/transaction",
        "operationId": "v2apptransactionsign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactionObject",
                  "reason"
                ],
                "properties": {
                  "transactionObject": {
                    "type": "string",
                    "description": "The transaction data object. This follows the specification of `transactionObject` as specified by [Ethereum](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_signtransaction) for EVM chains. For Solana chains, send the serialized transaction message as described above.",
                    "format": "json"
                  },
                  "reason": {
                    "type": "string",
                    "description": "The human readable explanation for this transaction. Useful for presenting to the user as an extra information ex: \"Swap wBTC to USDC\", and for auditing purposes."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "EVM response": {
                    "value": "{\n  \"status\": \"SUCCESS\",\n  \"signature\": \"0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa7714de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f76600\",\n  \"signedRawTransaction\": \"0x02f86c8189018203e78203e8179497706df14a769e28ec897dac5ba7bcfa5aa9c444822710850123456789c080a06af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77a014de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766\",\n  \"transactionHash\": \"0xd6dac05483cb102f4f0fafe2b172f17da2cbb9cf7fa2b97d7b8f332abaa0ec04\",\n  \"r\": \"0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77\",\n  \"s\": \"0x14de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766\",\n  \"v\": \"0x0\"\n}"
                  },
                  "Solana response": {
                    "value": "{\n  \"status\": \"SUCCESS\",\n  \"signature\": \"0x023d9a5700b77971b8de539936143e0d82808809b856cc9ab9bcc41a02a3794ec516a44db6ed666f3e4f7549ae91939062ce076a9ef419febc21c41eebb98f0a\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "EVM response",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "signature": {
                          "type": "string",
                          "example": "0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa7714de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f76600"
                        },
                        "signedRawTransaction": {
                          "type": "string",
                          "example": "0x02f86c8189018203e78203e8179497706df14a769e28ec897dac5ba7bcfa5aa9c444822710850123456789c080a06af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77a014de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766"
                        },
                        "transactionHash": {
                          "type": "string",
                          "example": "0xd6dac05483cb102f4f0fafe2b172f17da2cbb9cf7fa2b97d7b8f332abaa0ec04"
                        },
                        "r": {
                          "type": "string",
                          "example": "0x6af234cbb57bbe07ef45b5e64f7710803c95a080ad9596aecc17c29cbbd4fa77"
                        },
                        "s": {
                          "type": "string",
                          "example": "0x14de9eff7b9a59f27e1f5a7f84bbb3dffb163a90773f5d4cbf17afb76fd4f766"
                        },
                        "v": {
                          "type": "string",
                          "example": "0x0"
                        }
                      }
                    },
                    {
                      "title": "Solana response",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "signature": {
                          "type": "string",
                          "example": "0x023d9a5700b77971b8de539936143e0d82808809b856cc9ab9bcc41a02a3794ec516a44db6ed666f3e4f7549ae91939062ce076a9ef419febc21c41eebb98f0a"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```