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

# Scan an Unsigned Transaction

> Screens a whole Solana transaction before it is signed: simulation, Address Risk v2 on counterparties, poisoning checks, and intent extraction.



## OpenAPI

````yaml post /v2/risk/transaction/scan
openapi: 3.0.0
info:
  title: Range Risk API
  description: The Range Risk API for risk assessment of crypto addresses.
  version: 1.7.21
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
tags:
  - name: Risk
    description: Get risk information about a crypto address.
  - name: Risk v2
    description: >-
      Address risk assessment, workspace configuration, and signals catalogue
      (API v2).
  - name: Simulator
    description: Simulate a transaction on a network.
paths:
  /v2/risk/transaction/scan:
    post:
      tags:
        - Risk v2
      summary: Scan an Unsigned Transaction (pre-signature)
      description: >-
        Screens a whole transaction before it is signed: simulates it, screens
        every counterparty it touches through Address Risk v2, checks recipients
        for address poisoning, runs transaction-native rules, and extracts the
        declared intent. Returns one severity (worst single signal), the
        findings behind it, and the predicted effects. Evidence is retrievable
        via `GET /v2/risk/evidence/:screenId`. Solana only in this version.
      operationId: scan
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionScanRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionScanResponseDto'
components:
  schemas:
    TransactionScanRequestDto:
      type: object
      properties:
        network:
          type: string
          enum:
            - solana
          example: solana
        transaction:
          type: string
          minLength: 1
          maxLength: 4096
          description: >-
            The complete serialized unsigned transaction — account list,
            instructions, blockhash — as one encoded string (what a wallet holds
            immediately before signing).
          example: AQAAAAAAAAAA…
        encoding:
          enum:
            - base64
            - base58
          type: string
          description: Encoding of `transaction`. Defaults to base64.
        signer_address:
          type: string
          maxLength: 64
          description: >-
            The signing account. Defaults to the fee payer derived from the
            payload.
        origin:
          type: string
          maxLength: 2048
          description: >-
            Origin (dApp URL) that produced this transaction. Recorded with the
            scan and forwarded to intent extraction.
      required:
        - network
        - transaction
    TransactionScanResponseDto:
      type: object
      properties:
        screen_id:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        network:
          type: string
          enum:
            - solana
        payload_sha256:
          type: string
          description: >-
            SHA-256 of the decoded payload bytes — the scan identity of this
            (still unsigned) transaction.
        signer:
          type: string
          description: The signing account this scan assumed.
        severity:
          type: string
          enum:
            - severe
            - high
            - medium
            - low
            - none
          description: Worst single signal across counterparties and findings.
        intent:
          nullable: true
          description: >-
            LLM-extracted intent. Null when extraction was unavailable or timed
            out (see notes).
          type: object
          allOf:
            - $ref: '#/components/schemas/ScanIntentDto'
        simulation:
          nullable: true
          description: What signing actually does. Null when simulation failed.
          type: object
          allOf:
            - $ref: '#/components/schemas/ScanSimulationDto'
        counterparties:
          type: array
          items:
            $ref: '#/components/schemas/ScanCounterpartyDto'
        findings:
          type: array
          items:
            $ref: '#/components/schemas/ScanFindingDto'
        notes:
          type: array
          items:
            $ref: '#/components/schemas/ScanNoteDto'
        timestamp:
          type: string
          example: '2026-08-18T14:30:00Z'
        meta:
          $ref: '#/components/schemas/ScanMetaDto'
      required:
        - screen_id
        - network
        - payload_sha256
        - severity
        - counterparties
        - findings
        - notes
        - timestamp
        - meta
    ScanIntentDto:
      type: object
      properties:
        summary:
          type: string
          example: Swap 100 USDC for SOL on Jupiter
        action:
          type: string
          example: swap
        confidence:
          type: string
          example: high
          enum:
            - high
            - medium
            - low
      required:
        - summary
    ScanSimulationDto:
      type: object
      properties:
        simulation_success:
          type: boolean
          example: true
        asset_diffs:
          type: array
          items:
            $ref: '#/components/schemas/ScanAssetDiffDto'
        state_changes:
          description: Human-readable predicted state changes, from the simulator.
          type: array
          items:
            type: string
        programs_invoked:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              id:
                type: string
            required:
              - name
              - id
      required:
        - simulation_success
        - asset_diffs
        - state_changes
        - programs_invoked
    ScanCounterpartyDto:
      type: object
      properties:
        address:
          type: string
        source:
          type: string
          enum:
            - asset-diff
            - permission-target
            - static-account
          description: >-
            Why this account was screened. `static-account` appears only on the
            simulation-failed fallback path. Invoked programs are never screened
            — see `simulation.programs_invoked` for what the transaction calls.
        severity:
          type: string
          enum:
            - severe
            - high
            - medium
            - low
            - none
        triggered_signals:
          description: Signals that fired on this counterparty, across pillars.
          type: array
          items:
            type: string
      required:
        - address
        - source
        - severity
        - triggered_signals
    ScanFindingDto:
      type: object
      properties:
        signal:
          type: string
          example: authority-change
        severity:
          type: string
          enum:
            - severe
            - high
            - medium
            - low
        caption:
          type: string
          example: Token Authority … changed
        evidence:
          type: object
          description: Signal-specific supporting details.
      required:
        - signal
        - severity
        - caption
    ScanNoteDto:
      type: object
      properties:
        code:
          type: string
          example: coverage-truncated
        message:
          type: string
          example: Counterparty screening truncated to 50 accounts (63 selected).
      required:
        - code
        - message
    ScanMetaDto:
      type: object
      properties:
        counterparties_screened:
          type: number
          example: 12
        counterparties_screened_complete:
          type: boolean
          example: true
          description: >-
            False on any counterparty coverage gap: a screen failed (medium
            counterparty-screening-partial finding), a token account had no
            resolvable owner wallet (medium counterparty-owner-unresolved
            finding), or the selection was truncated at the cap (medium
            coverage-truncated finding). Either way the gap lifts the verdict.
            Analogous to poisoning_screened.
        coverage_truncated:
          type: boolean
          example: false
        poisoning_screened:
          type: boolean
          example: true
          description: >-
            False when the lookalike screen did not run or did not complete —
            treat as NOT SCREENED, never as clean. Vacuously true when the
            transaction credits no owner-resolvable recipients (recipients
            excluded by counterparty-owner-unresolved are covered by that
            finding, not by this flag).
        simulate_ms:
          type: number
          example: 420
        screening_ms:
          type: number
          example: 610
        poisoning_ms:
          type: number
          example: 480
        intent_ms:
          type: number
          example: 900
        total_ms:
          type: number
          example: 1450
      required:
        - counterparties_screened
        - counterparties_screened_complete
        - coverage_truncated
        - poisoning_screened
        - simulate_ms
        - screening_ms
        - poisoning_ms
        - intent_ms
        - total_ms
    ScanAssetDiffDto:
      type: object
      properties:
        account:
          type: string
          description: Account whose balance changes.
        owner:
          type: string
          description: >-
            Owner wallet when `account` is a token account; equals `account`
            otherwise.
        asset:
          type: string
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          description: Token mint, or `SOL` for native lamport changes.
        amount:
          type: number
          example: 100.5
        direction:
          type: string
          enum:
            - credit
            - debit
      required:
        - account
        - asset
        - amount
        - direction
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````