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

Commit 89ab213

Browse files
authored
Merge pull request #5 from PayString/nh/payid-to-paystring
rebrand PayID to PayString
2 parents 6f3a651 + 20edcd2 commit 89ab213

25 files changed

+241
-238
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM node:12-alpine
22

3-
ADD . / payid-cli/
3+
ADD . / paystring-cli/
44

5-
RUN cd payid-cli/ &&\
5+
RUN cd paystring-cli/ &&\
66
npm set unsafe-perm true &&\
77
npm cache clean --force &&\
88
npm install &&\
@@ -11,11 +11,11 @@ RUN cd payid-cli/ &&\
1111

1212
FROM node:12-alpine
1313

14-
RUN mkdir /opt/payid-cli
14+
RUN mkdir /opt/paystring-cli
1515

16-
WORKDIR /opt/payid-cli
16+
WORKDIR /opt/paystring-cli
1717

18-
COPY --from=0 /payid-cli/dist /opt/payid-cli/dist
19-
COPY --from=0 /payid-cli/node_modules /opt/payid-cli/node_modules
18+
COPY --from=0 /paystring-cli/dist /opt/paystring-cli/dist
19+
COPY --from=0 /paystring-cli/node_modules /opt/paystring-cli/node_modules
2020

21-
ENTRYPOINT ["node", "/opt/payid-cli/dist/cli.js"]
21+
ENTRYPOINT ["node", "/opt/paystring-cli/dist/cli.js"]

README.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
# `@payid-org/payid-cli`
1+
# `@paystring/paystring-cli`
22

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

5-
Command-line interface to create, fetch, sign, and verify PayIDs.
6-
Based on the Typescript PayID [Utils](https://github.com/payid-org/utils) library.
5+
Command-line interface to create, fetch, sign, and verify PayStrings.
6+
Based on the Typescript PayString [Utils](https://github.com/paystring/utils) library.
77

88
## Prerequisites
99

10-
Before you install PayID CLI locally, ensure that both [node](https://nodejs.org/en/download/) and
10+
Before you install PayString CLI locally, ensure that both [node](https://nodejs.org/en/download/) and
1111
[npm](https://docs.npmjs.com/downloading-and-installing-packages-locally) are installed locally.
1212

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.
13+
You can also run PayString 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.
1414

1515
## Installation
1616

17-
To install PayID CLI, run the command:
17+
To install PayString CLI, run the command:
1818

1919
```
20-
npm install -g @payid-org/payid-cli
20+
npm install -g @paystring/paystring-cli
2121
```
2222

23-
This command installs PayID CLI as a global npm module and links it as a `payid` executable
24-
(typically under /usr/local/bin/payid).
23+
This command installs PayString CLI as a global npm module and links it as a `paystring` executable
24+
(typically under /usr/local/bin/paystring).
2525

2626
Alternatively, install and run via Docker:
2727

2828
```
29-
docker run xpring/payid-cli
29+
docker run xpring/paystring-cli
3030
```
3131

3232
## Interactive vs. single command mode
3333

34-
You can run PayID CLI in either interactive mode or non-interactive (single command) mode.
34+
You can run PayString CLI in either interactive mode or non-interactive (single command) mode.
3535
In interactive mode, a prompt is displayed, and you can run multiple commands from this prompt. Run the `exit` command to leave interactive mode.
3636

3737
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.
@@ -40,25 +40,25 @@ In non-interactive mode, you run a single command, based on supplied command lin
4040
No prompt is displayed in this mode. Non-interactive mode is useful for running commands from a script, or to chain the results
4141
of multiple commands together.
4242

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

45-
To run the CLI in non-interactive mode, run `payid <command> <arguments>`.
45+
To run the CLI in non-interactive mode, run `paystring <command> <arguments>`.
4646

4747
Examples of non-interactive mode:
4848

49-
The following command lists information about the specified PayID.
49+
The following command lists information about the specified PayString.
5050

5151
```
52-
payid load 'nhartner$xpring.money'
52+
paystring load 'nhartner$xpring.money'
5353
```
5454

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.
55+
You can run multiple commands chained together. This set of commands initializes a new or existing PayString, associates a specified crypto-address for the specified currency and network, and then saves the PayString with this information.
5656

5757
```
58-
payid init 'my$pay.id' && payid crypto-address add btc mainnet notARealAddress && payid save
58+
paystring init 'my$paystring.com' && paystring crypto-address add btc mainnet notARealAddress && paystring save
5959
```
6060

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

6464
## Commands
@@ -69,62 +69,62 @@ The following commands are available:
6969
help [command...] Provides help for a given command.
7070
exit Exits application.
7171
clear Clears the terminal.
72-
crypto-address add <paymentNetwork> <environment> <address> [tag] Starts building a new PayID.
73-
crypto-address remove <address> Removes an address from the current PayID.
72+
crypto-address add <paymentNetwork> <environment> <address> [tag] Starts building a new PayString.
73+
crypto-address remove <address> Removes an address from the current PayString.
7474
keys clear Clears all loaded keys.
7575
keys generate Generates and saves a new identity key.
7676
keys list Lists keys that have been loaded.
7777
keys load <filePath> Loads identity-key from file.
7878
keys print Prints keys that have been loaded in pem format.
79-
init <payid> Initializes a new PayID.
80-
inspect [payId] Inspects signatures on the loaded PayID or from an optionally specified PayID.
81-
load <payId> Loads a PayID from PayID server.
82-
show Shows the currently loaded PayID.
83-
sign Signs the loaded PayID with the loaded signing keys.
84-
verify [payId] Verifies the loaded PayID or an optionally specified PayID.
85-
save Saves the currently loaded PayID.
86-
from-url <url> Converts a URL to a PayID.
87-
to-url <payId> Converts a PayID to a URL.
79+
init <paystring> Initializes a new PayString.
80+
inspect [paystring] Inspects signatures on the loaded PayString or from an optionally specified PayString.
81+
load <paystring> Loads a PayString from PayString server.
82+
show Shows the currently loaded PayString.
83+
sign Signs the loaded PayString with the loaded signing keys.
84+
verify [paystring] Verifies the loaded PayString or an optionally specified PayString.
85+
save Saves the currently loaded PayString.
86+
from-url <url> Converts a URL to a PayString.
87+
to-url <paystring> Converts a PayString to a URL.
8888
8989
```
9090

9191
## Use Cases
9292

93-
### Load a PayID
93+
### Load a PayString
9494

95-
Load an existing PayID from a remote server:
95+
Load an existing PayString from a remote server:
9696

9797
```
9898
load nhartner$xpring.money
9999
```
100100

101-
This command fetches all the PayID address mappings for the given PayID from the remote
101+
This command fetches all the PayString address mappings for the given PayString from the remote
102102
server and displays the resulting JSON.
103103

104-
### Create a new PayID
104+
### Create a new PayString
105105

106-
The following set of commands demonstrates how to create a new PayID, attach multiple
106+
The following set of commands demonstrates how to create a new PayString, attach multiple
107107
address mappings, and save the result to a JSON file.
108108

109109
```
110-
init example$mypayid.com
110+
init example$mypaystring.com
111111
crypto-address add xrpl mainnet rP3t3JStqWPYd8H88WfBYh3v84qqYzbHQ6 12345
112112
crypto-address add btc mainnet 3M2CH71P6uZTra1PsjiEhNFB7kCENShCgt
113113
save
114114
```
115115

116-
The PayID JSON representation specified here is saved to the local filesystem as example.json.
116+
The PayString JSON representation specified here is saved to the local filesystem as example.json.
117117

118118
### Identity Keys
119119

120-
The PayID protocol supports signing address mappings using one or more cryptographic keys.
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.
120+
The PayString protocol supports signing address mappings using one or more cryptographic keys.
121+
PayString CLI provides several commands to generate and load keys. Once a key is generated
122+
or loaded by PayString CLI, it is retained in PayString CLI's local storage for use when you sign your PayString.
123123

124124
You can generate multiple identity keys by using the `keys generate` and `keys load` commands.
125125

126126
To remove all loaded keys from the CLI's local storage, use the `keys clear` command.
127-
To see all keys currently loaded into PayID CLI, use the `keys list` command.
127+
To see all keys currently loaded into PayString CLI, use the `keys list` command.
128128

129129
To generate a new key run:
130130

@@ -135,34 +135,34 @@ keys generate
135135
This generates a new key and saves it to a file named `identity-key.pem`. To load a previously
136136
created identity key, run `keys load </path/to/pem/file>`.
137137

138-
### Sign a PayID
138+
### Sign a PayString
139139

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.
140+
Before you sign an PayString, you must either load the PayString using the `load` command, or create a PayString using the
141+
`init` command, and you must execute commands so that the PayString one or more crypto-addresses.
142142

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.
143+
Once a PayString 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 PayString has been loaded or initialized, and your identity key has been generated or loaded,
144+
you can sign the PayString using `sign` command. The `sign` command signs each of your PayString address
145+
mappings using the loaded identity keys, and outputs the resulting PayString with a `verifiedAddress` field.
146146

147147
By default, the sign command clears the unsigned `addresses` from the results. If you wish to
148148
retain unsigned addresses after signing, use `sign --keep-addresses` or `sign -k` instead.
149149

150-
Finally, run the `save` command to save your PayID, with signed addresses, to file.
150+
Finally, run the `save` command to save your PayString, with signed addresses, to file.
151151

152-
### Inspect a Verified PayID
152+
### Inspect a Verified PayString
153153

154-
Two commands are available to verify a PayID's verified addresses.
154+
Two commands are available to verify a PayString's verified addresses.
155155

156156
- `verify` - checks if all the verified addresses have valid signatures.
157157
- `inspect` - displays details information about each verified address and signatures.
158158

159-
## Create, sign, and inspect a PayID
159+
## Create, sign, and inspect a PayString
160160

161-
With a combination of commands, you can create a PayID, add an address mapping, generate an identity key,
162-
sign your PayID address mapping, and then inspect the final result.
161+
With a combination of commands, you can create a PayString, add an address mapping, generate an identity key,
162+
sign your PayString address mapping, and then inspect the final result.
163163

164164
```
165-
init example$mypayid.com
165+
init example$mypaystring.com
166166
crypto-address add xrpl mainnet rP3t3JStqWPYd8H88WfBYh3v84qqYzbHQ6
167167
keys generate
168168
sign
@@ -171,4 +171,4 @@ inspect
171171

172172
## Legal
173173

174-
By using, reproducing, or distributing this code, you agree to the terms and conditions for use (including the Limitation of Liability) in the [Apache License 2.0](https://github.com/payid-org/payid-cli/blob/master/LICENSE). If you do not agree, you may not use, reproduce, or distribute the code. **This code is not authorised for download in Australia. Any persons located in Australia are expressly prohibited from downloading, using, reproducing or distributing the code.** This code is not owned by, or associated with, NPP Australia Limited, and has no sponsorship, affiliation or other connection with the "Pay ID" service operated by NPP Australia Limited in Australia.
174+
By using, reproducing, or distributing this code, you agree to the terms and conditions for use (including the Limitation of Liability) in the [Apache License 2.0](https://github.com/paystring/payid-cli/blob/master/LICENSE). If you do not agree, you may not use, reproduce, or distribute the code. **This code is not authorised for download in Australia. Any persons located in Australia are expressly prohibited from downloading, using, reproducing or distributing the code.**

package-lock.json

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"name": "@payid-org/payid-cli",
2+
"name": "@paystring/paystring-cli",
33
"version": "1.0.4",
4-
"description": "CLI for PayID",
5-
"homepage": "https://github.com/payid-org/payid-cli#readme",
4+
"description": "CLI for PayString",
5+
"homepage": "https://github.com/paystring/paystring-cli#readme",
66
"bugs": {
7-
"url": "https://github.com/payid-org/payid-cli/issues"
7+
"url": "https://github.com/paystring/paystring-cli/issues"
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/payid-org/payid-cli.git"
11+
"url": "git+https://github.com/paystring/paystring-cli.git"
1212
},
1313
"license": "Apache-2.0",
1414
"author": "",
1515
"main": "dist/index.js",
1616
"types": "dist/index.d.ts",
1717
"bin": {
18-
"payid": "./dist/cli.js"
18+
"paystring": "./dist/cli.js"
1919
},
2020
"files": [
2121
"dist/*"
@@ -28,11 +28,11 @@
2828
"test": "nyc mocha 'test/**/*.test.ts'"
2929
},
3030
"dependencies": {
31-
"@payid-org/utils": "^1.2.0",
31+
"@paystring/utils": "^1.3.0",
3232
"axios": "^0.19.2",
3333
"beautify-json": "^1.0.1",
3434
"jose": "^1.27.3",
35-
"node-forge": "^0.9.1",
35+
"node-forge": "^0.10.0",
3636
"vorpal": "^1.12.0"
3737
},
3838
"devDependencies": {

src/cli.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import * as cmd from './commands'
77
const vorpal = new Vorpal()
88

99
// This enables command history within the CLI similar to bash.
10-
vorpal.history('payid')
10+
vorpal.history('payString')
1111

12-
const localStorage = new cmd.LocalStorage('payid', vorpal)
12+
const localStorage = new cmd.LocalStorage('payString', vorpal)
1313
new cmd.ClearCommand(vorpal, localStorage).setup()
1414
new cmd.AddCryptoAddressCommand(vorpal, localStorage).setup()
1515
new cmd.RemoveCryptoAddressCommand(vorpal, localStorage).setup()
@@ -18,18 +18,18 @@ new cmd.GenerateIdentityKeyCommand(vorpal, localStorage).setup()
1818
new cmd.ListKeysCommand(vorpal, localStorage).setup()
1919
new cmd.LoadIdentityKeyCommand(vorpal, localStorage).setup()
2020
new cmd.PrintKeysCommand(vorpal, localStorage).setup()
21-
new cmd.InitPayIdCommand(vorpal, localStorage).setup()
22-
new cmd.InspectPayIdCommand(vorpal, localStorage).setup()
23-
new cmd.LoadPayIdCommand(vorpal, localStorage).setup()
24-
new cmd.ShowPayIdCommand(vorpal, localStorage).setup()
25-
new cmd.SignPayIdCommand(vorpal, localStorage).setup()
26-
new cmd.VerifyPayIdCommand(vorpal, localStorage).setup()
27-
new cmd.SavePayIdCommand(vorpal, localStorage).setup()
28-
new cmd.UrlToPayIdCommand(vorpal, localStorage).setup()
29-
new cmd.PayIdToUrlCommand(vorpal, localStorage).setup()
21+
new cmd.InitPayStringCommand(vorpal, localStorage).setup()
22+
new cmd.InspectPayStringCommand(vorpal, localStorage).setup()
23+
new cmd.LoadPayStringCommand(vorpal, localStorage).setup()
24+
new cmd.ShowPayStringCommand(vorpal, localStorage).setup()
25+
new cmd.SignPayStringCommand(vorpal, localStorage).setup()
26+
new cmd.VerifyPayStringCommand(vorpal, localStorage).setup()
27+
new cmd.SavePayStringCommand(vorpal, localStorage).setup()
28+
new cmd.UrlToPayStringCommand(vorpal, localStorage).setup()
29+
new cmd.PayStringToUrlCommand(vorpal, localStorage).setup()
3030

3131
// The CLI can be run in interactive mode or to run a single command and terminate.
32-
// For CLI mode, process.argv will have 2 values (e.g. node dist/cli.js) even if using the alias 'payid-utils'.
32+
// For CLI mode, process.argv will have 2 values (e.g. node dist/cli.js) even if using the alias 'paystring-utils'.
3333
// For single command mode there will be additional arguments for the single command.
3434
if (process.argv.length > 2) {
3535
vorpal.parse(process.argv)

0 commit comments

Comments
 (0)