Skip to content

Add JSON output mode for batch / multiple-slot mode #503

@casks-mutters

Description

@casks-mutters

The README mentions JSON output only for the simple CLI (single slot) tool.
If we extend the tool to support multiple slots (as suggested in #1), we should also provide a well-structured JSON output, for example:

{
  "network": { "chain_id": ..., "rpc": "..."},
  "address": "...",
  "blocks": { "A": 123, "B": 456 },
  "slots": [
     { "slot": "0x0", "value_A": "...", "value_B": "...", "leafA": "...", "leafB": "...", "changed": true/false, "commitment": "..." },
     ...
  ],
  "root_commitment": "..."
}

Benefits:

  • Easy ingestion by other tools (e.g. ZK provers, dashboards, CI pipelines).
  • Machine-readable, easier to diff or archive.

Suggested changes:

  • Add a --json (or extend existing) flag to work in batch/multi-slot mode.
  • Define a JSON schema / spec and document it in README.
  • Possibly allow output to file rather than stdout (e.g. --out result.json).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions