# zkac-node CLI Command-line interface for [ZKAC](../README.md) using the **Python bindings only** (`zkac` package). It runs a **registry-capable server** (management + client-managed registries + optional issuance relay) and **per-user** material under `~/.zkac/` (or `$ZKAC_HOME`). ## Prerequisites - Python ≥ 3.9 - The **`zkac`** extension built and installed from the repository root, for example: ```bash cd /path/to/ZKAC maturin develop # or: pip install -e . ``` ## Installation ```bash cd /path/to/ZKAC/cli pip install -e . ``` This installs the **`zkac-node`** console script. ## Environment | Variable | Meaning | |------------|---------| | `ZKAC_HOME` | Base directory for users (default: `~/.zkac`). Each user lives at `$ZKAC_HOME//`. | ## Server vs client - **Server** (`zkac-node serve`): a node that can **accept registry create/update** from an operator with the **`zkac.mgmt`** credential. It also serves **managed** sessions (BBS+ auth against stored client-managed registries) and optionally a **relay** port for blind issuance queues. - **Client**: a **userid** with files under `$ZKAC_HOME//` (transport key, registries, credentials). ## Ports (defaults) | Port role | Default | Purpose | |------------|---------|---------| | Management | 7400 | ZKAC + static role `zkac.mgmt`; JSON commands (create/update registry, issuance peek/grant). | | Managed | 7401 | ZKAC + `RegistryManager`; member proves a role in a client-managed registry. | | Relay | 7402 | Optional **plaintext** JSON line protocol for enqueue/poll of issuance requests. Use `--relay-port 0` on `serve` to disable. Binds with `--relay-bind` (default `127.0.0.1`). | ## Layout on disk **Per user** (`$ZKAC_HOME//`): - `transport.json` — Ristretto **client** transport keypair (`zkac.Keypair`). - `profile.json` — `userid` and metadata. - `registries//` — one directory per logical registry: - `admin.json` / `registry.json` — produced by `registry-init` (admin issuer material + public state + state cert). - `roles/.json` — member credential payloads for `connect`. - `issued/` — files from `issue-member` (handoff). - `pending/.json` — saved by `issuance-request` until `issuance-poll` finalizes. - `servers/