-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add CLI description to docs (#239)
Co-authored-by: MakMuftic <makmuftic@chainsafe.io>
- Loading branch information
Showing
3 changed files
with
69 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
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,67 @@ | ||
# Sygma Relayer CLI Guide | ||
|
||
### Introduction | ||
|
||
This guide details specific Command Line Interface (CLI) commands for the Sygma relayer, focusing on functionalities provided in the `topology`, `peer`, and `utils` modules. | ||
|
||
## Topology commands | ||
|
||
### Encrypt Topology Command (topology) | ||
|
||
#### Usage: | ||
`./sygma-relayer topology encrypt --path [path] --encryption-key [key]` | ||
|
||
#### Description: | ||
Encrypt the provided topology with AES CTR. Outputs IV and ciphertext in hex. | ||
|
||
#### Flags: | ||
- `--path`: Path to JSON file with network topology. | ||
- `--encryption-key`: Password to encrypt topology. | ||
|
||
### Test Topology Command (topology) | ||
|
||
#### Usage: | ||
`./sygma-relayer topology test --url [url] --decryption-key [key] --hash [hash]` | ||
|
||
#### Description: | ||
Test if the provided URL contains a topology that can be decrypted with the provided password and parsed accordingly. | ||
|
||
#### Flags: | ||
- `--decryption-key`: Password to decrypt topology. | ||
- `--url`: URL to fetch topology. | ||
- `--hash`: Hash of the topology. | ||
|
||
## Libp2p (peer) commands | ||
|
||
### Generate Key Command (peer) | ||
|
||
#### Usage: | ||
`./sygma-relayer peer gen-key` | ||
|
||
#### Description: | ||
Generate a libp2p identity key using RSA with a key length of 2048 bits. | ||
|
||
### Peer Info Command (peer) | ||
|
||
#### Usage: | ||
`./sygma-relayer peer info --private-key [key]` | ||
|
||
#### Description: | ||
Calculate a libp2p peer ID from the provided base64 encoded libp2p private key. | ||
|
||
#### Flags: | ||
- `--private-key`: Base64 encoded libp2p private key. | ||
|
||
## Other util commands | ||
|
||
### Derivate SS58 Command (utils) | ||
|
||
#### Usage: | ||
`./sygma-relayer utils derivateSS58 --privateKey [key] --networkID [id]` | ||
|
||
#### Description: | ||
Print an SS58 formatted address (Polkadot) for a given PrivateKey in hex. | ||
|
||
#### Flags: | ||
- `--privateKey`: Hex encoded private key. | ||
- `--networkID`: Network ID for a checksum, as per the registry. |
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