-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: Nano.Community CLI | ||
description: Documentation for the Nano.Community CLI | ||
tags: nano, xno, cli, nano-community, alias, representative, metadata, signing key | ||
--- | ||
|
||
# Nano.Community CLI | ||
|
||
## Installation | ||
|
||
### Setting Environment Variables | ||
|
||
The best way to pass the private key to the CLI is to set the `NC_CLI_NANO_PRIVATE_KEY` environment variable. | ||
|
||
**Linux/Mac:** | ||
|
||
```bash | ||
export NC_CLI_NANO_PRIVATE_KEY='your_private_key_here' | ||
``` | ||
|
||
**Windows:** | ||
|
||
```cmd | ||
set NC_CLI_NANO_PRIVATE_KEY=your_private_key_here | ||
``` | ||
|
||
## Usage | ||
|
||
### Setting up a signing key (optional) | ||
|
||
The purpose of a signing key is to sign messages to manage metadata related to a nano account/representative or block while minimizing the exposure of the account private key. This is optional but recommended. | ||
|
||
```bash | ||
nano-cli add-signing-key | ||
``` | ||
|
||
This will generate a new signing key and output the public and private keys in the console. Take care to securely store the private key. | ||
|
||
This new signing key can now be used in place of your account key. Make sure to replace the `NC_CLI_NANO_PRIVATE_KEY` environment variable with the newly generated private key of the signing key. | ||
|
||
#### Revoking a signing key | ||
|
||
To revoke a signing key, use the `revoke-signing-key` command. The signing key can be revoked by either the signing key or the account key. | ||
|
||
```bash | ||
nano-cli revoke-signing-key | ||
``` | ||
|
||
### Updating Nano Representative Metadata | ||
|
||
To update the metadata for a Nano representative use the `update-rep-meta` command. | ||
|
||
1. Run the command: | ||
```bash | ||
nano-cli update-rep-meta | ||
``` | ||
2. You will be prompted to enter various metadata fields such as alias, description, donation address, etc. Fill these out as required. | ||
3. Review the entered data when prompted, and confirm to proceed. | ||
4. The CLI will sign and send the metadata update to the nano.community API, confirming the request in the console output. | ||
|
||
### Updating Nano Account Metadata | ||
|
||
You can set a public alias for a nano account using the `update-account-meta` command. | ||
|
||
```bash | ||
nano-cli update-account-meta | ||
``` | ||
|
||
### Updating Nano Block Metadata | ||
|
||
You can set a public message for a nano block using the `update-block-meta` command. | ||
|
||
```bash | ||
nano-cli update-block-meta | ||
``` |