pub fn write_key_file(path: &Path, nsec: &str) -> Result<(), ConfigError>Expand description
Write a bare bech32 nsec to a key file with restricted permissions.
On Unix, the file is created with mode 0600 (owner read/write only). On Windows, the file inherits default ACLs from the parent directory.