Expand description
The clap command tree and the top-level dispatcher with the exit-code mapping.
run is the single entry point shared by the binary and the integration
tests: it parses argv, routes to a command handler, and collapses the
handler’s Result<(), CliError> into the process exit code. Clap’s own parse
failures (bad flags, unknown subcommands, missing required args) map to 4;
--help / --version map to 0.
§Global flags
--color <auto|always|never> / --no-color set the color policy (honoured
together with NO_COLOR / CLICOLOR_FORCE / is_terminal()), --quiet
suppresses non-essential stderr chatter, and a global --json puts the active
command into machine-output mode (its own --json works too). When the active
command is in JSON mode and fails, the dispatcher emits a structured error
object on stderr instead of the plain cardanowall: <message> line.
§Environment
Every secret / config flag has a consistent env fallback used on ALL commands:
CARDANOWALL_BASE_URL←--base-urlCARDANOWALL_API_KEY←--api-keyCARDANOWALL_SEED←--seed(identity, sign, submit, inbox)CARDANOWALL_RECIPIENT_KEY←--secret-key(verify, inbox)CARDANOWALL_CARDANO_GATEWAY/CARDANOWALL_ARWEAVE_GATEWAY/CARDANOWALL_IPFS_GATEWAY/CARDANOWALL_BLOCKFROST_PROJECT_ID/CARDANOWALL_CONFIRMATION_DEPTH_THRESHOLD/CARDANOWALL_DENY_HOSTCARDANOWALL_CONFIG_PATHoverrides~/.cardanowall/config.toml.
Structs§
- Cli
- The
cardanowallCLI: a standalone CIP-309 Proof-of-Existence toolkit. - Global
Args - Cross-command flags marked
global = trueso they may appear before OR after the subcommand, e.g.cardanowall --no-color verify …orcardanowall verify … --quiet. - Global
Context - Cross-command runtime context resolved once from the global flags: the color choice and quiet mode, plus the JSON mode the dispatcher computed.
Enums§
- Color
Mode - The
--colorvalue surface (a clap value-enum mirror ofColorChoice). - Command
- The top-level subcommand set.
Functions§
- run
- Parse
args, dispatch, and return the process exit code (0–4).