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

# Simulate Transaction

> Simulate a transaction and get a human-readable verdict before signing.

Returns simulation logs, warnings, and a concise risk verdict users can trust pre-sign.


## OpenAPI

````yaml POST /v1/wallet/tx/simulate
openapi: 3.0.3
info:
  title: NovaShield Security Engine
  description: >-
    Enterprise-grade security scanning API for Solana. Analyze transactions,
    tokens, addresses, and dApps before user interaction.
  version: 3.0.0
  contact:
    name: NovaShield
    url: https://nshield.org
servers:
  - url: https://api.novashield.so
    description: Production
  - url: https://sapi.novashield.so
    description: Staging
security: []
tags:
  - name: Security Scanning
    description: >-
      Core security scanning endpoints for transactions, tokens, addresses, and
      dApps
paths:
  /v1/wallet/tx/simulate:
    post:
      tags:
        - Security Scanning
      summary: Simulate transaction (wallet)
      description: >-
        Simulate a transaction and get a human-readable risk verdict before
        signing.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateTransactionRequest'
      responses:
        '200':
          description: Transaction simulation complete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    SimulateTransactionRequest:
      type: object
      required:
        - transaction
        - signerPublicKey
      properties:
        transaction:
          type: string
          description: Base64-encoded serialized transaction
        signerPublicKey:
          type: string
          description: User's wallet public key
    SimulateTransactionResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            simulation:
              type: object
              properties:
                success:
                  type: boolean
                risks:
                  type: array
                  items:
                    type: string
                warnings:
                  type: array
                  items:
                    type: string
            transaction:
              type: object
              properties:
                instructions:
                  type: array
                  items:
                    type: object
                    properties:
                      program:
                        type: string
                      programId:
                        type: string
            riskAssessment:
              type: object
              properties:
                score:
                  type: number
                level:
                  type: string
                  enum:
                    - SAFE
                    - LOW
                    - MEDIUM
                    - HIGH
                    - CRITICAL
                verdict:
                  type: string
            recommendations:
              type: array
              items:
                type: string
        timestamp:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_REQUEST
            message:
              type: string
              example: Invalid request parameters
            details:
              type: string
        timestamp:
          type: string
          format: date-time
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````