Herodotus Docs
Home
  • Introduction
  • FAQ
  • developers
    • Storage Proofs
      • Workflow
      • Workflow Examples
      • Accessing Block Hash
    • Storage Proof API
      • Interactive Docs
      • Step by step example
    • Turbo
      • Supported Networks
      • Turbo zksync demo
    • Data Processor
      • Why use HDP?
      • Getting Started
      • HDP Jargon
        • What is a Data Lake?
        • What is a Module?
        • Cairo1/Cairo0 Interoperability
      • Architecture
      • Additional Resources
    • Data Processor API
      • Program Registry API
      • Interactive Docs
    • Data Structure Indexer API
      • Interactive Docs
    • Supported Networks
    • Contract Addresses
    • API Status
  • Scaling Solutions
    • Integrity Verifier
  • Protocol Design
    • Architecture
      • Smart Contracts
      • OP Stack
    • Historical Block Hash Accumulator
      • Merkle Mountain Ranges
      • Initial Accumulation Event
    • Timestamp to Block Mapper
      • Edge Cases
  • Security
    • Audits
  • GitHub
  • Twitter
  • LinkedIn
  • Telegram
  • Media Kit
Powered by GitBook
On this page
  • Program Registry API
  • Submit Program (/submit-program)
  • Get Program (/get-program)
  • Get Metadata (/get-metadata)
  1. developers
  2. Data Processor API

Program Registry API

Program Registry

PreviousData Processor APINextData Structure Indexer API

Last updated 7 months ago

Note that this program registry and module feature is beta.

Program Registry API

The Program Registry is a server that accepts compiled Cairo programs (also known as CASM files), fetches the compiler version dynamically, computes the correct program hash, and stores the bytecode of the Cairo program along with the program hash.

To trigger a task via the , the target module program should have already been uploaded.

Submit Program (/submit-program)

curl --location 'https://sharp.api.herodotus.cloud/submit-program?apiKey={yourApiKey}' \
--form 'programFile=@"./hdp.json"' \

Response:

0x343995a543ac64616d33fa77670cfa4e498691c96c2d964a0a07181dff4ce81

Get Program (/get-program)

curl --location --request GET 'https://hdp.api.herodotus.cloud/get-program?program_hash=0x343995a543ac64616d33fa77670cfa4e498691c96c2d964a0a07181dff4ce81' \
--header 'Content-Type: application/json'

The response will be a JSON file of the target program.

Get Metadata (/get-metadata)

Request:

curl --location 'http://program-registery.api.herodotus.cloud/get-metadata?program_hash=0x1cdc17f32a75a973497d9e4cf282dfbe12ef03df994cc35e3a54f8b7b98d67d'

Response:

{
  "layout": "recursive_with_poseidon",
  "version": 2
}
Module
Data Processor API