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

# Types Reference

> Core HDP input/output and proof-related types

This page summarizes the most important HDP runtime types and where to find them in source.

## Source links

* Rust HDP types: [`crates/types/src/lib.rs`](https://github.com/HerodotusDev/hdp-cairo/blob/main/crates/types/src/lib.rs)
* Injected-state proof types: [`crates/types/src/proofs/injected_state/`](https://github.com/HerodotusDev/hdp-cairo/tree/main/crates/types/src/proofs/injected_state)
* EVM Cairo key types: [`hdp_cairo/src/evm/`](https://github.com/HerodotusDev/hdp-cairo/tree/main/hdp_cairo/src/evm)
* Starknet Cairo key types: [`hdp_cairo/src/starknet/`](https://github.com/HerodotusDev/hdp-cairo/tree/main/hdp_cairo/src/starknet)

## Rust pipeline types

| Type              | Used in        | Purpose                                                                            |
| ----------------- | -------------- | ---------------------------------------------------------------------------------- |
| `HDPDryRunInput`  | Stage 1        | Input payload for `dry-run` (module + params + optional injected state)            |
| `HDPInput`        | Stage 3        | Input payload for `sound-run` (module + params + proofs + optional injected state) |
| `ProofsData`      | Stage 2 output | Full proof payload (`chain_proofs`, `state_proofs`, `unconstrained`)               |
| `HDPDryRunOutput` | Stage 1 output | Decoded output fields emitted by dry run                                           |
| `HDPOutput`       | Stage 3 output | Decoded output fields emitted by sound run                                         |
| `MmrMetaOutput`   | Stage 3 output | Per-chain MMR metadata entry                                                       |

Related docs:

* [Pipeline stages](/data-processor/pipeline)
* [Output model](/data-processor/output)
* [Verification model](/data-processor/verification)

## `ProofsData` JSON shape

```json theme={null}
{
  "chain_proofs": [],
  "state_proofs": [],
  "unconstrained": {}
}
```

`chain_proofs` carries chain-specific header/state proof bundles, `state_proofs` carries injected-state read/write proofs, and `unconstrained` carries hash-validated large payloads.

## Chain-level enums and bundles

| Type              | Purpose                                   |
| ----------------- | ----------------------------------------- |
| `ChainIds`        | Supported chain enum                      |
| `ChainProofs`     | Per-chain proof bundle wrapper            |
| `HashingFunction` | MMR hashing mode (`Poseidon` or `Keccak`) |

## Cairo constants (chain IDs)

EVM:

* `ETHEREUM_MAINNET_CHAIN_ID`
* `ETHEREUM_TESTNET_CHAIN_ID`
* `OPTIMISM_MAINNET_CHAIN_ID`
* `OPTIMISM_TESTNET_CHAIN_ID`

Starknet:

* `STARKNET_MAINNET_CHAIN_ID`
* `STARKNET_TESTNET_CHAIN_ID`

See API usage in [Capabilities](/data-processor/capabilities).

## Cairo key structs (practical shapes)

EVM keys:

```cairo theme={null}
HeaderKey { chain_id, block_number }
AccountKey { chain_id, block_number, address }
StorageKey { chain_id, block_number, address, storage_slot }
BlockTxKey { chain_id, block_number, transaction_index }
BlockReceiptKey { chain_id, block_number, transaction_index }
LogKey { chain_id, block_number, transaction_index, log_index }
```

Starknet keys:

```cairo theme={null}
HeaderKey { chain_id, block_number }
StorageKey { chain_id, block_number, address, storage_slot }
```

## Output fields (decoded from output segment)

```text theme={null}
task_hash_low, task_hash_high,
output_root_low, output_root_high,
poseidon_len, keccak_len,
poseidon_metas (4 felts each),
keccak_metas (5 felts each)
```

For semantics and formulas:

* [Output model](/data-processor/output)
