Developer Tools
mero-abi (calimero-abi) + mero-sign + merodb — CLI utilities for ABI, signing, and database inspection
Overview
Three tools live in the tools/ directory. They are not part of the runtime — these are developer and operator utilities for working with WASM artifacts, bundle signing, and database debugging.
Tool Suite
Each tool is a standalone binary crate excluded from workspace versioning.
calimero-abi
mero-abiExtract, inspect, and validate WASM ABI artifacts. Reads abi.json produced at build time, inspects WASM binary structure via wasmparser.
mero-sign
CLIEd25519 bundle manifest signing with did:key identifiers. Uses RFC 8785 JSON Canonicalization Scheme for deterministic signing.
merodb
CLIRocksDB debug, inspect, export, and migrate tool. YAML-driven migration plans, DAG export, column-level data inspection, optional GUI.
calimero-abi (mero-abi)
CLI for working with Calimero WASM ABI artifacts. Reads abi.json produced at build time, inspects WASM binary structure via wasmparser.
CLI Commands
Key Files
extract.rs
Core extraction logic — find_and_read_abi_json, extract_abi, extract_types_schema, extract_state_schema.
inspect.rs
WASM binary parser — inspect_wasm walks sections, identifies exports and custom sections.
Extract Flow
Locate abi.json
find_and_read_abi_json resolves the ABI file path relative to the WASM file, reading the JSON into memory.
Parse & Validate
Deserialize into ABI structure via serde_json. The manifest includes method signatures, types, and state schema.
Write Output
Depending on subcommand, write the full ABI, types-only, or state schema to the output path. State output includes schema_version: "wasm-abi/1".
mero-sign
Sign Calimero bundle manifest.json files with Ed25519. Uses RFC 8785 JSON Canonicalization Scheme (JCS) via serde_json_canonicalizer. Signer IDs are did:key identifiers derived from the public key (multicodec 0xed01 + base58btc multibase z).
CLI Commands
Signing Flow
Key Types
private_key: String, // hex-encoded Ed25519 secret
public_key: String, // hex-encoded Ed25519 public
signer_id: String, // did:key multibase identifier
}
algorithm: String, // "Ed25519"
publicKey: String, // hex-encoded public key
signature: String, // base64url-encoded signature
}
did:key Derivation
Multicodec Prefix
Prepend the Ed25519 multicodec prefix 0xed01 to the raw 32-byte public key.
Base58btc Encode
Encode the prefixed bytes using base58btc (Bitcoin alphabet).
Multibase Wrap
Prepend multibase prefix z → final identifier: did:key:z6Mk...
merodb
Debug and inspect Calimero's RocksDB layout. Export column data, validate integrity, export DAG, run YAML-driven migrations, optional GUI.
CLI Commands
Column Support
Key Functions
open_database
Opens RocksDB in read-only mode, discovers column families, returns CF handles for selective access.
parse_key / parse_value
Decode raw byte keys to JSON. parse_value dispatches to typed parsers like parse_context_meta, parse_dag_delta, etc.
Migration Plan Format
version: 1
steps:
- action: copy
from_column: State
to_column: State_v2
transform: null
- action: delete
column: State
key_prefix: "0x..."
- action: upsert
column: Meta
key: "version"
value: "2"
- action: verify
column: Meta
expect_key: "version"
Default mode is --dry-run — logs actions without writing. Use --apply to execute. --backup-dir creates a snapshot before applying. --report writes a JSON summary.
Dependencies
All three tools are excluded from workspace versioning. They depend on shared Calimero crates but do not participate in the runtime dependency graph.
merod
Node daemon binary. Initializes configuration, manages the datastore, and runs all actors (Node, Context, Network, Server).
Commands
Init options
--group-governance local is the default (and only) governance mode.
For read-only nodes, add --mode read-only.
TEE Mode
When [tee] configuration is present, merod fetches a storage encryption key from a KMS at startup using TDX attestation. See TEE Mode for full details.
meroctl
Operator CLI for managing a running merod node. Connects via the admin API.
Command Groups
app
install, list, get — manage applications (bundles and raw WASM).
context
create, list, invite, join, update, delete — context lifecycle.
group
create (with --parent-group-id), list, get, delete, invite, join, members (add/remove/list/set-role/set-caps/get-caps), contexts, join-context.
call
Execute a WASM method: meroctl call METHOD --context ID --as KEY --args JSON
blob
upload, get, delete — binary large object management.
peers
List connected P2P peers.
node
Node identity and status information.