Skip to content

Commit 761b7e7

Browse files
committed
Rename getKeys action to list
1 parent ff6336d commit 761b7e7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ A command line CodeChain key management tool
1616

1717
Action:
1818

19-
getKeys : Get all saved addresses
19+
list : List all the saved addresses
2020
create : Create new key with passphrase
2121
delete : Delete the key of the given address
2222

2323
Examples:
2424

2525
cckey create -t platform --passphrase "my password"
2626

27-
cckey getKeys -t asset
27+
cckey list -t asset
2828

2929
cckey delete -t platform --address "tcc..."
3030

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ commander
2121
commander.on("--help", () => {
2222
console.log(` Action:
2323
24-
getKeys : Get all saved addresses
24+
list : List all the saved addresses
2525
create : Create new key with passphrase
2626
delete : Delete the key of the given address
2727
`);
@@ -30,7 +30,7 @@ commander.on("--help", () => {
3030
3131
cckey create -t platform --passphrase "my password"
3232
33-
cckey getKeys -t asset
33+
cckey list -t asset
3434
3535
cckey delete -t platform --address "tcc..."
3636
`);
@@ -53,7 +53,7 @@ async function main(action: string, option: Option) {
5353
}
5454

5555
switch (action) {
56-
case "getKeys":
56+
case "list":
5757
let keys = await cckey[accountType].getKeys();
5858
keys = _.map(keys, publicKey =>
5959
getAddressFromPublic(accountType, publicKey)

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type AccountType = "platform" | "asset";
2-
export type Action = "getKeys" | "create" | "delete";
3-
export const actions: Action[] = ["getKeys", "create", "delete"];
2+
export type Action = "list" | "create" | "delete";
3+
export const actions: Action[] = ["list", "create", "delete"];
44

55
export interface Option {
66
"account-type"?: string;

0 commit comments

Comments
 (0)