Expand description
decdn whoami — print the local identity read-only.
Reports the persistent identity under the data dir and generates, stages, rotates, and overwrites nothing.
Two identities can share one data dir, and the command reports both:
- the node identity at the top level: the persisted
node.secretiroh key (its Ed25519 public key — the value a serving node logs asremoteoncdn/client/v1) and the eth keystore at<data_dir>/keystore.json. - the client identity in the
client/subdir: only its eth keystore at<data_dir>/client/keystore.json. A client’s iroh key is ephemeral (a fresh key per fetch), so a client has no persistent node id to report. The client line prints only when that keystore exists.
An absent node key is a note, not an error: a client-only install has no
node.secret, and the command still reports its client eth address. The
node id and paths print first and unconditionally, so the command stays
useful for the node-id diagnosis even when no password is at hand.
An eth address: line always prints; only the decrypted address value is
gated by a password. The address lives inside the encrypted keystore, so it
shows only when a keystore password is available (the
DECDN_KEYSTORE_PASSWORD env var, a --keystore-password-file, or an
interactive prompt on a TTY); otherwise the line is a note (no keystore, or a
password is needed).
One resolved password is tried against whichever keystores are present, and
the two can hold different ones — key-gen writes them at different times
and prompts for each. A keystore that does not open degrades its own line to
a note naming the reason; every other line still prints, and the command
still exits 0. On a TTY the failing keystore gets one more prompt of its own
before the note.
Functions§
- whoami
- Print the local identity read-only: node id, key paths, and eth addresses.