lea-keygen
Command-Line UsageThis guide provides detailed instructions for using the lea-keygen
command-line tool to generate Lea Chain keysets.
For one-off commands, you can use npx
without any installation:
Alternatively, you can install it globally to use the lea-keygen
command directly:
The lea-keygen
tool supports two main commands: new
and verify
.
new
Generates a new keyset.
--no-outfile
: Prints the generated keyset to standard output (stdout
) as a JSON array instead of saving it to a file.--outfile <path>
: Specifies a custom file path to save the keyset. If this is not provided, the keyset is saved to <address>.json
in the current directory.--force
: If a keyset file already exists at the target path, this flag allows overwriting it. Without this flag, the tool will exit with an error to prevent accidental data loss.This is the default behavior. It generates a new keyset and saves it to a file named after the derived public address.
Command:
Output (to stderr):
The resulting file will contain the full keyset with secure file permissions (600
).
Use the --no-outfile
flag to prevent writing to a file and instead print the keyset to stdout
.
Command:
Output (to stdout):
Output (to stderr):
verify
Displays the public address for a given keyset file.
<file_path>
: The path to the keyset JSON file.This command reads a keyset file, derives the public address from it, and prints the address to standard output. This is useful for verifying the address of a wallet without needing to generate a new key.
Command:
Output (to stdout):
This project is licensed under the MIT License. See the LICENSE file for details.