Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 2df2144

Browse files
authored
Update README.md
Minor updates for clarity and style.
1 parent 38a60ab commit 2df2144

File tree

1 file changed

+47
-44
lines changed

1 file changed

+47
-44
lines changed

README.md

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@
22

33
![NPM version badge](https://img.shields.io/npm/v/@payid-org/payid-cli)
44

5-
Command-line interface for creating, fetching, signing and verifying PayIDs.
5+
Command-line interface to create, fetch, sign, and verify PayIDs.
66
Based on the Typescript PayID [Utils](https://github.com/payid-org/utils) library.
77

88
## Prerequisites
99

10-
In order to use the CLI, both [node](https://nodejs.org/en/download/) and
11-
[npm](https://docs.npmjs.com/downloading-and-installing-packages-locally) must be installed first.
10+
Before you install PayID CLI locally, ensure that both [node](https://nodejs.org/en/download/) and
11+
[npm](https://docs.npmjs.com/downloading-and-installing-packages-locally) are installed locally.
1212

13-
Alternatively, the CLI can be run as a Docker container, though commands that store information
14-
locally will only persist for the duration of the container.
13+
You can also run PayID CLI as a Docker container. If you run commands that cause information to be stored locally, that information only persists for the duration of the container.
1514

1615
## Installation
1716

18-
To install the PayID CLI, run the command:
17+
To install PayID CLI, run the command:
1918

2019
```
2120
npm install -g @payid-org/payid-cli
2221
```
2322

24-
This will install the CLI as a global npm module and link it as a `payid` executable
23+
This command installs PayID CLI as a global npm module and links it as a `payid` executable
2524
(typically under /usr/local/bin/payid).
2625

2726
Alternatively, install and run via Docker:
@@ -30,32 +29,36 @@ Alternatively, install and run via Docker:
3029
docker run xpring/payid-cli
3130
```
3231

33-
## Interactive vs single command mode
32+
## Interactive vs. single command mode
3433

35-
CLI can be run in interactive mode or non-interactive (single command) mode.
36-
In interactive mode, a prompt is shown where multiple commands can be run until the `exit` command is run.
37-
Interactive mode retains a history of commands run which can be accessed using the up arrow key. Command completion
38-
is available using the tab key.
34+
You can run PayID CLI in either interactive mode or non-interactive (single command) mode.
35+
In interactive mode, a prompt is displayed, and you can run multiple commands from this prompt. Run the `exit` command to leave interactive mode.
3936

40-
In non-interactive mode, a single command is run (based on supplied command line arguments) and then the CLI exits.
41-
No prompt is shown in this mode. This mode is useful for running commands from a script as well as chaining the results
37+
Interactive mode retains a history of executed commands that you can access by with the up arrow key. Use the <Tab> key for command completion.
38+
39+
In non-interactive mode, you run a single command, based on supplied command line arguments, and then the CLI exits.
40+
No prompt is displayed in this mode. Non-interactive mode is useful for running commands from a script, or to chain the results
4241
of multiple commands together.
4342

44-
To run the CLI in interactive mode, run `payid`.
43+
To run the CLI in interactive mode, run `payid`. You can now enter `<command> arguments` for each command you want to run.
4544

46-
To run the CLI in non-interactive, run `payid <command> <arguments>`. Examples:
45+
To run the CLI in non-interactive mode, run `payid <command> <arguments>`.
46+
47+
Examples of non-interactive mode:
48+
49+
The following command lists information about the specified PayID.
4750

4851
```
4952
payid load 'nhartner$xpring.money'
5053
```
5154

52-
Or to run multiple commands:
55+
You can run multiple commands chained together. This set of commands initializes a new or existing PayID, associates a specified crypto-address for the specified currency and network, and then saves the PayID with this information.
5356

5457
```
5558
payid init 'my$pay.id' && payid crypto-address add btc mainnet notARealAddress && payid save
5659
```
5760

58-
_Note_: when passing a PayID as an argument in non-interactive mode, the PayID needs to be escaped or quoted
61+
_Note_: when passing a PayID as an argument in non-interactive mode, the PayID must be escaped or quoted
5962
to avoid the '\$' being interpolated as a variable by the shell.
6063

6164
## Commands
@@ -87,21 +90,21 @@ The following commands are available:
8790

8891
## Use Cases
8992

90-
### Loading a PayID
93+
### Load a PayID
9194

92-
The following command can be used to load an existing PayID from a remote server:
95+
Load an existing PayID from a remote server:
9396

9497
```
95-
load nhartner$xpring
98+
load nhartner$xpring.money
9699
```
97100

98-
This will fetch all the PayID address mappings for the given PayID from the remote
101+
This command fetches all the PayID address mappings for the given PayID from the remote
99102
server and displays the resulting JSON.
100103

101-
### Creating a new PayID
104+
### Create a new PayID
102105

103106
The following set of commands demonstrates how to create a new PayID, attach multiple
104-
address mappings and save the result to a JSON file.
107+
address mappings, and save the result to a JSON file.
105108

106109
```
107110
init example$mypayid.com
@@ -110,49 +113,49 @@ crypto-address add btc mainnet 3M2CH71P6uZTra1PsjiEhNFB7kCENShCgt
110113
save
111114
```
112115

113-
The end result should be a PayID json representation being saved to the local filesystem as
114-
example.json.
116+
The PayID JSON representation specified here is saved to the local filesystem as example.json.
115117

116118
### Identity Keys
117119

118120
The PayID protocol supports signing address mappings using one or more cryptographic keys.
119-
The CLI provides several commands for generating and loading keys. Once a key is generated
120-
or loaded by the CLI, it is retained in the CLI's local storage for use in signing your PayID.
121-
Multiple identity keys can be generated or loaded using the `keys generate` and `keys load` commands.
121+
PayID CLI provides several commands to generate and load keys. Once a key is generated
122+
or loaded by PayID CLI, it is retained in PayID CLI's local storage for use when you sign your PayID.
123+
124+
You can generate multiple identity keys by using the `keys generate` and `keys load` commands.
125+
122126
To remove all loaded keys from the CLI's local storage, use the `keys clear` command.
123-
The `keys list` command will show you all keys currently loaded into the CLI.
127+
To see all keys currently loaded into PayID CLI, use the `keys list` command.
124128

125-
To generate new key run:
129+
To generate a new key run:
126130

127131
```
128132
keys generate
129133
```
130134

131-
This will generate a new key and save it to a file named `identity-key.pem`. To load a previously
135+
This generates a new key and saves it to a file named `identity-key.pem`. To load a previously
132136
created identity key, run `keys load </path/to/pem/file>`.
133137

134-
### Signing a PayID
138+
### Sign a PayID
135139

136-
In order to sign an PayID, it must either be loaded using the `load` command or created using the
137-
`init` command (as well as executing commands to add 1 or more addresses). Once a PayID has been
138-
initialized or loaded, it can be signed using an identity key (refer to the above section).
140+
Before you sign an PayID, you must either load the PayID using the `load` command, or create a PayID using the
141+
`init` command, and you must execute commands so that the PayID one or more crypto-addresses.
139142

140-
Once your PayID has been loaded or initialized, and your identity key has been generated or loaded,
141-
you can sign the PayID using the command `sign`. This command will signed each of your PayID address
142-
mappings using the loaded identity keys and out the resulting PayID with verifiedAddress. The `save`
143-
command can be used to save your PayID, with signed addresses, to file.
143+
Once a PayID has been initialized or loaded, you can sign it using an [identity key](#identity-keys). You must either generate a new key, or load an existing one. Once your PayID has been loaded or initialized, and your identity key has been generated or loaded,
144+
you can sign the PayID using `sign` command. The `sign` command signs each of your PayID address
145+
mappings using the loaded identity keys, and outputs the resulting PayID with a `verifiedAddress` field. Run the `save`
146+
command to save your PayID, with signed addresses, to file.
144147

145-
### Inspecting a Verified PayID
148+
### Inspect a Verified PayID
146149

147150
Two commands are available to verify a PayID's verified addresses.
148151

149152
- `verify` - checks if all the verified addresses have valid signatures.
150153
- `inspect` - displays details information about each verified address and signatures.
151154

152-
## Creating, Signing and Inspecting a PayID
155+
## Create, Sign, and Inspect a PayID
153156

154-
Bringing all the above commands together, we can create a PayID, add an address mapping, generate an identity key,
155-
sign our PayID address mapping and then inspect the final result.
157+
With a combination of commands, you can create a PayID, add an address mapping, generate an identity key,
158+
sign your PayID address mapping, and then inspect the final result.
156159

157160
```
158161
init example$mypayid.com

0 commit comments

Comments
 (0)