From 4c9167119ce74f877a91e939bbba029196934ac9 Mon Sep 17 00:00:00 2001 From: Roman Brazhnyk Date: Mon, 19 Aug 2024 18:34:19 +0800 Subject: [PATCH] feat: FTL-14487 add commands to manage Iota configs (#399) --- README.md | 2 + docs/generate.md | 2 +- docs/iam.md | 10 +- docs/iota.md | 290 ++++++++++++++++++++++++++ docs/login.md | 32 +-- docs/project.md | 10 +- docs/start.md | 2 +- docs/stop.md | 2 +- docs/token.md | 10 +- docs/wallet.md | 137 ++++++++++++ docs/whoami.md | 2 +- package-lock.json | 211 ++++++++++++++++--- package.json | 8 + src/commands/iota/create-config.ts | 183 ++++++++++++++++ src/commands/iota/create-query.ts | 83 ++++++++ src/commands/iota/delete-config.ts | 37 ++++ src/commands/iota/delete-query.ts | 42 ++++ src/commands/iota/get-config.ts | 38 ++++ src/commands/iota/get-query.ts | 43 ++++ src/commands/iota/list-configs.ts | 18 ++ src/commands/iota/list-queries.ts | 38 ++++ src/commands/iota/update-config.ts | 104 +++++++++ src/commands/iota/update-query.ts | 90 ++++++++ src/commands/wallet/create-wallet.ts | 112 ++++++++++ src/commands/wallet/delete-wallet.ts | 37 ++++ src/commands/wallet/get-wallet.ts | 38 ++++ src/commands/wallet/list-wallets.ts | 18 ++ src/commands/wallet/update-wallet.ts | 73 +++++++ src/common/constants.ts | 5 + src/services/affinidi/cwe/service.ts | 72 +++++++ src/services/affinidi/errors.ts | 9 +- src/services/affinidi/iota/service.ts | 134 ++++++++++++ test/commands/iota/configs.test.ts | 157 ++++++++++++++ test/commands/iota/queries.test.ts | 117 +++++++++++ test/commands/wallet/wallets.test.ts | 184 ++++++++++++++++ test/helpers/phone-pex-query.json | 32 +++ 36 files changed, 2316 insertions(+), 66 deletions(-) create mode 100644 docs/iota.md create mode 100644 docs/wallet.md create mode 100644 src/commands/iota/create-config.ts create mode 100644 src/commands/iota/create-query.ts create mode 100644 src/commands/iota/delete-config.ts create mode 100644 src/commands/iota/delete-query.ts create mode 100644 src/commands/iota/get-config.ts create mode 100644 src/commands/iota/get-query.ts create mode 100644 src/commands/iota/list-configs.ts create mode 100644 src/commands/iota/list-queries.ts create mode 100644 src/commands/iota/update-config.ts create mode 100644 src/commands/iota/update-query.ts create mode 100644 src/commands/wallet/create-wallet.ts create mode 100644 src/commands/wallet/delete-wallet.ts create mode 100644 src/commands/wallet/get-wallet.ts create mode 100644 src/commands/wallet/list-wallets.ts create mode 100644 src/commands/wallet/update-wallet.ts create mode 100644 src/services/affinidi/cwe/service.ts create mode 100644 src/services/affinidi/iota/service.ts create mode 100644 test/commands/iota/configs.test.ts create mode 100644 test/commands/iota/queries.test.ts create mode 100644 test/commands/wallet/wallets.test.ts create mode 100644 test/helpers/phone-pex-query.json diff --git a/README.md b/README.md index 17820ab2..3d881e51 100644 --- a/README.md +++ b/README.md @@ -256,12 +256,14 @@ When you run `affinidi stop` your session information is deleted. * [`affinidi generate`](docs/generate.md) - Use these commands to generate code to get started or to scaffold your solution * [`affinidi help`](docs/help.md) - Display help for affinidi. * [`affinidi iam`](docs/iam.md) - Use these commands to manage policies for access configuration +* [`affinidi iota`](docs/iota.md) - Use these commands to manage Iota configurations * [`affinidi login`](docs/login.md) - Use these commands for user login configuration and group management * [`affinidi project`](docs/project.md) - Use these commands to manage your projects * [`affinidi search`](docs/search.md) - Search for a command. * [`affinidi start`](docs/start.md) - Log in to Affinidi * [`affinidi stop`](docs/stop.md) - Log out from Affinidi * [`affinidi token`](docs/token.md) - Use these commands for Personal Access Token (PAT) management +* [`affinidi wallet`](docs/wallet.md) - Use these commands to manage your wallets * [`affinidi whoami`](docs/whoami.md) - Returns user's subject, projects, and token details from the current session. diff --git a/docs/generate.md b/docs/generate.md index 97cf408c..b4787a17 100644 --- a/docs/generate.md +++ b/docs/generate.md @@ -34,4 +34,4 @@ EXAMPLES $ affinidi generate app --path "../my-app" --framework django --provider affinidi --force ``` -_See code: [src/commands/generate/app.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/generate/app.ts)_ +_See code: [src/commands/generate/app.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/generate/app.ts)_ diff --git a/docs/iam.md b/docs/iam.md index 1f574e2d..d10c10a6 100644 --- a/docs/iam.md +++ b/docs/iam.md @@ -44,7 +44,7 @@ FLAG DESCRIPTIONS Get a list of possible IDs with command affinidi token list-tokens ``` -_See code: [src/commands/iam/add-principal.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/iam/add-principal.ts)_ +_See code: [src/commands/iam/add-principal.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iam/add-principal.ts)_ ## `affinidi iam get-policies` @@ -82,7 +82,7 @@ FLAG DESCRIPTIONS Get a list of possible IDs with command affinidi token list-tokens ``` -_See code: [src/commands/iam/get-policies.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/iam/get-policies.ts)_ +_See code: [src/commands/iam/get-policies.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iam/get-policies.ts)_ ## `affinidi iam list-principals` @@ -106,7 +106,7 @@ EXAMPLES $ affinidi iam list-principals ``` -_See code: [src/commands/iam/list-principals.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/iam/list-principals.ts)_ +_See code: [src/commands/iam/list-principals.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iam/list-principals.ts)_ ## `affinidi iam remove-principal` @@ -143,7 +143,7 @@ FLAG DESCRIPTIONS Get a list of possible IDs with command affinidi token list-tokens ``` -_See code: [src/commands/iam/remove-principal.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/iam/remove-principal.ts)_ +_See code: [src/commands/iam/remove-principal.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iam/remove-principal.ts)_ ## `affinidi iam update-policies` @@ -182,4 +182,4 @@ FLAG DESCRIPTIONS Get a list of possible IDs with command affinidi token list-tokens ``` -_See code: [src/commands/iam/update-policies.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/iam/update-policies.ts)_ +_See code: [src/commands/iam/update-policies.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iam/update-policies.ts)_ diff --git a/docs/iota.md b/docs/iota.md new file mode 100644 index 00000000..ce31e9c2 --- /dev/null +++ b/docs/iota.md @@ -0,0 +1,290 @@ +`affinidi iota` +=============== + +Use these commands to manage Iota configurations + +* [`affinidi iota create-config`](#affinidi-iota-create-config) +* [`affinidi iota create-query`](#affinidi-iota-create-query) +* [`affinidi iota delete-config`](#affinidi-iota-delete-config) +* [`affinidi iota delete-query`](#affinidi-iota-delete-query) +* [`affinidi iota get-config`](#affinidi-iota-get-config) +* [`affinidi iota get-query`](#affinidi-iota-get-query) +* [`affinidi iota list-configs`](#affinidi-iota-list-configs) +* [`affinidi iota list-queries`](#affinidi-iota-list-queries) +* [`affinidi iota update-config`](#affinidi-iota-update-config) +* [`affinidi iota update-query`](#affinidi-iota-update-query) + +## `affinidi iota create-config` + +Creates Affinidi Iota Framework configuration in your active project + +``` +USAGE + $ affinidi iota create-config [--json] [--no-color] [--no-input] [-n ] [-d + ] [-w ] [--token-max-age ] [--response-webhook-url ] [--enable-verification] + [--enable-consent-audit-log] [--client-name ] [--client-origin ] [--client-logo ] + +FLAGS + -d, --description= Description of the Affinidi Iota Framework configuration + -n, --name= Name of the Affinidi Iota Framework configuration + -w, --wallet-ari= ARI of the wallet + --client-logo= Application URL of a logo, displayed in the consent page + --client-name= Name, displayed in the consent page + --client-origin= Domain, displayed in the consent page + --enable-consent-audit-log Log consents + --enable-verification Perform verification + --response-webhook-url= Affinidi Iota Framework response webhook URL + --token-max-age= Token expiration time in seconds + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota create-config -n -w + + $ affinidi iota create-config --name --wallet-ari + + $ affinidi iota create-config --name --wallet-ari --enable-consent-audit-log --enable-verification --token-max-age +``` + +_See code: [src/commands/iota/create-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/create-config.ts)_ + +## `affinidi iota create-query` + +Creates PEX query for your Affinidi Iota Framework configuration + +``` +USAGE + $ affinidi iota create-query [--json] [--no-color] [--no-input] [-c ] [-n + ] [-d ] [-f ] + +FLAGS + -c, --configuration-id= ID of the Affinidi Iota Framework configuration + -d, --description= PEX query description + -f, --file= Location of a json file containing PEX query + -n, --name= PEX query name + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota create-query -c -n -d -f pexQuery.json + + $ affinidi iota create-query --configuration-id --name --description --file pexQuery.json +``` + +_See code: [src/commands/iota/create-query.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/create-query.ts)_ + +## `affinidi iota delete-config` + +Deletes Affinidi Iota Framework configuration from your active project + +``` +USAGE + $ affinidi iota delete-config [--json] [--no-color] [--no-input] [-i ] + +FLAGS + -i, --id= ID of the Affinidi Iota Framework configuration + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota delete-config -i + + $ affinidi iota delete-config --id +``` + +_See code: [src/commands/iota/delete-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/delete-config.ts)_ + +## `affinidi iota delete-query` + +Deletes the PEX query from your Affinidi Iota Framework configuration + +``` +USAGE + $ affinidi iota delete-query [--json] [--no-color] [--no-input] [-c ] [-i + ] + +FLAGS + -c, --configuration-id= ID of the Affinidi Iota Framework configuration + -i, --query-id= PEX query ID + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota delete-query -c -i + + $ affinidi iota delete-query --configuration-id --query-id +``` + +_See code: [src/commands/iota/delete-query.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/delete-query.ts)_ + +## `affinidi iota get-config` + +Gets the details of the Affinidi Iota Framework configuration in your active project + +``` +USAGE + $ affinidi iota get-config [--json] [--no-color] [--no-input] [-i ] + +FLAGS + -i, --id= ID of the Affinidi Iota Framework configuration + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota get-config -i + + $ affinidi iota get-config --id +``` + +_See code: [src/commands/iota/get-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/get-config.ts)_ + +## `affinidi iota get-query` + +Gets the PEX query details for your Affinidi Iota Framework configuration + +``` +USAGE + $ affinidi iota get-query [--json] [--no-color] [--no-input] [-c ] [-i + ] + +FLAGS + -c, --configuration-id= ID of the Affinidi Iota Framework configuration + -i, --query-id= PEX query ID + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota get-query -c -i + + $ affinidi iota get-query --configuration-id --query-id +``` + +_See code: [src/commands/iota/get-query.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/get-query.ts)_ + +## `affinidi iota list-configs` + +Lists Affinidi Iota Framework configurations in your active project + +``` +USAGE + $ affinidi iota list-configs [--json] [--no-color] [--no-input] + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota list-configs +``` + +_See code: [src/commands/iota/list-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/list-configs.ts)_ + +## `affinidi iota list-queries` + +Lists PEX queries for your Affinidi Iota Framework configuration + +``` +USAGE + $ affinidi iota list-queries [--json] [--no-color] [--no-input] [-c ] + +FLAGS + -c, --configuration-id= ID of the Affinidi Iota Framework configuration + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota list-queries -c + + $ affinidi iota list-queries --configuration-id +``` + +_See code: [src/commands/iota/list-queries.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/list-queries.ts)_ + +## `affinidi iota update-config` + +Updates Affinidi Iota Framework configuration in your active project + +``` +USAGE + $ affinidi iota update-config [--json] [--no-color] [--no-input] [-i ] [-n + ] [-d ] [--wallet-ari ] [--token-max-age ] [--response-webhook-url ] + [--enable-verification] [--enable-consent-audit-log] [--client-name ] [--client-origin ] + [--client-logo ] + +FLAGS + -d, --description= Description of the Affinidi Iota Framework configuration + -i, --id= ID of the Affinidi Iota Framework configuration + -n, --name= Name of the Affinidi Iota Framework configuration + --client-logo= Application URL of a logo, displayed in the consent page + --client-name= Name, displayed in the consent page + --client-origin= Domain, displayed in the consent page + --enable-consent-audit-log Log consents + --enable-verification Perform verification + --response-webhook-url= Affinidi Iota Framework response webhook URL + --token-max-age= Token expiration time in seconds - integer between 1 and 10 + --wallet-ari= ARI of the wallet + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota update-config -i + + $ affinidi iota update-config --id +``` + +_See code: [src/commands/iota/update-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/update-config.ts)_ + +## `affinidi iota update-query` + +Updates PEX query for your Affinidi Iota Framework configuration + +``` +USAGE + $ affinidi iota update-query [--json] [--no-color] [--no-input] [-c ] [-i + ] [-d ] [-f ] + +FLAGS + -c, --configuration-id= ID of the Affinidi Iota Framework configuration + -d, --description= PEX query description + -f, --file= Location of a json file containing PEX query + -i, --query-id= PEX query ID + +GLOBAL FLAGS + --json Format output as json. + --no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag. + --no-input Disables all the interactive prompts + +EXAMPLES + $ affinidi iota update-query -c -i -d -f pexQuery.json + + $ affinidi iota update-query --configuration-id --query-id -d -f pexQuery.json + + $ affinidi iota update-query --configuration-id --query-id --description --file pexQuery.json +``` + +_See code: [src/commands/iota/update-query.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/iota/update-query.ts)_ diff --git a/docs/login.md b/docs/login.md index 3b030344..c09449e3 100644 --- a/docs/login.md +++ b/docs/login.md @@ -42,7 +42,7 @@ EXAMPLES $ affinidi login add-user-to-group --group-name my_group --user-id did:key:12345 ``` -_See code: [src/commands/login/add-user-to-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/add-user-to-group.ts)_ +_See code: [src/commands/login/add-user-to-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/add-user-to-group.ts)_ ## `affinidi login create-config` @@ -93,7 +93,7 @@ FLAG DESCRIPTIONS none: For public clients (native/mobile apps) which can not have a secret ``` -_See code: [src/commands/login/create-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/create-config.ts)_ +_See code: [src/commands/login/create-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/create-config.ts)_ ## `affinidi login create-group` @@ -117,7 +117,7 @@ EXAMPLES $ affinidi login create-group --name my_new_group ``` -_See code: [src/commands/login/create-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/create-group.ts)_ +_See code: [src/commands/login/create-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/create-group.ts)_ ## `affinidi login delete-config` @@ -141,7 +141,7 @@ EXAMPLES $ affinidi login delete-config --id ``` -_See code: [src/commands/login/delete-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/delete-config.ts)_ +_See code: [src/commands/login/delete-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/delete-config.ts)_ ## `affinidi login delete-group` @@ -165,7 +165,7 @@ EXAMPLES $ affinidi login delete-group --name my_group ``` -_See code: [src/commands/login/delete-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/delete-group.ts)_ +_See code: [src/commands/login/delete-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/delete-group.ts)_ ## `affinidi login export-configs` @@ -191,7 +191,7 @@ EXAMPLES $ affinidi login export-configs --ids "configurationId1 configurationId2" --path "../my-configs.json" ``` -_See code: [src/commands/login/export-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/export-configs.ts)_ +_See code: [src/commands/login/export-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/export-configs.ts)_ ## `affinidi login export-groups` @@ -217,7 +217,7 @@ EXAMPLES $ affinidi login export-groups --names "groupName1 groupName2" --path "../my-user-groups.json" ``` -_See code: [src/commands/login/export-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/export-groups.ts)_ +_See code: [src/commands/login/export-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/export-groups.ts)_ ## `affinidi login get-config` @@ -241,7 +241,7 @@ EXAMPLES $ affinidi login get-config --id ``` -_See code: [src/commands/login/get-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/get-config.ts)_ +_See code: [src/commands/login/get-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/get-config.ts)_ ## `affinidi login get-group` @@ -265,7 +265,7 @@ EXAMPLES $ affinidi login get-group --name my_group ``` -_See code: [src/commands/login/get-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/get-group.ts)_ +_See code: [src/commands/login/get-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/get-group.ts)_ ## `affinidi login import-configs` @@ -289,7 +289,7 @@ EXAMPLES $ affinidi login import-configs --path "../my-configs.json" ``` -_See code: [src/commands/login/import-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/import-configs.ts)_ +_See code: [src/commands/login/import-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/import-configs.ts)_ ## `affinidi login import-groups` @@ -313,7 +313,7 @@ EXAMPLES $ affinidi login import-groups --path "../my-groups.json" ``` -_See code: [src/commands/login/import-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/import-groups.ts)_ +_See code: [src/commands/login/import-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/import-groups.ts)_ ## `affinidi login list-configs` @@ -332,7 +332,7 @@ EXAMPLES $ affinidi login list-configs ``` -_See code: [src/commands/login/list-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/list-configs.ts)_ +_See code: [src/commands/login/list-configs.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/list-configs.ts)_ ## `affinidi login list-groups` @@ -351,7 +351,7 @@ EXAMPLES $ affinidi login list-groups ``` -_See code: [src/commands/login/list-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/list-groups.ts)_ +_See code: [src/commands/login/list-groups.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/list-groups.ts)_ ## `affinidi login list-users-in-group` @@ -376,7 +376,7 @@ EXAMPLES $ affinidi login list-users-in-group --group-name my_group ``` -_See code: [src/commands/login/list-users-in-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/list-users-in-group.ts)_ +_See code: [src/commands/login/list-users-in-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/list-users-in-group.ts)_ ## `affinidi login remove-user-from-group` @@ -400,7 +400,7 @@ EXAMPLES $ affinidi login remove-user-from-group --group-name my_group --user-id did:key:12345 ``` -_See code: [src/commands/login/remove-user-from-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/remove-user-from-group.ts)_ +_See code: [src/commands/login/remove-user-from-group.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/remove-user-from-group.ts)_ ## `affinidi login update-config` @@ -448,4 +448,4 @@ FLAG DESCRIPTIONS none: For public clients (native/mobile apps) which can not have a secret ``` -_See code: [src/commands/login/update-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/login/update-config.ts)_ +_See code: [src/commands/login/update-config.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/login/update-config.ts)_ diff --git a/docs/project.md b/docs/project.md index ac5d9ed5..462a1ae7 100644 --- a/docs/project.md +++ b/docs/project.md @@ -33,7 +33,7 @@ EXAMPLES $ affinidi project create-project --name "My project name" ``` -_See code: [src/commands/project/create-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/project/create-project.ts)_ +_See code: [src/commands/project/create-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/project/create-project.ts)_ ## `affinidi project get-active-project` @@ -52,7 +52,7 @@ EXAMPLES $ affinidi project get-active-project ``` -_See code: [src/commands/project/get-active-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/project/get-active-project.ts)_ +_See code: [src/commands/project/get-active-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/project/get-active-project.ts)_ ## `affinidi project list-projects` @@ -71,7 +71,7 @@ EXAMPLES $ affinidi project list-projects ``` -_See code: [src/commands/project/list-projects.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/project/list-projects.ts)_ +_See code: [src/commands/project/list-projects.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/project/list-projects.ts)_ ## `affinidi project select-project` @@ -97,7 +97,7 @@ EXAMPLES $ affinidi project select-project --project-id ``` -_See code: [src/commands/project/select-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/project/select-project.ts)_ +_See code: [src/commands/project/select-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/project/select-project.ts)_ ## `affinidi project update-project` @@ -124,4 +124,4 @@ EXAMPLES $ affinidi project update-project --name="My project name" --description="My project description ``` -_See code: [src/commands/project/update-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/project/update-project.ts)_ +_See code: [src/commands/project/update-project.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/project/update-project.ts)_ diff --git a/docs/start.md b/docs/start.md index 30243697..f8c309b1 100644 --- a/docs/start.md +++ b/docs/start.md @@ -22,4 +22,4 @@ EXAMPLES $ affinidi start ``` -_See code: [src/commands/start.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/start.ts)_ +_See code: [src/commands/start.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/start.ts)_ diff --git a/docs/stop.md b/docs/stop.md index 6d673f59..9aa26366 100644 --- a/docs/stop.md +++ b/docs/stop.md @@ -22,4 +22,4 @@ EXAMPLES $ affinidi stop ``` -_See code: [src/commands/stop.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/stop.ts)_ +_See code: [src/commands/stop.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/stop.ts)_ diff --git a/docs/token.md b/docs/token.md index a41c6b65..df03ce15 100644 --- a/docs/token.md +++ b/docs/token.md @@ -49,7 +49,7 @@ EXAMPLES $ affinidi token create-token -n MyNewToken -g -w ``` -_See code: [src/commands/token/create-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/token/create-token.ts)_ +_See code: [src/commands/token/create-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/token/create-token.ts)_ ## `affinidi token delete-token` @@ -73,7 +73,7 @@ EXAMPLES $ affinidi token delete-token --token-id ``` -_See code: [src/commands/token/delete-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/token/delete-token.ts)_ +_See code: [src/commands/token/delete-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/token/delete-token.ts)_ ## `affinidi token get-token` @@ -97,7 +97,7 @@ EXAMPLES $ affinidi token get-token --token-id ``` -_See code: [src/commands/token/get-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/token/get-token.ts)_ +_See code: [src/commands/token/get-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/token/get-token.ts)_ ## `affinidi token list-tokens` @@ -116,7 +116,7 @@ EXAMPLES $ affinidi token list-tokens ``` -_See code: [src/commands/token/list-tokens.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/token/list-tokens.ts)_ +_See code: [src/commands/token/list-tokens.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/token/list-tokens.ts)_ ## `affinidi token update-token` @@ -146,4 +146,4 @@ EXAMPLES $ affinidi token update-token --token-id --name "My new token" --key-id "My key ID" --public-key-file publicKey.pem --algorithm RS256 ``` -_See code: [src/commands/token/update-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.7.0/src/commands/token/update-token.ts)_ +_See code: [src/commands/token/update-token.ts](https://github.com/affinidi/affinidi-cli/blob/v2.8.1/src/commands/token/update-token.ts)_ diff --git a/docs/wallet.md b/docs/wallet.md new file mode 100644 index 00000000..d4667c4b --- /dev/null +++ b/docs/wallet.md @@ -0,0 +1,137 @@ +`affinidi wallet` +================= + +Use these commands to manage your wallets + +* [`affinidi wallet create-wallet`](#affinidi-wallet-create-wallet) +* [`affinidi wallet delete-wallet`](#affinidi-wallet-delete-wallet) +* [`affinidi wallet get-wallet`](#affinidi-wallet-get-wallet) +* [`affinidi wallet list-wallets`](#affinidi-wallet-list-wallets) +* [`affinidi wallet update-wallet`](#affinidi-wallet-update-wallet) + +## `affinidi wallet create-wallet` + +Creates wallet in your active project + +``` +USAGE + $ affinidi wallet create-wallet [--json] [--no-color] [--no-input] [-n ] [-d + ] [-u -m key|web] + +FLAGS + -d, --description= Description of the wallet + -m, --did-method=