You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2024. It is now read-only.
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.
15
14
16
15
## Installation
17
16
18
-
To install the PayID CLI, run the command:
17
+
To install PayID CLI, run the command:
19
18
20
19
```
21
20
npm install -g @payid-org/payid-cli
22
21
```
23
22
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
25
24
(typically under /usr/local/bin/payid).
26
25
27
26
Alternatively, install and run via Docker:
@@ -30,32 +29,36 @@ Alternatively, install and run via Docker:
30
29
docker run xpring/payid-cli
31
30
```
32
31
33
-
## Interactive vs single command mode
32
+
## Interactive vs. single command mode
34
33
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.
39
36
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
42
41
of multiple commands together.
43
42
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.
45
44
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.
47
50
48
51
```
49
52
payid load 'nhartner$xpring.money'
50
53
```
51
54
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.
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.
115
117
116
118
### Identity Keys
117
119
118
120
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
+
122
126
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.
124
128
125
-
To generate new key run:
129
+
To generate a new key run:
126
130
127
131
```
128
132
keys generate
129
133
```
130
134
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
132
136
created identity key, run `keys load </path/to/pem/file>`.
133
137
134
-
### Signing a PayID
138
+
### Sign a PayID
135
139
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.
139
142
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.
144
147
145
-
### Inspecting a Verified PayID
148
+
### Inspect a Verified PayID
146
149
147
150
Two commands are available to verify a PayID's verified addresses.
148
151
149
152
-`verify` - checks if all the verified addresses have valid signatures.
150
153
-`inspect` - displays details information about each verified address and signatures.
151
154
152
-
## Creating, Signing and Inspecting a PayID
155
+
## Create, Sign, and Inspect a PayID
153
156
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.
0 commit comments