Blockscout
SupportWebsiteGithubDiscord
  • Blockscout Open-Source Explorer
  • 💡About BlockScout
    • Features
      • Ethereum Bytecode Database Microservice
      • Blockscout Redesign
    • Chains Using Blockscout
    • Partners & Integrations
      • RaaS Providers
      • Vera: Verifier Alliance
        • Adding your chain to the Vera database
        • Programmatic verification via the API
    • News & Media
      • Newsletter & Blog
    • Funding
      • L2 Funding Proposal
        • Aux Funding Images
    • Roadmap
  • 🙎Using Blockscout
    • Getting Started
      • Glossary of Terms
      • Main Menu
      • Blocks
      • Transaction Types
      • Beacon Chain Withdrawal Views
    • My Account
      • Watch list
      • Private tags
      • Public tags
      • API keys
      • Custom ABI
      • Verified addresses
        • Copy and Sign Message
      • For developers
    • Dappscout Apps Marketplace
      • DApp Integration
    • Swapscout
      • Earn Merits when using Swapscout
    • Revokescout
    • Autoscout Explorer Launchpad
    • CSV Exports
    • Token Support
      • ERC-1155 Support
    • Merits
      • Streak rewards
      • Activity Pass
      • Leaderboard
      • Badges
      • FAQs
  • 👩‍💻Developer Support
    • For Web3 Developers
    • Link to Blockscout
    • Blockscout APIs
      • Requests & Limits
      • REST API Endpoints
        • Stats API
        • Interpreter API
      • JSON RPC & ETH Compatible RPC Endpoints
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
        • ETH RPC API
      • GraphQL in Blockscout
    • Smart Contract Verification
      • Blockscout UI
      • Blockscout smart-contract verification API
      • Hardhat Verification Plugin
        • Sourcify Plugin for Hardhat
      • Foundry Verification
      • Sourcify Verification
      • OpenZeppelin Contract Verification
      • Automate verifications with Catapulta
      • Verification via thirdweb
      • Interacting with Smart Contracts
    • Blockscout SDK
    • Integrate Merits
    • Chainscout chains list
  • 🏃‍♂️Setup and Run Blockscout
    • General Overview
      • Separate Indexer, Web App, and API
      • Umbrella Project Organization
      • Indexer Architecture Overview
      • ShareLock
      • EVM Version Information
    • Requirements
      • General Backend Requirements / Blockscout Backend Prerequisites
      • Backend/Frontend Compatibility Matrix
      • Hardware & Hosting Requirements
      • Database Storage Requirements
      • Client Setting Requirements
      • Node Tracing / JSON RPC Requirements
      • L2 -> L1 JSON-RPC Method Requests
    • ☑️ENV Variables
      • Backend ENVs: Common
      • Backend ENVs: Chain-Specific
      • Backend ENVs: Integrations
      • Frontend ENVs: Common
        • ENVs
        • Deprecated ENVs
      • Deprecated Backend ENVs
        • Previous ENV Variable Home Page
    • Deployment
      • ⭐Manual Deployment Guide
        • Ubuntu Setup
        • MacOS setup
      • ⭐Docker-compose Deployment
      • ⭐Kubernetes Deployment
      • Rollup Deployment
      • 🌟Cosmos-based chains
      • 🍀Upgrade Guide (v7.0 & v8.0)
      • Frontend Migration
        • All-In-One Container
        • Separate Frontend
        • Customized Backend
        • Proxy Setup
        • FAQs
      • Manual Deployment (backend + old UI)
        • Manual cleaning an instance from the previous deployment
      • Terraform Deployment
      • Ansible Deployment (AWS Cloud)
        • Overview
        • Prerequisites
        • AWS Permissions & Settings
          • Creating a Secret Key Pair
          • Login with AWS CLI
          • Creating an AWS certificate for SSL
          • Manually Cleaning Terraform Related Instances
        • Variables
        • Deploying the Blockscout Infrastructure
        • Deploying Blockscout
        • Destroying Provisioned Infrastructure
        • Common Additional Tasks
        • Common Errors and Questions
        • AWS Marketplace (deprecated)
          • Overview
          • CloudFormation Template
          • Prerequisites & Install Parameters
          • Install from AWS Marketplace
          • AWS EC2 archive node setup with OpenEthereum (formerly Parity)
          • Updating & Redeploying in AWS
          • Customizing CSS
    • Microservices
      • Blockscout ENS (BENS) Name Service Integration
      • Smart Contract Verification
    • Configuration Options
      • Admin Panel Usage
      • Automating Restarts
      • Branding Configs
      • Circle CI Updates
      • Charts and Stats
      • CSS Configuration & Presets
      • Exchange Rates
      • Front-end Config Files
      • haproxy Settings for Blockscout.com
      • Internationalization
      • Logger Configs
      • Memory Usage
      • Metrics
      • My Account Settings
      • Sorting and Pagination
      • Tracing
      • Reown Project ID for contract Read/Write
    • Indexing
      • How do I fix indexer timeouts?
      • How do I update memory consumption to fix indexer memory errors?
    • Testing
    • DB schema
  • FAQs
    • User FAQs
    • Developer FAQs
  • 🧩Resources
    • EaaS: Hosting with Blockscout
    • Contributing to Blockscout
    • Bug Bounty Program
    • Media kit
    • Release Notes
      • v5.3.0: 10/23/23
      • v5.2.0: 6/20/23
      • v5.1.0: 2/13/23
      • v5.0.0: 1/11/23
    • Discord Channel
    • Discussion
    • GitHub Repo
Powered by GitBook
LogoLogo

Privacy and Terms

  • Privacy Notice
  • Terms and Conditions

Copyright © Blockscout Limited 2023-2024

On this page
  • https://eth.blockscout.com/api/v2/transactions/transaction_hash/summary
  • How It Works
  • Response Structure
  • Success Response
  • Response Variable Types
  • Error Handling
  • Attributes of the Error Object

Was this helpful?

Export as PDF
  1. Developer Support
  2. Blockscout APIs
  3. REST API Endpoints

Interpreter API

https://eth.blockscout.com/api/v2/transactions/transaction_hash/summary

The Interpreter API is currently in development. This REST API service will provide human-readable information regarding transactions, addresses and more.

How It Works

The Transactions Interpreter Service is designed to process blockchain transactions by extracting and analyzing relevant information to generate a summary of the transaction. The process follows several distinct phases:

  1. Transaction Hash Reception : The service receives a transaction hash, which triggers the processing pipeline.

  2. Data Retrieval : The service automatically retrieves necessary transaction data from the blockchain using the provided transaction hash.

  3. Initial Validation : The input data undergoes validation to ensure authenticity and correctness before further processing.

  4. Data Processing : The retrieved transaction data is processed, involving multiple phases:

    1. Pre-LLM Phase : During this phase, the service attempts to classify and interpret the on-chain actions using predefined algorithms. This step includes determining the type of action (e.g., transfer, minting, etc.) based on the transaction data.

    2. LLM Phase : If the type of action cannot be determined algorithmically in the Pre-LLM phase, the service leverages a Language Learning Model (LLM) to infer the type of on-chain action.

  5. Transaction Summary Generation : After the classification, the service generates a summary of the transaction, which is returned as the response. The summary includes key details about the transaction and is structured according to a specific template.

Response Structure

The response from the Transactions Interpreter Service is structured as follows (will vary depending on the specific case):

Success Response

{
    "success": true,
    "data": {
        "summaries": [
            {
                "summary_template": "{action_type} {amount} {token} to {to_address}",
                "summary_template_variables": {
                    "action_type": {
                        "type": "string",
                        "value": "Transfer"
                    },
                    "amount": {
                        "type": "currency",
                        "value": "7800"
                    },
                    "token": {
                        "type": "token",
                        "value": {
                            "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                            "circulating_market_cap": "34593435047.40006",
                            "decimals": "6",
                            "exchange_rate": "1.001",
                            "holders": "2761518",
                            "icon_url": "<https://assets.coingecko.com/coins/images/6319/small/usdc.png?1696506694>",
                            "name": "USD Coin",
                            "symbol": "USDC",
                            "total_supply": "25611927821576420",
                            "type": "ERC-20",
                            "volume_24h": "8858197053.476923"
                        }
                    },
                    "to_address": {
                        "type": "address",
                        "value": {
                            "hash": "0x242ba6d68FfEb4a098B591B32d370F973FF882B7"
                        }
                    }
                }
            }
        ],
        "debug_data": {
            "transaction_hash": "0xea7cbead745789346343435cf2a0910887ab0ebef08af07cbd2f0920a2c628da",
            "model_classification_type": "transfer",
            "post_llm_classification_type": "transfer",
            "is_prompt_truncated": false,
            "summary_template": {
                "transfer": {
                    "template_name": "Generic-Transfer",
                    "template_vars": {
                        "strippedInput": "<stripped data>",
                        "decodedInput": "<decoded data>",
                        "tokenTransfers": [<token transfer details>],
                        "isErc20Transfer": true,
                        "erc20Amount": "7800",
                        "isNftTransfer": false,
                        "token": {
                            "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                            "circulating_market_cap": "34593435047.40006",
                            "decimals": "6",
                            "exchange_rate": "1.001",
                            "holders": "2761518",
                            "icon_url": "<https://assets.coingecko.com/coins/images/6319/small/usdc.png?1696506694>",
                            "name": "USD Coin",
                            "symbol": "USDC",
                            "total_supply": "25611927821576420",
                            "type": "ERC-20",
                            "volume_24h": "8858197053.476923"
                        },
                        "nftAmount": null,
                        "toAddress": {
                            "hash": "0x242ba6d68FfEb4a098B591B32d370F973FF882B7"
                        }
                    }
                }
            }
        }
    }
}

Response Variable Types

The response from the service can contain the following types of data:

  • number: Numerical values.

  • string: Textual data.

  • array: An array of items.

  • currency: Represents a monetary value.

  • token: Information related to a cryptocurrency or token.

  • address: Blockchain address information.

  • timestamp: A date and time representation.

  • domain: Domain name data.

  • code: Code snippets or encoded data.

These types are used to ensure that the data returned in the summary is consistent and properly structured.

Error Handling

If the service encounters an error, it returns a structured error response:

  • Error Response:

{
  "success": false,
  "error": {
    "id": "v_ap_rd_1",
    "code": "INVALID_API_PARAMS",
    "message": "Invalid API parameters",
    "error_data": [
      {
        "parameter": "data",
        "message": "Invalid parameter data. Please ensure the input is well formed."
      }
    ]
  }
}

Attributes of the Error Object

  • id: A unique identifier for the error, used for debugging purposes.

  • code: A code representing the type of error.

  • message: A user-friendly message that can be displayed on the front end.

  • error_data: An array containing details about the invalid parameters.

Last updated 6 months ago

Was this helpful?

👩‍💻