The Herodotus Data Processor API is a powerful data access middleware system that enables smart contracts to access and compute over large amounts of on-chain data in a trustless manner. This RESTful API provides a seamless interface to leverage HDP’s capabilities, unlocking new possibilities for blockchain applications.

Overview

HDP is designed to bridge the gap between smart contracts and extensive on-chain data, allowing for complex computations and analyses in a fully trustless and efficient manner. Here are some key features of the HDP system:

  1. Extensive Data Access: Access large sets of on-chain data across multiple blockchains, including block headers, account balances, transactions, storage slots, and more.

  2. Secure Computation: Utilize storage proofs to verify on-chain data in a zkVM, enabling delegation of intensive computations to fully off-chain logic while maintaining security.

  3. Cost Efficiency: Batch multiple tasks together, significantly reducing proving and verification costs.

  4. Flexible Computations: Define arbitrary computations using “modules” - either predefined or user-defined functions that perform calculations on authenticated data.

  5. Cross-Chain Capability: Access and process data from various blockchain networks through a single API interface.

  6. On-Chain Delivery: Deliver computation results on-chain for smart contracts to query and utilize.

Key Use Cases

HDP enables powerful use cases such as:

  • Calculating time-weighted average prices (TWAP)
  • Verifying average balances over time
  • Identifying balance fluctuations
  • Ensuring compliance with sanctions
  • And much more…

How It Works

The HDP API provides a streamlined process for accessing and computing on-chain data:

  1. Submit a batch query specifying the data you need and the computations to perform.
  2. HDP retrieves the required data from the blockchain(s).
  3. The system verifies the data using storage proofs.
  4. HDP executes the specified computations on the authenticated data.
  5. Results are delivered on-chain for your smart contracts to access.

By leveraging the HDP API, you can unlock new capabilities for your blockchain applications, enabling complex data analysis and decision-making based on extensive historical and current on-chain data.

In the following sections, we’ll dive deeper into how to use the API, including payload examples and detailed endpoint references.