Skip to main content

Module node_key

Module node_key 

Source
Expand description

File-backed node key shared by the daemon and one-shot foreground boots. File-backed node key (<runtime-dir>/node.key).

The 32-byte Ed25519 seed the node id is derived from (ADR-025, ADR-103 D11). Shared by the daemon and weft kernel boot --foreground so both get the same stable id.

Enums§

NodeKeyError
Errors loading or creating the node key.

Constants§

NODE_KEY_FILE
Filename of the node keypair under the runtime directory.

Functions§

load_or_generate_key_file
load_or_generate_node_key for another key file in dir (a plain file name, no path separators), with the same creation and permission rules. The daemon’s placement control key in service mode uses it (ADR-106).
load_or_generate_node_key
Load <runtime_dir>/node.key, creating it (mode 0600) if absent. The runtime dir is created too.