@affinidi/cli 1.38.0 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +563 -268
  2. package/package.json +8 -3
package/README.md CHANGED
@@ -1,22 +1,56 @@
1
1
  # Affinidi CLI
2
-
3
- ## Context
4
-
2
+ [Introduction](#introduction)
3
+ [Features](#features)
4
+ [Installation](#installation)
5
+ [Quick Start](#quick-start)
6
+ [CLI Commands](#cli-commands)
7
+ [About Schemas and Verifiable Credentials](#about-schemas-and-verifiable-credentials)
8
+ [Feedback & Support](#feedback--support)
9
+ [FAQ](#faq)
10
+
11
+ #
12
+ ## Introduction
5
13
  Affinidi’s vision is to empower communities with control and ownership of their data,
6
14
  creating new business models and greater trust.
7
15
 
8
- As the customer demand for control and ownership of data continues to increase, it is
16
+ As the customer demand for control and ownership of data continues to grow, it is
9
17
  becoming increasingly important for developers to better manage data privacy and portability
10
18
  within their apps. With our tooling, you can start creating a privacy-preserving app within minutes.
11
19
 
12
- ## What are privacy-preserving apps?
13
-
20
+ ### What are privacy-preserving apps?
14
21
  Privacy-preserving apps make it easy to manage and store customer information while giving your customers more control over how this information is used and shared. We enable this data ownership and control through Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs).
15
22
 
16
23
  Learn more about [VCs](https://academy.affinidi.com/what-are-verifiable-credentials-79f1846a7b9), [trust triangle](https://academy.affinidi.com/what-is-the-trust-triangle-9a9caf36b321), [Decentralized Identifiers (DIDs)](https://academy.affinidi.com/demystifying-decentralized-identifiers-dids-2dc6fc3148fd), and [selective disclosure](https://academy.affinidi.com/a-detailed-guide-on-selective-disclosure-87b89cea1602).
17
-
24
+  
25
+
26
+  
27
+
28
+ ## Features
29
+ The folowing features are available through Affinidi CLI:
30
+ ### Affinidi account
31
+ * create and manage your Affinidi account
32
+ * create projects, to better organise and manage what you are building
33
+ * access your API keys
34
+
35
+ ### Schemas
36
+ * create and manage schemas, which serve as templates to issue credentials
37
+
38
+ ### Verifiable Credentials (VCs)
39
+ VCs are tamper-evident credentials that can be verified cryptographically.
40
+ With Affinidi CLI you can:
41
+ * issue VCs in bulk or individually
42
+ * verify VCs
43
+
44
+ ### Reference App
45
+ Generate a ready-to-use application that provides a web interface for:
46
+ * issuing VCs
47
+ * claiming and managing VCs
48
+ * verifying VCs
49
+  
50
+
51
+  
52
+ #
18
53
  ## Installation
19
-
20
54
  ### Prerequisites:
21
55
 
22
56
  You need to have installed on your machine:
@@ -28,94 +62,512 @@ Run the installation command:
28
62
  ```
29
63
  npm install -g @affinidi/cli
30
64
  ```
65
+  
31
66
 
32
- ## Quick start
33
67
 
34
- ### Sign up:
68
+ ## Quick Start
69
+ To start using our privacy preserving tools, please follow the next two steps:
70
+ 1. authenticate by creating an account, or logging in to your account if you already have one
71
+ 2. create a project, or activate a project if you already created one
72
+ ### Authentication:
73
+ You will need your email address, and then the code sent to your email to confirm authentication.
35
74
 
75
+ To create an account:
36
76
  ```
37
77
  affinidi sign-up
38
78
  ```
39
- use `affinidi login` instead if you already have an Affinidi Account
79
+ If you already have an account:
80
+ ```
81
+ affinidi login
82
+ ```
40
83
 
41
- ### Create a project:
84
+ Full reference for each command can be found here:
85
+ [`sign-up`](#affinidi-sign-up)
86
+ [`login`](#affinidi-login)
42
87
 
88
+
89
+ ### Create or activate a project:
90
+ The `create` command creates and activates a project. Follow the prompts to choose a name or add a name directly after the command.
43
91
  ```
44
92
  affinidi create project
45
93
  ```
46
94
 
95
+ The `use` command activates an already existing project:
96
+ ```
97
+ affinidi use project [<project-id>]
98
+ ```
99
+
100
+ You can also simply type this and follow the prompts to choose from a list of existing projects:
101
+ ```
102
+ affinidi use project
103
+ ```
104
+ Full reference for each command can be found here:
105
+ [`create`](#affinidi-create)
106
+ [`use`](#affinidi-use)
107
+
108
+ ### Schemas
109
+ To issue a VC you first have to create a schema or choose an existing one:
110
+
111
+ 1. A schema can be created using the `create` command. You will need to provide a *schemaName* and a *description* in text format as well as a *source* with the path to the json file with the schema properties.
112
+
113
+ ```
114
+ $ affinidi create schema [schemaName] --description=<value> --source=<value>
115
+ ```
116
+
117
+
118
+ 2. To see available schemas:
119
+
120
+ ```
121
+ $ affinidi list schemas
122
+ ```
123
+
124
+ You will need the value of the property `jsonSchemaUrl` of the created or chosen schema to issue VCs.
125
+
126
+ Please see [About Schemas and Verifiable Credentials](#about-schemas-and-verifiable-credentials) for a detailed explanation on schema structures and how to create and find schemas using the [Schema Manager](https://affinidi-schema-manager.prod.affinity-project.org/api-docs/#).
127
+ Full reference for each command can be found here:
128
+ [`create`](#affinidi-create)
129
+ [`list`](#affinidi-list)
130
+
131
+
132
+ ### Verifiable Credentials
133
+ You can issue and verify VCs within Affinidi CLI.
134
+
135
+ 1. To issue a VC you need to provide the *email* of the VC's owner, the `jsonSchemaUrl` of the *schema* on which the VC is based, and a path to the json file with credential *data*.
136
+
137
+ ```
138
+ $ affinidi issue-vc [EMAIL] --schema=<value> --data <value>
139
+ ```
140
+
141
+ Please see [How to structure a JSON file to issue a VC](#how-to-structure-a-json-file-to-issue-a-vc) for more details.
142
+
143
+ 2. To verify a VC you need to provide a path to the json file with the credential *data* to be verified.
144
+
145
+ ```
146
+ $ affinidi verify-vc --data=<value>
147
+ ```
148
+ Full reference for each command can be found here:
149
+ [issue-vc](#affinidi-issue-vc)
150
+ [verify-vc](#affinidi-verify-vc)
151
+
47
152
  ### Generate an application
153
+ The [Affinidi Reference App](https://github.com/affinidi/elements-reference-app-frontend) provides a simple web interface for issuing, claiming and verifying VCs. It can be quickly generated by typing:
48
154
 
49
155
  ```
50
- affinidi generate-application -n "My application"
156
+ $ affinidi generate-application
157
+ ```
158
+ You can also specify a name with:
159
+ ```
160
+ $ affinidi generate-application --name=<value>
51
161
  ```
52
162
 
53
- ### Issue a VC for an example schema
163
+ For the full reference, please see the [`affinidi generate-application`](#affinidi-generate-application) command below.
54
164
 
55
- - create a file vc.json:
165
+ &nbsp;
166
+
167
+ &nbsp;
168
+
169
+ #
170
+ ## CLI Commands
171
+ ### **autocomplete**
172
+ Display autocomplete installation instructions.
173
+
174
+ USAGE
56
175
  ```
57
- {
58
- "date": "2022-12-11T23:12:00Z",
59
- "place": "Awesome Location",
60
- "eventName": "Awesome Event",
61
- "eventDescription": "Awesome Description",
62
- "name": "John Snow",
63
- "email": "mail@example.com"
64
- }
176
+ $ affinidi autocomplete [SHELL] [FLAGS]
177
+ ```
178
+
179
+ ARGUMENTS
180
+ ```
181
+ SHELL Shell type
182
+ ```
183
+
184
+ FLAGS
185
+ ```
186
+ -r, --refresh-cache Refresh cache (ignores displaying instructions)
65
187
  ```
66
188
 
67
- - run a command:
189
+ EXAMPLES
68
190
  ```
69
- affinidi issue-vc <REPLACE WITH YOUR EMAIL> -s=https://schema.affinidi.com/TestSchemaV1-4.json -d=vc.json -w=https://holder-reference-app.stg.affinidi.com/holder
191
+ $ affinidi autocomplete
192
+
193
+ $ affinidi autocomplete bash
194
+
195
+ $ affinidi autocomplete zsh
196
+
197
+ $ affinidi autocomplete --refresh-cache
70
198
  ```
71
199
 
72
- - find an email with credential subject and follow the link to view and claim a credential.
200
+ You can also see the help for the command in the CLI:
201
+ ```
202
+ $ affinidi autocomplete --help
203
+ ```
73
204
 
74
- ## Schema manager
205
+ ### **affinidi config***
206
+ Use this command to configure the format of the output. Supported options are: `plaintext` and `json`.
75
207
 
76
- ### What is Schema manager?
208
+ USAGE
209
+ ```
210
+ $ affinidi config SUBCOMMAND [ARGS]
211
+ ```
77
212
 
78
- If you want to build an app using Affinidi components, you should start here.
79
- Schema Manager helps you to find the right schema for your verifiable credential
80
- or to create a new one - either on the basis of an already existing schema,
81
- or completely from scratch.
213
+ SUBCOMMAND
214
+ ```
215
+ view
216
+ ```
82
217
 
83
- ### How to use Schema manager?
218
+ EXAMPLES
219
+ Configures output in json format:
220
+ ```
221
+ affinidi config view json
222
+ ```
84
223
 
85
- Schema Manager provides URLs for two kinds of schema representations:
86
- JSON Schema and JSON-LD context.
87
- Any schema can be referenced in a verifiable credentials or an application by these URLs.
224
+ You can also see the help for the command in the CLI:
225
+ ```
226
+ affinidi config --help
227
+ ```
228
+ ### **affinidi create**
229
+ Use this command to create a new resource. Current supported resource types are:
230
+ - Affinidi project
231
+ - schema
88
232
 
89
- Before creating a new schema for your verifiable credentials,
90
- it is recommended to search for an existing one, which may fit your purpose.
91
- There are both a number of standard schemas and some user-generated schemas
92
- already available in the Schema Manager for your disposal,
93
- and you can search for them by “Credential schema type”.
94
- That is why it is important to provide a meaningful and expressive type
95
- for your newly created schemas.
233
+ USAGE
234
+ ```
235
+ $ affinidi create SUBCOMMAND [ARGS...] [FLAGS]
236
+ ```
96
237
 
97
- ### What is the difference between a version and a revision?
238
+ SUBCOMMANDS
239
+ ```
240
+ project Creates a new Affinidi project.
241
+ schema Creates a new schema for a verifiable credential.
242
+ ```
98
243
 
99
- Essentially, all the revisions of the single version should be compatible with each other,
100
- whereas new versions could feature breaking changes, e.g. new mandatory fields.
244
+ To create a project:
245
+ ```
246
+ $ affinidi create project [projectName]
247
+ ```
248
+ Or simply type this and follow the prompts:
249
+ ```
250
+ $ affinidi create project
251
+ ```
252
+ Note: When a project is created, its API keys are displayed only once. Full project details are stored locally in `~/.affinidi/credentials.json`. This file is deleted at the end of the authenticated session.
101
253
 
102
- Currently, adherence to this principle is not enforced,
103
- but it is good to keep in mind when choosing between new version or revision for your forked schema.
254
+ PROJECT FLAGS
255
+ ```
256
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
257
+ ```
104
258
 
105
- ### What does it mean to “publish as searchable schema”?
259
+ To create a schema:
260
+ ```
261
+ $ affinidi create schema [schemaName] [FLAGS]
262
+ ```
263
+ SCHEMA FLAGS
264
+ ```
265
+ -d, --description=<value> (required) Description of schema
266
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
267
+ -p, --public=(true|false) [default: false] To specify if you want to create public or private schemas
268
+ -s, --source=<value> (required) Path to the json file with schema properties
269
+ ```
270
+ Please see [How to structure a schema](#how-to-structure-a-schema) for guidance on how to create the *source* file.
271
+ EXAMPLES
272
+ ```
273
+ $ affinidi create project "Example Project"
106
274
 
107
- Schemas can be either public (visible and searchable for everyone ) or
108
- private (unlisted, visible and searchable only for you).
109
- When you “publish as searchable schema” (using flag `-p`), you make your schema public.
275
+ $ affinidi create schema "Example Name" -d "An example description" -s "/exampleSchema.json"
276
+ ```
277
+
278
+ You can also see the help for the command in the CLI:
279
+ ```
280
+ $ affinidi create --help
281
+ $ affinidi create project --help
282
+ $ affinidi create schema --help
283
+ ```
284
+
285
+ ### **affinidi generate-application**
286
+ Use this command to generate a privacy preserving app. Please see [Affinidi Reference App](https://github.com/affinidi/elements-reference-app-frontend) for more details.
287
+
288
+ USAGE
289
+ ```
290
+ $ affinidi generate-application [-n <value>] [-w]
291
+ ```
292
+ FLAGS
293
+ ```
294
+ -n, --name=<value> [default: my-app] Name of the application
295
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
296
+ -w, --with-proxy Add backend-proxy to protect credentials
297
+ ```
298
+
299
+ You can use this to generate the application with the default values:
300
+ ```
301
+ $ affinidi generate-application
302
+ ```
303
+
304
+ EXAMPLES
305
+ ```
306
+ $ affinidi generate-application -n ExampleApp
307
+ ```
308
+
309
+ You can also see the help for the command in the CLI:
310
+ ```
311
+ $ affinidi generate-application --help
312
+ ```
313
+ ### **affinidi help**
314
+ Display help for affinidi
315
+
316
+ USAGE
317
+ ```
318
+ affinidi help
319
+ ```
320
+
321
+
322
+ ### **affinidi issue-vc**
323
+ Issues a verifiable credential based on a given schema
324
+
325
+ USAGE
326
+ ```
327
+ $ affinidi issue-vc [EMAIL] [FLAGS]
328
+ ```
329
+
330
+ FLAGS
331
+ ```
332
+ -b, --bulk Defines that issuance happens in bulk
333
+ -d, --data=<value> (required) The source file with credential data, either .json or .csv
334
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
335
+ -s, --schema=<value> (required) Json schema url
336
+ -w, --wallet=<value> [default: https://wallet.affinidi.com/claim] Configure your own wallet to store VCs
337
+ ```
338
+
339
+ EXAMPLES
340
+ ```
341
+ $ affinidi issue-vc example@email.com -s "https://example.org/exampleSchema.json" -d "/exampleCredential.json"
342
+
343
+ ```
344
+ You can also see the help for the command in the CLI:
345
+ ```
346
+ $ affinidi issue-vc --help
347
+ ```
348
+ ### **affinidi list**
349
+ Use the list command to display resources that you have created or are available.
350
+ The current types of resources are:
351
+ - schemas
352
+ - projects
353
+
354
+ USAGE
355
+ ```
356
+ $ affinidi list [SUBCOMMAND] [ARGS...] [FLAGS]
357
+ ```
358
+
359
+ SUBCOMMANDS
360
+ ```
361
+ projects Shows you the list of your projects
362
+ schemas Shows a list of available schemas
363
+ ```
364
+
365
+ FLAGS for project listing
366
+ ```
367
+ -l, --limit=<value> [default: 10] Maximum number of projects which will be listed
368
+ -o, --output=(json|table|csv) [default: json] Project listing output format
369
+ -s, --skip=<value> Index into projects list from which to start the listing
370
+ --json Format output as json.
371
+ ```
372
+
373
+ FLAGS for schema listing
374
+ ```
375
+ -c, --scope=(default|public|unlisted) [default: default] The type of scope
376
+ -l, --limit=<value> [default: 10] The number of schemas to display
377
+ -o, --output=(json|table|csv) [default: json] The type of output
378
+ -p, --public=(true|false) [default: true] To specify if you want to get public or private schemas
379
+ -s, --skip=<value> The number of schemas to skip
380
+ -x, --extended show extra columns
381
+ --columns=<value> only show provided columns (comma-separated)
382
+ --csv output is csv format [alias: --output=csv]
383
+ --filter=<value> filter property by partial string matching, ex: name=foo
384
+ --no-header hide table header from output
385
+ --no-truncate do not truncate output to fit screen
386
+ --sort=<value> property to sort by (prepend '-' for descending)
387
+ ```
388
+
389
+ EXAMPLES
390
+ ```
391
+ $ affinidi list projects
392
+
393
+ $ affinidi list schemas
394
+ ```
395
+
396
+ You can also see the help for the command in the CLI:
397
+ ```
398
+ $ affinidi list --help
399
+ $ affinidi list projects --help
400
+ $ affinidi list schemas --help
401
+ ```
402
+
403
+
404
+ ### **affinidi login**
405
+ Log in with your email address to use Affinidi privacy preserving services. You will receive a confirmation code via email, which you will need to complete the authentication.
406
+
407
+ USAGE
408
+ ```
409
+ $ affinidi login [EMAIL]
410
+ ```
411
+
412
+ You can also simply type this and follow the prompts:
413
+ ```
414
+ $ affinidi login
415
+ ```
416
+
417
+ FLAGS
418
+ ```
419
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
420
+ ```
421
+
422
+ You can also see the help for the command in the CLI:
423
+ ```
424
+ $ affinidi login --help
425
+ ```
426
+ ### **affinidi logout**
427
+ Use this command to end your affinidi session
428
+
429
+ USAGE
430
+ ```
431
+ $ affinidi logout
432
+ ```
433
+
434
+ You can also see the help for the command in the CLI:
435
+ ```
436
+ affinidi logout --help
437
+ ```
438
+
439
+ FLAGS
440
+ ```
441
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
442
+ ```
443
+
444
+ ### **affinidi show**
445
+ This command displays the details of a resource. The current available resource types are:
446
+ - project
447
+ - schema
448
+
449
+ USAGE
450
+ ```
451
+ $ affinidi show [SUBCOMMAND] [ARG...] [FLAGS]
452
+ ```
453
+
454
+ SUBCOMMANDS
455
+ ```
456
+ project Shows information about a given project
457
+ schema Shows the details of a schema
458
+ ```
459
+
460
+ FLAGS
461
+ ```
462
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
463
+ ```
464
+
465
+ To show a project:
466
+ ```
467
+ $ affinidi show [<project-id>]
468
+ ```
469
+ if you simply type this, the CLI will prompt you to choose from a list of available projects:
470
+ ```
471
+ $ affinidi show project
472
+ ```
473
+ To show a schema:
474
+ ```
475
+ $ affinidi show schema [<schema-id>] [--output json]
476
+ ```
477
+
478
+ EXAMPLES
479
+ ```
480
+ $ affinidi show project example-id
481
+ $ affinidi show schema example-id
482
+ ```
483
+
484
+ You can also see the help for the command in the CLI:
485
+ ```
486
+ $ affinidi show --help
487
+ $ affinidi show project --help
488
+ $ affinidi show schema --help
489
+ ```
490
+ ### **affinidi sign-up**
491
+ Create an Affinidi account with this command to use our privacy preserving tools. You will need your email adress, and then confirm the authentication with the code sent to your email.
492
+
493
+ USAGE
494
+ ```
495
+ $ affinidi sign-up [EMAIL]
496
+ ```
497
+
498
+ You can also simply type this and follow the prompts:
499
+ ```
500
+ $ affinidi sign-up
501
+ ```
502
+
503
+ You can also see the help for the command in the CLI:
504
+ ```
505
+ $ affinidi sign-up --help
506
+ ```
507
+
508
+ ### **affinidi use**
509
+ The Use command lets you choose and activate a project. An active project is a prerequisite for executing most commands.
510
+
511
+ USAGE
512
+ ```
513
+ $ affinidi use project [<project-id>] [FLAGS]
514
+ ```
515
+
516
+ FLAGS
517
+ ```
518
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view of the chosen project's details
519
+ ```
520
+
521
+
522
+ EXAMPLES
523
+ ```
524
+ $ affinidi use project example-id
525
+ ```
526
+
527
+ You can also see the help for the command in the CLI:
528
+ ```
529
+ $ affinidi use --help
530
+ $ affinidi use project --help
531
+ ```
532
+
533
+ ### **affinidi verify-vc**
534
+ Verifies a verifiable credential
535
+
536
+ USAGE
537
+ ```
538
+ $ affinidi verify-vc -d <value>
539
+ ```
540
+ FLAGS
541
+ ```
542
+ -d, --data=<value> (required) Source json file with credentials to be verified
543
+ -o, --output=(plaintext|json) [default: plaintext] Formats output view
544
+ ```
545
+ EXAMPLES
546
+ ```
547
+ $ affinidi verify-vc -d "/exampleVc.json"
548
+ ```
549
+
550
+ You can also see the help for the command in the CLI:
551
+ ```
552
+ $ affinidi verify-vc --help
553
+ ```
554
+ &nbsp;
555
+
556
+ &nbsp;
110
557
 
111
- It is important to remember, that versions and revisions of public and private
112
- (unlisted) schema are independent of each other,
113
- and are maintained by the system in parallel.
114
- However, you can always fork your private (unlisted) schema in order to make it public and vice versa.
115
558
 
116
- ### How to create a schema
559
+ #
560
+ ## About Schemas and Verifiable Credentials
117
561
 
118
- #### 1 Prepare a json file with schema details:
562
+ Schemas are representations of the properties that define a VC. They are a composite of [JSON Schema](https://json-schema.org/specification.html), [JSON-LD](https://www.w3.org/TR/json-ld11/) context and metadata (description, version and ownership). You can use Affinidi's [Schema Manager](https://affinidi-schema-manager.prod.affinity-project.org/api-docs) to find the right schema for your verifiable credential or to create a new one – either on the basis of an already existing schema,
563
+ or completely from scratch.
564
+
565
+ ### What is Affinidi's Schema Manager?
566
+ The Schema Manager provides URLs for two kinds of schema representations: JSON Schema and JSON-LD context.
567
+ Any schema can be referenced in a verifiable credential or an application by these URLs. Before creating a new schema for your verifiable credentials, it is recommended to search for an existing one, which may fit your purpose. There are both a number of standard schemas and some user-generated schemas already available in the Schema Manager, and you can search for them by “Credential schema type”. That is why it is important to provide a meaningful and expressive type for your newly created schemas.
568
+
569
+ ### How to structure a schema
570
+ The JSON representation of a schema must follow this structure:
119
571
 
120
572
  ```
121
573
  {
@@ -132,9 +584,9 @@ However, you can always fork your private (unlisted) schema in order to make it
132
584
  <list of required properties>
133
585
  ]
134
586
  }
135
-
136
587
  ```
137
- Example:
588
+
589
+ And here is an example of that structure used to represent a simple form with two fields (`First Name` and `Last Name`):
138
590
  ```
139
591
  {
140
592
  "type": "object",
@@ -156,16 +608,8 @@ Example:
156
608
  }
157
609
  ```
158
610
 
159
- #### 2 Run a command:
160
-
161
- ```
162
- affinidi create schema -d <Description of your schema> -p=<true if public, false if private> -s=<schema.json>
163
- ```
164
-
165
- #### 3 In the response you will receive "jsonSchemaUrl" which you should use to issue a verifiable credential.
166
611
 
167
612
  ### What attribute types are available?
168
-
169
613
  - Nested attribute – a container for attributes
170
614
  - DID – a decentralized identifier
171
615
  - Example of VC value: "did:example:123"
@@ -245,13 +689,30 @@ Example of schema source with all the types:
245
689
  }
246
690
 
247
691
  ```
692
+ ### How to create or find a schema
693
+ 1. You can directly create a schema in the CLI with the [`create`](#affinidi-create) command or using the [Schema Manager API](https://affinidi-schema-manager.prod.affinity-project.org/api-docs/#/Schema/CreateSchema).
694
+
695
+ 2. You can list available schemas with the [`list`](#affinidi-list) command or search via the [Schema Manager API](https://affinidi-schema-manager.prod.affinity-project.org/api-docs/#/Schema/SearchSchemas) specifying `scope`, `type` or `authorDID`.
248
696
 
249
- ## Issuing a VC
697
+ ### What is the difference between a version and a revision?
698
+ Essentially, all the revisions of the single version should be compatible with each other,
699
+ whereas new versions could feature breaking changes, e.g. new mandatory fields. Currently, adherence to this principle is not enforced, but it is good to keep in mind when choosing between new version or revision for your forked schema.
700
+
701
+ ### What does it mean to “publish as searchable schema”?
702
+
703
+ Schemas can be either public (visible and searchable for everyone ) or
704
+ private (unlisted, visible and searchable only for you).
705
+ When you “publish as searchable schema” (using flag `-p`), you make your schema public.
706
+
707
+ It is important to remember, that versions and revisions of public and private
708
+ (unlisted) schema are independent of each other,
709
+ and are maintained by the system in parallel.
710
+ However, you can always fork your private (unlisted) schema in order to make it public and vice versa.
250
711
 
251
- ### 1 Create a json file with credential subject matching the corresponding schema.
252
- (refer to properties->credential subject of the schema to figure out the json structure)
712
+ ### How to structure a JSON file to issue a VC:
713
+ The JSON file that is the source for the VC to be issued must follow the structure of the schema on which the VC is based. Use the properties of the schema's `credentialSubject` as the template for the new VC.
253
714
 
254
- Example for https://schema.affinidi.com/EventElegibilityV1-0.json:
715
+ Example for [Event Elegibility Schema](https://schema.affinidi.com/EventElegibilityV1-0.json):
255
716
 
256
717
  ```
257
718
  {
@@ -264,217 +725,51 @@ Example for https://schema.affinidi.com/EventElegibilityV1-0.json:
264
725
  }
265
726
  ```
266
727
 
267
- ### 2 Run the command:
728
+ &nbsp;
268
729
 
269
- ```
270
- affinidi issue-vc <holder-email@example.com> -s=<Schema Url> -d=credential.json -w=<path to holder wallet>
271
- ```
730
+ &nbsp;
272
731
 
273
- where
274
- - holder-email - email, where a holder will receive a link to VC offer
275
- - Schema Url - schema url, example: https://schema.affinidi.com/EventElegibilityV1-0.json
276
- - `<path to holder wallet>` - path to web UI of holder wallet, example: https://holder-reference-app.stg.affinidi.com/holder/claim
732
+ #
733
+ ## Feedback & Support
734
+ Click [here](https://github.com/affinidi/affinidi-cli/issues) to create a ticket and we will get on it right away. If you are facing technical or other issues, you can reach out to us on [Discord](https://discord.com/invite/jx2hGBk5xE).
277
735
 
278
- ## CLI Commands
736
+ &nbsp;
279
737
 
280
- ## affinidi generate-application
281
738
 
282
- Use this command to generate a Privacy Preserving app
283
739
 
284
- USAGE
285
- ```
286
- $ affinidi generate-application [-p web|mobile] [-n <value>] [-u portable-reputation|access-without-ownership-of-data|certification-and-verification|kyc-kyb] [-w]
740
+ ## FAQ
741
+ ### A note from Affinidi
742
+ Affinidi Developer Tools are currently in the open beta phase and we are refining our product every day. The Affinidi Developer Tools may be incomplete and may contain errors – they may be unstable and may cause a loss of functionality and data. Use of the Affinidi Developer Tools will be at your own risk. As our engineers seek to improve our platform, we would not have the resources to provide any maintenance or tech support at this time. Please bear with us as we continue to improve the platform.
287
743
 
288
- FLAGS
289
- -n, --name=<value> [default: my-app] Name of the application
290
- -p, --platform=(web|mobile) [default: web] Platform
291
- -u, --use-case=(portable-reputation|access-without-ownership-of-data|certification-and-verification|kyc-kyb) [default: certification-and-verification] Use case
292
- -w, --with-proxy Add backend-proxy to protect credentials
744
+ ### What can I develop?
745
+ You are only limited by your imagination! Affinidi Developer Tools is a toolbox with which you can build software applications for personal or commercial use.
293
746
 
294
- DESCRIPTION
295
- Use this command to generate a Privacy Preserving app
747
+ ### Is there anything I should not develop?
748
+ We only provide the tools - how you use them is largely up to you. We have no control over what you develop with our tools - but please use our tools responsibly!
296
749
 
297
- EXAMPLES
298
- $ affinidi generate-application
299
- ```
300
-
301
- ## affinidi help
302
- Display help for affinidi.
303
-
304
- ## affinidi login
750
+ We hope that you would not develop anything that contravenes any applicable laws or regulations. Your projects should also not infringe on Affinidi’s or any third party’s intellectual property (for instance, misusing other parties’ data, code, logos, etc).
305
751
 
306
- Log-in with your email address to use Affinidi privacy preserving services.
752
+ ### What responsibilities do I have to my end-users?
753
+ Please ensure that you have in place your own terms and conditions, privacy policies, and other safeguards to ensure that the projects you build are secure for your end users.
307
754
 
308
- USAGE
309
- ```
310
- $ affinidi login [EMAIL]
311
- ```
755
+ If you are processing personal data, please protect the privacy and other legal rights of your end-users and store their personal or sensitive information securely.
312
756
 
313
- EXAMPLES
314
- ```
315
- $ affinidi login
316
- ```
757
+ Some of our components would also require you to incorporate our end-user notices into your terms and conditions.
317
758
 
318
- ## affinidi sign-up
759
+ ### Are Affinidi Developer Tools free for use?
760
+ Affinidi Developer Tools are free during the open beta phase, so come onboard and experiment with our tools and see what you can build! We may bill for certain components in the future, but we will inform you beforehand.
319
761
 
320
- Use this command to log-in with your email address to use Affinidi privacy preserving services.
762
+ ### Is there any limit or cap to my usage of the Affinidi Developer Tools?
763
+ We may from time to time impose limits on your use of the Affinidi Developer Tools, such as limiting the number of API requests that you may make in a given duration. This is to ensure the smooth operation of the Affinidi Developer Tools so that you and all our other users can have a pleasant experience as we continue to scale and improve the Affinidi Developer Tools.
321
764
 
322
- USAGE
323
- ```
324
- $ affinidi sign-up [EMAIL]
765
+ ### Do I need to provide you with anything?
766
+ From time to time, we may request certain information from you to ensure that you are complying with the [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf).
325
767
 
326
- ```
327
- EXAMPLES
328
- ```
329
- $ affinidi sign-up
330
- ```
768
+ ### Can I share my developer’s account with others?
769
+ When you create a developer’s account with us, we will issue you your private login credentials. Please do not share this with anyone else, as you would be responsible for activities that happen under your account. If you have friends who are interested, ask them to sign up – let's build together!
331
770
 
332
- ## affinidi logout
771
+ ### Telemetry
772
+ Affinidi collects usage data to improve our products and services. For information on what data we collect and how we use your data, please refer to our [Privacy Policy](https://build.affinidi.com/dev-tools/privacy-policy.pdf).
333
773
 
334
- Use this command to end your affinidi session
335
-
336
- USAGE
337
- ```
338
- $ affinidi logout
339
- ```
340
-
341
- EXAMPLES
342
- ```
343
- $ affinidi logout
344
- ```
345
-
346
- ## affinidi list
347
-
348
- The list command to display various resources
349
-
350
- USAGE
351
- ```
352
- $ affinidi list
353
- ```
354
-
355
-
356
- Use the list command if you want to display some of your resources
357
- like the schemas or projects that you've created.
358
-
359
- The current available resources are:
360
- - schemas
361
- - projects
362
- See the command examples in the help:
363
-
364
- ```
365
- $ affinidi list --help
366
- ```
367
-
368
- EXAMPLES
369
- ```
370
- Shows you the list of your projects
371
-
372
- $ affinidi list projects
373
-
374
- Shows a list of available schemas
375
-
376
- $ affinidi list schemas
377
- ```
378
-
379
- COMMANDS
380
- ```
381
- list projects Perform the action of listing all the projects you created
382
- list schemas
383
- ```
384
-
385
- ## affinidi show
386
-
387
- The Show command to display the details of a resource
388
-
389
- USAGE
390
- ```
391
- $ affinidi show
392
- ```
393
-
394
- Use the show command if you want to display some of your resources
395
- like the schema or project that you've created.
396
-
397
- The current available resources are:
398
- - schema
399
- - project
400
- See the command examples in the help:
401
- ```
402
- $ affinidi show --help
403
- ```
404
-
405
- EXAMPLES
406
- ```
407
- Shows the details of a schema
408
-
409
- $ affinidi show schema [<schema-id>] [--output json]
410
-
411
- Shows information about a specific project that you own.
412
-
413
- $ affinidi show [<project-id>] [--output json]
414
- ```
415
- COMMANDS
416
- ```
417
- show project
418
- show schema
419
- ```
420
-
421
- ## affinidi use
422
-
423
- The Use command selects an entity to work with
424
-
425
- USAGE
426
- ```
427
- $ affinidi use
428
- ```
429
-
430
-
431
- Use the use command if you want to select a project you want to work on.
432
-
433
- See the command examples in the help:
434
- ```
435
- $ affinidi use --help
436
- ```
437
-
438
- EXAMPLES
439
- ```
440
- Use a given project
441
-
442
- $ affinidi use [<project-id>]
443
- ```
444
-
445
- ## affinidi issue-vc
446
-
447
- Issues a verifiable credential based on an given schema
448
-
449
- USAGE
450
- ```
451
- $ affinidi issue-vc [EMAIL] -s <value> -d <value>
452
- ```
453
-
454
- FLAGS
455
- ```
456
- -d, --data=<value> (required) source json file with credential data
457
- -s, --schema=<value> (required) json schema url
458
- ```
459
-
460
- EXAMPLES
461
- ```
462
- $ affinidi issue-vc
463
- ```
464
-
465
- ## affinidi verify-vc
466
-
467
- Verifies a verifiable credential
468
-
469
- USAGE
470
- ```
471
- $ affinidi verify-vc -d <value>
472
- ```
473
- FLAGS
474
- ```
475
- -d, --data=<value> (required) source json file with credentials to be verified
476
- ```
477
- EXAMPLES
478
- ```
479
- $ affinidi verify-vc
480
- ```
774
+ Disclaimer:
775
+ Please note that this FAQ is provided for informational purposes only and is not to be considered a legal document. For the legal terms and conditions governing your use of the Affinidi Developer Tools, please refer to our [Terms of Use](https://build.affinidi.com/dev-tools/terms-of-use.pdf).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@affinidi/cli",
3
- "version": "1.38.0",
3
+ "version": "1.40.0",
4
4
  "description": "Affinidi Elements command-line-interface",
5
5
  "author": "affinidi.com",
6
6
  "license": "Apache-2.0",
@@ -54,6 +54,7 @@
54
54
  "@oclif/core": "^1.20.4",
55
55
  "@oclif/plugin-autocomplete": "^1.3.6",
56
56
  "@oclif/plugin-help": "^5.1.16",
57
+ "@oclif/plugin-warn-if-update-available": "^2.0.15",
57
58
  "app-root-path": "^3.1.0",
58
59
  "axios": "^1.1.3",
59
60
  "chalk": "^4.1.2",
@@ -109,10 +110,14 @@
109
110
  "commands": "./dist/commands",
110
111
  "plugins": [
111
112
  "@oclif/plugin-help",
112
- "@oclif/plugin-autocomplete"
113
+ "@oclif/plugin-autocomplete",
114
+ "@oclif/plugin-warn-if-update-available"
113
115
  ],
114
116
  "topicSeparator": " ",
115
- "topics": {}
117
+ "topics": {},
118
+ "warn-if-update-available": {
119
+ "timeoutInDays": 7
120
+ }
116
121
  },
117
122
  "engines": {
118
123
  "node": ">=16.0.0"