@twin.org/identity-cli 0.0.1-next.3

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 (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/bin/index.js +10 -0
  4. package/dist/cjs/index.cjs +1137 -0
  5. package/dist/esm/index.mjs +1110 -0
  6. package/dist/locales/en.json +784 -0
  7. package/dist/types/cli.d.ts +13 -0
  8. package/dist/types/commands/identityCreate.d.ts +19 -0
  9. package/dist/types/commands/identityResolve.d.ts +19 -0
  10. package/dist/types/commands/proofCreate.d.ts +21 -0
  11. package/dist/types/commands/proofVerify.d.ts +23 -0
  12. package/dist/types/commands/serviceAdd.d.ts +27 -0
  13. package/dist/types/commands/serviceRemove.d.ts +20 -0
  14. package/dist/types/commands/setupCommands.d.ts +4 -0
  15. package/dist/types/commands/verifiableCredentialCreate.d.ts +29 -0
  16. package/dist/types/commands/verifiableCredentialRevoke.d.ts +20 -0
  17. package/dist/types/commands/verifiableCredentialUnrevoke.d.ts +20 -0
  18. package/dist/types/commands/verifiableCredentialVerify.d.ts +17 -0
  19. package/dist/types/commands/verificationMethodAdd.d.ts +26 -0
  20. package/dist/types/commands/verificationMethodRemove.d.ts +20 -0
  21. package/dist/types/index.d.ts +13 -0
  22. package/docs/changelog.md +5 -0
  23. package/docs/examples.md +210 -0
  24. package/docs/reference/classes/CLI.md +45 -0
  25. package/docs/reference/functions/actionCommandIdentityCreate.md +15 -0
  26. package/docs/reference/functions/actionCommandIdentityResolve.md +15 -0
  27. package/docs/reference/functions/actionCommandProofCreate.md +15 -0
  28. package/docs/reference/functions/actionCommandProofVerify.md +15 -0
  29. package/docs/reference/functions/actionCommandServiceAdd.md +15 -0
  30. package/docs/reference/functions/actionCommandServiceRemove.md +31 -0
  31. package/docs/reference/functions/actionCommandVerifiableCredentialCreate.md +15 -0
  32. package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +31 -0
  33. package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +31 -0
  34. package/docs/reference/functions/actionCommandVerifiableCredentialVerify.md +15 -0
  35. package/docs/reference/functions/actionCommandVerificationMethodAdd.md +15 -0
  36. package/docs/reference/functions/actionCommandVerificationMethodRemove.md +31 -0
  37. package/docs/reference/functions/buildCommandIdentityCreate.md +11 -0
  38. package/docs/reference/functions/buildCommandIdentityResolve.md +11 -0
  39. package/docs/reference/functions/buildCommandProofCreate.md +11 -0
  40. package/docs/reference/functions/buildCommandProofVerify.md +11 -0
  41. package/docs/reference/functions/buildCommandServiceAdd.md +11 -0
  42. package/docs/reference/functions/buildCommandServiceRemove.md +11 -0
  43. package/docs/reference/functions/buildCommandVerifiableCredentialCreate.md +11 -0
  44. package/docs/reference/functions/buildCommandVerifiableCredentialRevoke.md +11 -0
  45. package/docs/reference/functions/buildCommandVerifiableCredentialUnrevoke.md +11 -0
  46. package/docs/reference/functions/buildCommandVerifiableCredentialVerify.md +11 -0
  47. package/docs/reference/functions/buildCommandVerificationMethodAdd.md +11 -0
  48. package/docs/reference/functions/buildCommandVerificationMethodRemove.md +11 -0
  49. package/docs/reference/index.md +32 -0
  50. package/locales/en.json +336 -0
  51. package/package.json +86 -0
@@ -0,0 +1,336 @@
1
+ {
2
+ "error": {
3
+ "commands": {
4
+ "verifiable-credential-create": {
5
+ "subjectJsonFileNotFound": "The subject JSON file was not found."
6
+ }
7
+ }
8
+ },
9
+ "commands": {
10
+ "identity-create": {
11
+ "summary": "Create a Decentralized Identifier (DID).",
12
+ "description": "Creates a Decentralized Identifier (DID).",
13
+ "options": {
14
+ "seed": {
15
+ "param": "--seed '<'seed'>'",
16
+ "description": "The seed for the controller address in hex or base64 used to create the DID, or start with ! to read environment variable."
17
+ }
18
+ },
19
+ "progress": {
20
+ "creatingIdentity": "Creating identity"
21
+ },
22
+ "labels": {
23
+ "identity": "Identity"
24
+ }
25
+ },
26
+ "identity-resolve": {
27
+ "summary": "Resolve a Decentralized Identifier (DID).",
28
+ "description": "Resolve a Decentralized Identifier (DID).",
29
+ "options": {
30
+ "did": {
31
+ "param": "--did '<'did'>'",
32
+ "description": "The identifier to resolve, or start with ! to read environment variable."
33
+ }
34
+ },
35
+ "progress": {
36
+ "resolvingIdentity": "Resolving identity"
37
+ },
38
+ "labels": {
39
+ "didDocument": "DID Document"
40
+ }
41
+ },
42
+ "verification-method-add": {
43
+ "summary": "Add a verification method to a DID.",
44
+ "description": "Add a verification method to a DID.",
45
+ "options": {
46
+ "seed": {
47
+ "param": "--seed '<'seed'>'",
48
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
49
+ },
50
+ "did": {
51
+ "param": "--did '<'did'>'",
52
+ "description": "The identifier to add the verification method to, or start with ! to read environment variable."
53
+ },
54
+ "type": {
55
+ "param": "--type '<'type'>'",
56
+ "description": "The type of verification method to add."
57
+ },
58
+ "id": {
59
+ "param": "--id '<'id'>'",
60
+ "description": "The optional id of verification method to add, if not provided one will be generated."
61
+ }
62
+ },
63
+ "progress": {
64
+ "addingVerificationMethod": "Adding Verification Method"
65
+ },
66
+ "labels": {
67
+ "verificationMethodType": "Verification Method Type",
68
+ "verificationMethodId": "Verification Method Id",
69
+ "privateKey": "Private Key",
70
+ "publicKey": "Public Key"
71
+ }
72
+ },
73
+ "verification-method-remove": {
74
+ "summary": "Remove a verification method from a DID.",
75
+ "description": "Remove a verification method from a DID.",
76
+ "options": {
77
+ "seed": {
78
+ "param": "--seed '<'seed'>'",
79
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
80
+ },
81
+ "did": {
82
+ "param": "--did '<'did'>'",
83
+ "description": "The identifier to remove the verification method from, or start with ! to read environment variable."
84
+ },
85
+ "id": {
86
+ "param": "--id '<'id'>'",
87
+ "description": "The id of verification method to remove."
88
+ }
89
+ },
90
+ "progress": {
91
+ "removingVerificationMethod": "Removing Verification Method"
92
+ },
93
+ "labels": {
94
+ "verificationMethodId": "Verification Method Id"
95
+ }
96
+ },
97
+ "service-add": {
98
+ "summary": "Add a service to a DID.",
99
+ "description": "Add a service to a DID.",
100
+ "options": {
101
+ "seed": {
102
+ "param": "--seed '<'seed'>'",
103
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
104
+ },
105
+ "did": {
106
+ "param": "--did '<'did'>'",
107
+ "description": "The identifier to add the service to, or start with ! to read environment variable."
108
+ },
109
+ "id": {
110
+ "param": "--id '<'id'>'",
111
+ "description": "The id of service to add, if not provided one will be generated."
112
+ },
113
+ "type": {
114
+ "param": "--type '<'type'>'",
115
+ "description": "The type of service to add."
116
+ },
117
+ "endpoint": {
118
+ "param": "--endpoint '<'endpoint'>'",
119
+ "description": "The service endpoint to add."
120
+ }
121
+ },
122
+ "progress": {
123
+ "addingService": "Adding Service"
124
+ },
125
+ "labels": {
126
+ "serviceId": "Service Id",
127
+ "serviceType": "Service Type",
128
+ "serviceEndpoint": "Service Endpoint"
129
+ }
130
+ },
131
+ "service-remove": {
132
+ "summary": "Remove a service from a DID.",
133
+ "description": "Remove a service from a DID.",
134
+ "options": {
135
+ "seed": {
136
+ "param": "--seed '<'seed'>'",
137
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
138
+ },
139
+ "id": {
140
+ "param": "--id '<'id'>'",
141
+ "description": "The id of service to remove."
142
+ }
143
+ },
144
+ "progress": {
145
+ "removingService": "Removing Service"
146
+ },
147
+ "labels": {
148
+ "serviceId": "Service Id"
149
+ }
150
+ },
151
+ "verifiable-credential-create": {
152
+ "summary": "Create a verifiable credential.",
153
+ "description": "Create a verifiable credential.",
154
+ "options": {
155
+ "id": {
156
+ "param": "--id '<'id'>'",
157
+ "description": "The full verification method id including did, or start with ! to read environment variable."
158
+ },
159
+ "private-key": {
160
+ "param": "--private-key '<'private-key'>'",
161
+ "description": "The private key for the verification method id, in either hex or base64 form, or start with ! to read environment variable."
162
+ },
163
+ "credential-id": {
164
+ "param": "--credential-id '<'credential-id'>'",
165
+ "description": "The credential id which uniquely identifies the credential."
166
+ },
167
+ "types": {
168
+ "param": "--types [types...]",
169
+ "description": "The list of types to include in the verifiable credential."
170
+ },
171
+ "subject-json": {
172
+ "param": "--subject-json '<'subject-json'>'",
173
+ "description": "A JSON file to read which includes the data for the verifiable credential."
174
+ },
175
+ "contexts": {
176
+ "param": "--contexts [contexts...]",
177
+ "description": "The list of contexts to include in the verifiable credential."
178
+ },
179
+ "revocation-index": {
180
+ "param": "--revocation-index '<'revocation-index'>'",
181
+ "description": "The revocation index in the issuing document to use if revoking the credential."
182
+ }
183
+ },
184
+ "progress": {
185
+ "creatingVerifiableCredential": "Creating Verifiable Credential",
186
+ "loadingSubjectData": "Loading Subject Data"
187
+ },
188
+ "labels": {
189
+ "verificationMethodId": "Verification Method Id",
190
+ "credentialId": "Credential Id",
191
+ "types": "Types",
192
+ "contexts": "Contexts",
193
+ "subjectJson": "Subject JSON",
194
+ "revocationIndex": "Revocation Index",
195
+ "verifiableCredential": "Verifiable Credential"
196
+ }
197
+ },
198
+ "verifiable-credential-verify": {
199
+ "summary": "Verify a verifiable credential.",
200
+ "description": "Verify a verifiable credential.",
201
+ "options": {
202
+ "jwt": {
203
+ "param": "--jwt '<'jwt'>'",
204
+ "description": "The verifiable credential as a JSON web token to verify, or start with ! to read environment variable."
205
+ }
206
+ },
207
+ "progress": {
208
+ "verifyingCredential": "Verifying Credential"
209
+ },
210
+ "labels": {
211
+ "jwt": "JWT",
212
+ "isVerified": "Is Verified",
213
+ "isRevoked": "Is Revoked"
214
+ }
215
+ },
216
+ "verifiable-credential-revoke": {
217
+ "summary": "Revoke a verifiable credential.",
218
+ "description": "Revoke a verifiable credential.",
219
+ "options": {
220
+ "seed": {
221
+ "param": "--seed '<'seed'>'",
222
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
223
+ },
224
+ "did": {
225
+ "param": "--did '<'did'>'",
226
+ "description": "The did of the document to revoke the index from, or start with ! to read environment variable."
227
+ },
228
+ "revocation-index": {
229
+ "param": "--revocation-index '<'revocation-index'>'",
230
+ "description": "The revocation index of the credential revoke."
231
+ }
232
+ },
233
+ "progress": {
234
+ "revokingCredential": "Revoking Credential Index"
235
+ },
236
+ "labels": {
237
+ "revocationIndex": "Revocation Index"
238
+ }
239
+ },
240
+ "verifiable-credential-unrevoke": {
241
+ "summary": "Unrevoke a verifiable credential.",
242
+ "description": "Unrevoke a verifiable credential.",
243
+ "options": {
244
+ "seed": {
245
+ "param": "--seed '<'seed'>'",
246
+ "description": "The seed for the private key for the controller address of the document in hex or base64, or start with ! to read environment variable."
247
+ },
248
+ "did": {
249
+ "param": "--did '<'did'>'",
250
+ "description": "The did of the document to unrevoke the index from, or start with ! to read environment variable."
251
+ },
252
+ "revocation-index": {
253
+ "param": "--revocation-index '<'revocation-index'>'",
254
+ "description": "The revocation index of the credential unrevoke."
255
+ }
256
+ },
257
+ "progress": {
258
+ "unrevokingCredential": "Unrevoking Credential Index"
259
+ },
260
+ "labels": {
261
+ "revocationIndex": "Revocation Index"
262
+ }
263
+ },
264
+ "proof-create": {
265
+ "summary": "Create a proof for some data using a verification method.",
266
+ "description": "Create a proof for some data using a verification method.",
267
+ "options": {
268
+ "id": {
269
+ "param": "--id '<'id'>'",
270
+ "description": "The full verification method id including did, or start with ! to read environment variable."
271
+ },
272
+ "private-key": {
273
+ "param": "--private-key '<'private-key'>'",
274
+ "description": "The private key for the verification method id, in either hex or base64 form, or start with ! to read environment variable."
275
+ },
276
+ "data": {
277
+ "param": "--data '<'data'>'",
278
+ "description": "The base64 or hex encoded data to create the proof for, or start with ! to read environment variable."
279
+ }
280
+ },
281
+ "progress": {
282
+ "creatingProof": "Creating Proof"
283
+ },
284
+ "labels": {
285
+ "verificationMethodId": "Verification Method Id",
286
+ "type": "Proof Type",
287
+ "value": "Proof Value"
288
+ }
289
+ },
290
+ "proof-verify": {
291
+ "summary": "Verify a proof for some data using a verification method.",
292
+ "description": "Verify a proof for some data using a verification method.",
293
+ "options": {
294
+ "id": {
295
+ "param": "--id '<'id'>'",
296
+ "description": "The full verification method id including did, or start with ! to read environment variable."
297
+ },
298
+ "data": {
299
+ "param": "--data '<'data'>'",
300
+ "description": "The base64 or hex encoded data to verify the proof for, or start with ! to read environment variable."
301
+ },
302
+ "type": {
303
+ "param": "--type '<'type'>'",
304
+ "description": "The type of the proof, or start with ! to read environment variable."
305
+ },
306
+ "value": {
307
+ "param": "--value '<'value'>'",
308
+ "description": "The base64 or hex encoded data to use for verifying the proof, or start with ! to read environment variable."
309
+ }
310
+ },
311
+ "progress": {
312
+ "verifyingProof": "Verifying Proof"
313
+ },
314
+ "labels": {
315
+ "verificationMethodId": "Verification Method Id",
316
+ "type": "Proof Type",
317
+ "value": "Proof Value",
318
+ "isVerified": "Is Verified"
319
+ }
320
+ },
321
+ "common": {
322
+ "options": {
323
+ "node": {
324
+ "param": "--node '<'url'>'",
325
+ "description": "The url for the node endpoint, or an environment variable name containing the url."
326
+ }
327
+ },
328
+ "labels": {
329
+ "did": "DID",
330
+ "node": "Node",
331
+ "explorer": "Explorer",
332
+ "explore": "Explore"
333
+ }
334
+ }
335
+ }
336
+ }
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@twin.org/identity-cli",
3
+ "version": "0.0.1-next.3",
4
+ "description": "A command line interface for interacting with the identity connectors",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/twinfoundation/identity.git",
8
+ "directory": "packages/identity-cli"
9
+ },
10
+ "author": "martyn.janes@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "scripts": {
17
+ "clean": "rimraf dist coverage",
18
+ "build": "tspc",
19
+ "merge-locales": "merge-locales",
20
+ "test": "vitest --run --config ./vitest.config.ts --no-cache",
21
+ "coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
22
+ "bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
23
+ "bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
24
+ "bundle": "npm run bundle:esm && npm run bundle:cjs",
25
+ "docs:clean": "rimraf docs/reference",
26
+ "docs:generate": "typedoc",
27
+ "docs": "npm run docs:clean && npm run docs:generate",
28
+ "dist": "npm run clean && npm run build && npm run merge-locales && npm run test && npm run bundle && npm run docs"
29
+ },
30
+ "dependencies": {
31
+ "@twin.org/core": "next",
32
+ "@twin.org/crypto": "next",
33
+ "@twin.org/cli-core": "next",
34
+ "@twin.org/crypto-cli": "next",
35
+ "@twin.org/entity": "next",
36
+ "@twin.org/entity-storage-connector-memory": "next",
37
+ "@twin.org/identity-models": "0.0.1-next.3",
38
+ "@twin.org/identity-connector-iota": "0.0.1-next.3",
39
+ "@twin.org/nameof": "next",
40
+ "@twin.org/standards-w3c-did": "next",
41
+ "@twin.org/vault-connector-entity-storage": "next",
42
+ "@twin.org/vault-models": "next",
43
+ "@twin.org/wallet-cli": "next",
44
+ "@twin.org/wallet-connector-iota": "next",
45
+ "@twin.org/wallet-models": "next",
46
+ "@iota/sdk-wasm": "1.1.3",
47
+ "commander": "12.1.0"
48
+ },
49
+ "devDependencies": {
50
+ "@twin.org/merge-locales": "next",
51
+ "@twin.org/nameof-transformer": "next",
52
+ "@types/node": "22.5.5",
53
+ "@vitest/coverage-v8": "2.1.1",
54
+ "copyfiles": "2.4.1",
55
+ "rimraf": "6.0.1",
56
+ "rollup": "4.22.0",
57
+ "rollup-plugin-typescript2": "0.36.0",
58
+ "ts-patch": "3.2.1",
59
+ "typedoc": "0.26.7",
60
+ "typedoc-plugin-markdown": "4.2.7",
61
+ "typescript": "5.6.2",
62
+ "vitest": "2.1.1"
63
+ },
64
+ "main": "./dist/cjs/index.cjs",
65
+ "module": "./dist/esm/index.mjs",
66
+ "types": "./dist/types/index.d.ts",
67
+ "exports": {
68
+ ".": {
69
+ "require": "./dist/cjs/index.cjs",
70
+ "import": "./dist/esm/index.mjs",
71
+ "types": "./dist/types/index.d.ts"
72
+ }
73
+ },
74
+ "files": [
75
+ "bin",
76
+ "dist/cjs",
77
+ "dist/esm",
78
+ "dist/types",
79
+ "dist/locales",
80
+ "locales",
81
+ "docs"
82
+ ],
83
+ "bin": {
84
+ "twin-identity": "bin/index.js"
85
+ }
86
+ }