sign_transaction
Signs raw unsigned blockchain transactions for EVM or Solana networks without broadcasting them, returning signed data, parsed operations, and policy evaluation results.
Instructions
Sign an unsigned transaction without broadcasting. Provide raw transaction (base64 for Solana, hex for EVM). Returns signed transaction, parsed operations, and policy evaluation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction | Yes | Raw unsigned transaction (base64 for Solana, hex 0x-prefixed for EVM) | |
| network | No | Target network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana. | |
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet. |
Implementation Reference
- The registration and handler implementation for the 'sign_transaction' MCP tool. It validates inputs via Zod and calls the API endpoint /v1/transactions/sign.
export function registerSignTransaction( server: McpServer, apiClient: ApiClient, walletContext?: WalletContext, ): void { server.tool( 'sign_transaction', withWalletPrefix( 'Sign an unsigned transaction without broadcasting. Provide raw transaction (base64 for Solana, hex for EVM). Returns signed transaction, parsed operations, and policy evaluation.', walletContext?.walletName, ), { transaction: z.string().describe('Raw unsigned transaction (base64 for Solana, hex 0x-prefixed for EVM)'), network: z.string().optional().describe('Target network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.'), wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'), }, async (args) => { const body: Record<string, unknown> = { transaction: args.transaction }; if (args.network) { body['network'] = args.network; } if (args.wallet_id) body.walletId = args.wallet_id; const result = await apiClient.post('/v1/transactions/sign', body); return toToolResult(result); }, ); }