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

# Validate a raw EVM transaction (deprecated)

> Legacy raw EVM validation endpoint. Requires full transaction parameters and an intentHash. Use `/api/validate` for all new integrations.

The intentHash must match: `keccak256("<chainId>|<nonce>|<to_lower>|<calldata_lower>|<valueWei>|<gasLimit>|<maxFeePerGas>|<maxPriorityFeePerGas>|<txType>|<accessList_json>")`



## OpenAPI

````yaml /openapi.json post /api/validate/raw
openapi: 3.1.0
info:
  title: Mandate API
  version: 1.2.0
  description: >-
    Non-custodial agent wallet policy layer. Enforces spend limits, allowlists,
    and approval workflows for AI agent transactions without ever receiving
    private keys.
  contact:
    name: Mandate
    url: https://mandate.md
    email: support@mandate.md
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.mandate.md
    description: Production
security: []
tags:
  - name: Registration
    description: >-
      Agent registration and claiming. No auth required for register; Sanctum
      auth for claim.
  - name: Agent API
    description: >-
      Endpoints authenticated with a runtime key (Bearer mndt_live_... or
      mndt_test_...). Used by agents to validate transactions, post events, and
      poll status.
  - name: Intent Lifecycle
    description: >-
      Post transaction hashes after broadcast and poll intent status until
      confirmed.
  - name: Dashboard
    description: >-
      Dashboard endpoints for human operators. Authenticated via Sanctum
      (cookie-based session).
  - name: Policies
    description: >-
      Policy management for agents. List, create, and view policy
      configurations.
  - name: Approvals
    description: Approval queue for transactions that require human review.
paths:
  /api/validate/raw:
    post:
      tags:
        - Agent API
      summary: Validate a raw EVM transaction (deprecated)
      description: >-
        Legacy raw EVM validation endpoint. Requires full transaction parameters
        and an intentHash. Use `/api/validate` for all new integrations.


        The intentHash must match:
        `keccak256("<chainId>|<nonce>|<to_lower>|<calldata_lower>|<valueWei>|<gasLimit>|<maxFeePerGas>|<maxPriorityFeePerGas>|<txType>|<accessList_json>")`
      operationId: validateRawTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RawValidateRequest'
            example:
              chainId: 84532
              nonce: 42
              to: '0x036CbD53842c5426634e7929541eC2318f3dCF7e'
              calldata: >-
                0xa9059cbb00000000000000000000000071c7656ec7ab88b098defb751b7401b5f6d8976f0000000000000000000000000000000000000000000000000000000000989680
              valueWei: '0'
              gasLimit: '90000'
              maxFeePerGas: '1000000000'
              maxPriorityFeePerGas: '1000000000'
              txType: 2
              accessList: []
              intentHash: >-
                0xabc123def456789012345678901234567890123456789012345678901234abcd
              reason: 'Invoice #127 from Alice for March design work'
      responses:
        '200':
          description: Transaction validated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RawValidateResponse'
              example:
                allowed: true
                intentId: 9e5f1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b
                chain: '84532'
                requiresApproval: false
                approvalId: null
                approvalReason: null
                blockReason: null
                riskLevel: SAFE
                riskDegraded: false
        '401':
          description: Invalid or missing runtime key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Transaction blocked by policy or invalid intentHash.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RawValidateBlockedResponse'
              example:
                allowed: false
                blockReason: intent_hash_mismatch
                blockDetail: Client intentHash does not match server recomputation
                declineMessage: null
      deprecated: true
      security:
        - RuntimeKeyAuth: []
components:
  schemas:
    RawValidateRequest:
      type: object
      required:
        - chainId
        - nonce
        - to
        - gasLimit
        - maxFeePerGas
        - maxPriorityFeePerGas
        - intentHash
        - reason
      properties:
        chainId:
          type: integer
          description: EVM chain ID.
        nonce:
          type: integer
          minimum: 0
          description: Transaction nonce.
        to:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Target contract or recipient address.
        calldata:
          type: string
          description: 'Hex-encoded calldata (0x-prefixed). Default: empty.'
        valueWei:
          type: string
          description: 'Native token value in wei. Default: "0".'
        gasLimit:
          type: string
          description: Gas limit for the transaction.
        maxFeePerGas:
          type: string
          description: EIP-1559 max fee per gas (wei).
        maxPriorityFeePerGas:
          type: string
          description: EIP-1559 max priority fee per gas (wei).
        txType:
          type: integer
          description: 'Transaction type (2 for EIP-1559). Default: 2.'
        accessList:
          type: array
          description: 'EIP-2930 access list. Default: [].'
        intentHash:
          type: string
          pattern: ^0x[a-fA-F0-9]{64}$
          description: >-
            keccak256 of the canonical transaction string. Must match server
            recomputation.
        reason:
          type: string
          maxLength: 1000
          description: Why the agent is making this transaction.
    RawValidateResponse:
      type: object
      required:
        - allowed
        - intentId
        - chain
        - requiresApproval
        - blockReason
      properties:
        allowed:
          type: boolean
        intentId:
          type:
            - string
            - 'null'
          format: uuid
        chain:
          type: string
        requiresApproval:
          type: boolean
        approvalId:
          type:
            - string
            - 'null'
          format: uuid
        approvalReason:
          type:
            - string
            - 'null'
        blockReason:
          type:
            - string
            - 'null'
        riskLevel:
          type:
            - string
            - 'null'
          enum:
            - SAFE
            - LOW
            - MEDIUM
            - HIGH
            - CRITICAL
            - null
        riskDegraded:
          type: boolean
          description: >-
            True if risk service was unavailable and a degraded (safe) result
            was returned.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    RawValidateBlockedResponse:
      type: object
      required:
        - allowed
        - blockReason
      properties:
        allowed:
          type: boolean
          enum:
            - false
        blockReason:
          type: string
        blockDetail:
          type:
            - string
            - 'null'
        declineMessage:
          type:
            - string
            - 'null'
  securitySchemes:
    RuntimeKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Runtime key issued at agent registration. Prefixed with `mndt_live_`
        (mainnet) or `mndt_test_` (testnet). Pass as `Authorization: Bearer
        mndt_test_...`.

````