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

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 (41) hide show
  1. package/dist/cjs/index.cjs +297 -279
  2. package/dist/esm/index.mjs +297 -282
  3. package/dist/locales/en.json +908 -783
  4. package/dist/types/cli.d.ts +5 -1
  5. package/dist/types/commands/identityCreate.d.ts +6 -0
  6. package/dist/types/commands/identityResolve.d.ts +5 -0
  7. package/dist/types/commands/proofCreate.d.ts +6 -1
  8. package/dist/types/commands/proofVerify.d.ts +9 -7
  9. package/dist/types/commands/serviceAdd.d.ts +4 -0
  10. package/dist/types/commands/serviceRemove.d.ts +5 -0
  11. package/dist/types/commands/setupCommands.d.ts +18 -0
  12. package/dist/types/commands/verifiableCredentialCreate.d.ts +4 -4
  13. package/dist/types/commands/verifiableCredentialRevoke.d.ts +5 -0
  14. package/dist/types/commands/verifiableCredentialUnrevoke.d.ts +5 -0
  15. package/dist/types/commands/verifiableCredentialVerify.d.ts +4 -0
  16. package/dist/types/commands/verificationMethodAdd.d.ts +4 -0
  17. package/dist/types/commands/verificationMethodRemove.d.ts +5 -0
  18. package/dist/types/index.d.ts +2 -0
  19. package/dist/types/models/identityConnectorTypes.d.ts +17 -0
  20. package/docs/changelog.md +1 -1
  21. package/docs/examples.md +15 -14
  22. package/docs/reference/classes/CLI.md +17 -3
  23. package/docs/reference/functions/actionCommandIdentityCreate.md +3 -1
  24. package/docs/reference/functions/actionCommandIdentityResolve.md +3 -1
  25. package/docs/reference/functions/actionCommandProofCreate.md +3 -1
  26. package/docs/reference/functions/actionCommandProofVerify.md +3 -1
  27. package/docs/reference/functions/actionCommandServiceAdd.md +3 -1
  28. package/docs/reference/functions/actionCommandServiceRemove.md +25 -5
  29. package/docs/reference/functions/actionCommandVerifiableCredentialCreate.md +3 -1
  30. package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +25 -5
  31. package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +25 -5
  32. package/docs/reference/functions/actionCommandVerifiableCredentialVerify.md +3 -1
  33. package/docs/reference/functions/actionCommandVerificationMethodAdd.md +3 -1
  34. package/docs/reference/functions/actionCommandVerificationMethodRemove.md +25 -5
  35. package/docs/reference/functions/setupIdentityConnector.md +47 -0
  36. package/docs/reference/functions/setupVault.md +9 -0
  37. package/docs/reference/index.md +10 -0
  38. package/docs/reference/type-aliases/IdentityConnectorTypes.md +5 -0
  39. package/docs/reference/variables/IdentityConnectorTypes.md +19 -0
  40. package/locales/en.json +35 -36
  41. package/package.json +12 -38
@@ -6,26 +6,46 @@ Action the verifiable credential unrevoke command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **opts**
9
+ ### opts
10
10
 
11
11
  The options for the command.
12
12
 
13
- **opts.seed**: `string`
13
+ #### seed
14
+
15
+ `string`
14
16
 
15
17
  The seed to generate the private key for the controller.
16
18
 
17
- **opts.did**: `string`
19
+ #### did
20
+
21
+ `string`
18
22
 
19
23
  The id of the document to unrevoke the index.
20
24
 
21
- **opts.revocationIndex**: `string`
25
+ #### revocationIndex
26
+
27
+ `string`
22
28
 
23
29
  The revocation index for the credential.
24
30
 
25
- **opts.node**: `string`
31
+ #### connector?
32
+
33
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
34
+
35
+ The connector to perform the operations with.
36
+
37
+ #### node
38
+
39
+ `string`
26
40
 
27
41
  The node URL.
28
42
 
43
+ #### network?
44
+
45
+ `string`
46
+
47
+ The network to use for connector.
48
+
29
49
  ## Returns
30
50
 
31
51
  `Promise`\<`void`\>
@@ -6,7 +6,9 @@ Action the verifiable credential verify command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **opts**: `object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
9
+ ### opts
10
+
11
+ `object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
10
12
 
11
13
  The options for the command.
12
14
 
@@ -6,7 +6,9 @@ Action the verification method add command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **opts**: `object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
9
+ ### opts
10
+
11
+ `object` & `ICliOutputOptionsConsole` & `ICliOutputOptionsEnv` & `ICliOutputOptionsJson`
10
12
 
11
13
  The options for the command.
12
14
 
@@ -6,23 +6,43 @@ Action the verification method remove command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **opts**
9
+ ### opts
10
10
 
11
11
  The options for the command.
12
12
 
13
- **opts.seed**: `string`
13
+ #### seed
14
+
15
+ `string`
14
16
 
15
17
  The private key for the controller.
16
18
 
17
- **opts.id**: `string`
19
+ #### id
20
+
21
+ `string`
18
22
 
19
23
  The id of the verification method to remove.
20
24
 
21
- **opts.node**: `string`
25
+ #### connector?
26
+
27
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
28
+
29
+ The connector to perform the operations with.
30
+
31
+ #### node
32
+
33
+ `string`
22
34
 
23
35
  The node URL.
24
36
 
25
- **opts.explorer**: `string`
37
+ #### network?
38
+
39
+ `string`
40
+
41
+ The network to use for connector.
42
+
43
+ #### explorer
44
+
45
+ `string`
26
46
 
27
47
  The explorer URL.
28
48
 
@@ -0,0 +1,47 @@
1
+ # Function: setupIdentityConnector()
2
+
3
+ > **setupIdentityConnector**(`options`, `connector`?): `IIdentityConnector`
4
+
5
+ Setup the identity connector for use in the CLI commands.
6
+
7
+ ## Parameters
8
+
9
+ ### options
10
+
11
+ The options for the identity connector.
12
+
13
+ #### nodeEndpoint
14
+
15
+ `string`
16
+
17
+ The node endpoint.
18
+
19
+ #### network?
20
+
21
+ `string`
22
+
23
+ The network.
24
+
25
+ #### addressIndex?
26
+
27
+ `number`
28
+
29
+ The wallet index.
30
+
31
+ #### vaultSeedId?
32
+
33
+ `string`
34
+
35
+ The vault seed ID.
36
+
37
+ ### connector?
38
+
39
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
40
+
41
+ The connector to use.
42
+
43
+ ## Returns
44
+
45
+ `IIdentityConnector`
46
+
47
+ The identity connector.
@@ -0,0 +1,9 @@
1
+ # Function: setupVault()
2
+
3
+ > **setupVault**(): `void`
4
+
5
+ Setup the vault for use in the CLI commands.
6
+
7
+ ## Returns
8
+
9
+ `void`
@@ -4,6 +4,14 @@
4
4
 
5
5
  - [CLI](classes/CLI.md)
6
6
 
7
+ ## Type Aliases
8
+
9
+ - [IdentityConnectorTypes](type-aliases/IdentityConnectorTypes.md)
10
+
11
+ ## Variables
12
+
13
+ - [IdentityConnectorTypes](variables/IdentityConnectorTypes.md)
14
+
7
15
  ## Functions
8
16
 
9
17
  - [buildCommandIdentityCreate](functions/buildCommandIdentityCreate.md)
@@ -18,6 +26,8 @@
18
26
  - [actionCommandServiceAdd](functions/actionCommandServiceAdd.md)
19
27
  - [buildCommandServiceRemove](functions/buildCommandServiceRemove.md)
20
28
  - [actionCommandServiceRemove](functions/actionCommandServiceRemove.md)
29
+ - [setupVault](functions/setupVault.md)
30
+ - [setupIdentityConnector](functions/setupIdentityConnector.md)
21
31
  - [buildCommandVerifiableCredentialCreate](functions/buildCommandVerifiableCredentialCreate.md)
22
32
  - [actionCommandVerifiableCredentialCreate](functions/actionCommandVerifiableCredentialCreate.md)
23
33
  - [buildCommandVerifiableCredentialRevoke](functions/buildCommandVerifiableCredentialRevoke.md)
@@ -0,0 +1,5 @@
1
+ # Type Alias: IdentityConnectorTypes
2
+
3
+ > **IdentityConnectorTypes**: *typeof* [`IdentityConnectorTypes`](../variables/IdentityConnectorTypes.md)\[keyof *typeof* [`IdentityConnectorTypes`](../variables/IdentityConnectorTypes.md)\]
4
+
5
+ The identity connector types.
@@ -0,0 +1,19 @@
1
+ # Variable: IdentityConnectorTypes
2
+
3
+ > `const` **IdentityConnectorTypes**: `object`
4
+
5
+ The identity connector types.
6
+
7
+ ## Type declaration
8
+
9
+ ### Iota
10
+
11
+ > `readonly` **Iota**: `"iota"` = `"iota"`
12
+
13
+ IOTA.
14
+
15
+ ### IotaStardust
16
+
17
+ > `readonly` **IotaStardust**: `"iota-stardust"` = `"iota-stardust"`
18
+
19
+ IOTA Stardust.
package/locales/en.json CHANGED
@@ -3,6 +3,10 @@
3
3
  "commands": {
4
4
  "verifiable-credential-create": {
5
5
  "subjectJsonFileNotFound": "The subject JSON file was not found."
6
+ },
7
+ "proof-create": {
8
+ "documentJsonFileNotFound": "The document JSON file was not found.",
9
+ "proofJsonFileNotFound": "The proof JSON file was not found."
6
10
  }
7
11
  }
8
12
  },
@@ -14,13 +18,18 @@
14
18
  "seed": {
15
19
  "param": "--seed '<'seed'>'",
16
20
  "description": "The seed for the controller address in hex or base64 used to create the DID, or start with ! to read environment variable."
21
+ },
22
+ "addressIndex": {
23
+ "param": "--address-index '<'index'>'",
24
+ "description": "The address index to use for the creation."
17
25
  }
18
26
  },
19
27
  "progress": {
20
28
  "creatingIdentity": "Creating identity"
21
29
  },
22
30
  "labels": {
23
- "identity": "Identity"
31
+ "identity": "Identity",
32
+ "addressIndex": "Address Index"
24
33
  }
25
34
  },
26
35
  "identity-resolve": {
@@ -164,17 +173,9 @@
164
173
  "param": "--credential-id '<'credential-id'>'",
165
174
  "description": "The credential id which uniquely identifies the credential."
166
175
  },
167
- "types": {
168
- "param": "--types [types...]",
169
- "description": "The list of types to include in the verifiable credential."
170
- },
171
176
  "subject-json": {
172
177
  "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
+ "description": "A JSON-LD file to read which includes the data for the verifiable credential."
178
179
  },
179
180
  "revocation-index": {
180
181
  "param": "--revocation-index '<'revocation-index'>'",
@@ -188,8 +189,6 @@
188
189
  "labels": {
189
190
  "verificationMethodId": "Verification Method Id",
190
191
  "credentialId": "Credential Id",
191
- "types": "Types",
192
- "contexts": "Contexts",
193
192
  "subjectJson": "Subject JSON",
194
193
  "revocationIndex": "Revocation Index",
195
194
  "verifiableCredential": "Verifiable Credential"
@@ -273,63 +272,63 @@
273
272
  "param": "--private-key '<'private-key'>'",
274
273
  "description": "The private key for the verification method id, in either hex or base64 form, or start with ! to read environment variable."
275
274
  },
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."
275
+ "document-filename": {
276
+ "param": "--document-filename '<'document-filename'>'",
277
+ "description": "The filename of a JSON-LD document to create the proof for."
279
278
  }
280
279
  },
281
280
  "progress": {
282
281
  "creatingProof": "Creating Proof"
283
282
  },
284
283
  "labels": {
285
- "verificationMethodId": "Verification Method Id",
286
- "type": "Proof Type",
287
- "value": "Proof Value"
284
+ "documentFilename": "Document Filename",
285
+ "verificationMethodId": "Verification Method Id"
288
286
  }
289
287
  },
290
288
  "proof-verify": {
291
289
  "summary": "Verify a proof for some data using a verification method.",
292
290
  "description": "Verify a proof for some data using a verification method.",
293
291
  "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."
292
+ "document-filename": {
293
+ "param": "--document-filename '<'document-filename'>'",
294
+ "description": "The filename of a JSON-LD document to create the proof for."
305
295
  },
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."
296
+ "proof-filename": {
297
+ "param": "--proof-filename '<'proof-filename'>'",
298
+ "description": "The filename of the proof JSON."
309
299
  }
310
300
  },
311
301
  "progress": {
312
302
  "verifyingProof": "Verifying Proof"
313
303
  },
314
304
  "labels": {
315
- "verificationMethodId": "Verification Method Id",
316
- "type": "Proof Type",
317
- "value": "Proof Value",
305
+ "documentFilename": "Document Filename",
306
+ "proofFilename": "Proof Filename",
318
307
  "isVerified": "Is Verified"
319
308
  }
320
309
  },
321
310
  "common": {
322
311
  "options": {
312
+ "connector": {
313
+ "param": "--connector '<'connector'>'",
314
+ "description": "The connector to use for the identity operation."
315
+ },
323
316
  "node": {
324
317
  "param": "--node '<'url'>'",
325
318
  "description": "The url for the node endpoint, or an environment variable name containing the url."
319
+ },
320
+ "network": {
321
+ "param": "--network '<'network'>'",
322
+ "description": "The network to use for the identity operation."
326
323
  }
327
324
  },
328
325
  "labels": {
329
326
  "did": "DID",
330
327
  "node": "Node",
331
328
  "explorer": "Explorer",
332
- "explore": "Explore"
329
+ "explore": "Explore",
330
+ "connector": "Connector",
331
+ "network": "Network"
333
332
  }
334
333
  }
335
334
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@twin.org/identity-cli",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.31",
4
4
  "description": "A command line interface for interacting with the identity connectors",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/identity.git",
8
- "directory": "packages/identity-cli"
8
+ "directory": "apps/identity-cli"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
11
11
  "license": "Apache-2.0",
@@ -13,62 +13,36 @@
13
13
  "engines": {
14
14
  "node": ">=20.0.0"
15
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
16
  "dependencies": {
17
+ "@iota/sdk-wasm": "1.1.3",
18
+ "@twin.org/cli-core": "next",
31
19
  "@twin.org/core": "next",
32
20
  "@twin.org/crypto": "next",
33
- "@twin.org/cli-core": "next",
34
21
  "@twin.org/crypto-cli": "next",
22
+ "@twin.org/data-json-ld": "next",
35
23
  "@twin.org/entity": "next",
36
24
  "@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",
25
+ "@twin.org/identity-connector-iota": "0.0.1-next.31",
26
+ "@twin.org/identity-connector-iota-stardust": "0.0.1-next.31",
27
+ "@twin.org/identity-models": "0.0.1-next.31",
39
28
  "@twin.org/nameof": "next",
40
29
  "@twin.org/standards-w3c-did": "next",
41
30
  "@twin.org/vault-connector-entity-storage": "next",
42
31
  "@twin.org/vault-models": "next",
43
32
  "@twin.org/wallet-cli": "next",
44
33
  "@twin.org/wallet-connector-iota": "next",
34
+ "@twin.org/wallet-connector-iota-stardust": "next",
45
35
  "@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"
36
+ "commander": "13.1.0"
63
37
  },
64
38
  "main": "./dist/cjs/index.cjs",
65
39
  "module": "./dist/esm/index.mjs",
66
40
  "types": "./dist/types/index.d.ts",
67
41
  "exports": {
68
42
  ".": {
43
+ "types": "./dist/types/index.d.ts",
69
44
  "require": "./dist/cjs/index.cjs",
70
- "import": "./dist/esm/index.mjs",
71
- "types": "./dist/types/index.d.ts"
45
+ "import": "./dist/esm/index.mjs"
72
46
  }
73
47
  },
74
48
  "files": [