@twin.org/identity-cli 0.0.1-next.8 → 0.0.1

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 (45) hide show
  1. package/bin/index.js +0 -0
  2. package/dist/cjs/index.cjs +361 -272
  3. package/dist/esm/index.mjs +359 -275
  4. package/dist/locales/en.json +878 -779
  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 +31 -0
  12. package/dist/types/commands/verifiableCredentialCreate.d.ts +4 -0
  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 +3 -0
  19. package/dist/types/models/identityConnectorTypes.d.ts +13 -0
  20. package/dist/types/models/identityResolverConnectorTypes.d.ts +13 -0
  21. package/docs/changelog.md +308 -1
  22. package/docs/examples.md +14 -12
  23. package/docs/reference/classes/CLI.md +14 -8
  24. package/docs/reference/functions/actionCommandIdentityCreate.md +3 -1
  25. package/docs/reference/functions/actionCommandIdentityResolve.md +3 -1
  26. package/docs/reference/functions/actionCommandProofCreate.md +3 -1
  27. package/docs/reference/functions/actionCommandProofVerify.md +3 -1
  28. package/docs/reference/functions/actionCommandServiceAdd.md +3 -1
  29. package/docs/reference/functions/actionCommandServiceRemove.md +25 -5
  30. package/docs/reference/functions/actionCommandVerifiableCredentialCreate.md +3 -1
  31. package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +25 -5
  32. package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +25 -5
  33. package/docs/reference/functions/actionCommandVerifiableCredentialVerify.md +3 -1
  34. package/docs/reference/functions/actionCommandVerificationMethodAdd.md +3 -1
  35. package/docs/reference/functions/actionCommandVerificationMethodRemove.md +25 -5
  36. package/docs/reference/functions/setupIdentityConnector.md +47 -0
  37. package/docs/reference/functions/setupIdentityResolverConnector.md +35 -0
  38. package/docs/reference/functions/setupVault.md +9 -0
  39. package/docs/reference/index.md +13 -0
  40. package/docs/reference/type-aliases/IdentityConnectorTypes.md +5 -0
  41. package/docs/reference/type-aliases/IdentityResolverConnectorTypes.md +5 -0
  42. package/docs/reference/variables/IdentityConnectorTypes.md +13 -0
  43. package/docs/reference/variables/IdentityResolverConnectorTypes.md +13 -0
  44. package/locales/en.json +39 -27
  45. package/package.json +21 -21
@@ -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
+ `"iota"`
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
+ `"iota"`
40
+
41
+ The connector to use.
42
+
43
+ ## Returns
44
+
45
+ `IIdentityConnector`
46
+
47
+ The identity connector.
@@ -0,0 +1,35 @@
1
+ # Function: setupIdentityResolverConnector()
2
+
3
+ > **setupIdentityResolverConnector**(`options`, `connector?`): `IIdentityResolverConnector`
4
+
5
+ Setup the identity resolver 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
+ ### connector?
26
+
27
+ `"iota"`
28
+
29
+ The connector to use.
30
+
31
+ ## Returns
32
+
33
+ `IIdentityResolverConnector`
34
+
35
+ 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,16 @@
4
4
 
5
5
  - [CLI](classes/CLI.md)
6
6
 
7
+ ## Type Aliases
8
+
9
+ - [IdentityConnectorTypes](type-aliases/IdentityConnectorTypes.md)
10
+ - [IdentityResolverConnectorTypes](type-aliases/IdentityResolverConnectorTypes.md)
11
+
12
+ ## Variables
13
+
14
+ - [IdentityConnectorTypes](variables/IdentityConnectorTypes.md)
15
+ - [IdentityResolverConnectorTypes](variables/IdentityResolverConnectorTypes.md)
16
+
7
17
  ## Functions
8
18
 
9
19
  - [buildCommandIdentityCreate](functions/buildCommandIdentityCreate.md)
@@ -18,6 +28,9 @@
18
28
  - [actionCommandServiceAdd](functions/actionCommandServiceAdd.md)
19
29
  - [buildCommandServiceRemove](functions/buildCommandServiceRemove.md)
20
30
  - [actionCommandServiceRemove](functions/actionCommandServiceRemove.md)
31
+ - [setupVault](functions/setupVault.md)
32
+ - [setupIdentityConnector](functions/setupIdentityConnector.md)
33
+ - [setupIdentityResolverConnector](functions/setupIdentityResolverConnector.md)
21
34
  - [buildCommandVerifiableCredentialCreate](functions/buildCommandVerifiableCredentialCreate.md)
22
35
  - [actionCommandVerifiableCredentialCreate](functions/actionCommandVerifiableCredentialCreate.md)
23
36
  - [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,5 @@
1
+ # Type Alias: IdentityResolverConnectorTypes
2
+
3
+ > **IdentityResolverConnectorTypes** = *typeof* [`IdentityResolverConnectorTypes`](../variables/IdentityResolverConnectorTypes.md)\[keyof *typeof* [`IdentityResolverConnectorTypes`](../variables/IdentityResolverConnectorTypes.md)\]
4
+
5
+ The identity resolver connector types.
@@ -0,0 +1,13 @@
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.
@@ -0,0 +1,13 @@
1
+ # Variable: IdentityResolverConnectorTypes
2
+
3
+ > `const` **IdentityResolverConnectorTypes**: `object`
4
+
5
+ The identity resolver connector types.
6
+
7
+ ## Type declaration
8
+
9
+ ### Iota
10
+
11
+ > `readonly` **Iota**: `"iota"` = `"iota"`
12
+
13
+ IOTA.
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": {
@@ -66,8 +75,11 @@
66
75
  "labels": {
67
76
  "verificationMethodType": "Verification Method Type",
68
77
  "verificationMethodId": "Verification Method Id",
69
- "privateKey": "Private Key",
70
- "publicKey": "Public Key"
78
+ "privateKeyBase64": "Private Key Base64",
79
+ "publicKeyBase64": "Public Key Base64",
80
+ "privateKeyHex": "Private Key Hex",
81
+ "publicKeyHex": "Public Key Hex",
82
+ "kid": "Key Id"
71
83
  }
72
84
  },
73
85
  "verification-method-remove": {
@@ -263,63 +275,63 @@
263
275
  "param": "--private-key '<'private-key'>'",
264
276
  "description": "The private key for the verification method id, in either hex or base64 form, or start with ! to read environment variable."
265
277
  },
266
- "data": {
267
- "param": "--data '<'data'>'",
268
- "description": "The base64 or hex encoded data to create the proof for, or start with ! to read environment variable."
278
+ "document-filename": {
279
+ "param": "--document-filename '<'document-filename'>'",
280
+ "description": "The filename of a JSON-LD document to create the proof for."
269
281
  }
270
282
  },
271
283
  "progress": {
272
284
  "creatingProof": "Creating Proof"
273
285
  },
274
286
  "labels": {
275
- "verificationMethodId": "Verification Method Id",
276
- "type": "Proof Type",
277
- "value": "Proof Value"
287
+ "documentFilename": "Document Filename",
288
+ "verificationMethodId": "Verification Method Id"
278
289
  }
279
290
  },
280
291
  "proof-verify": {
281
292
  "summary": "Verify a proof for some data using a verification method.",
282
293
  "description": "Verify a proof for some data using a verification method.",
283
294
  "options": {
284
- "id": {
285
- "param": "--id '<'id'>'",
286
- "description": "The full verification method id including did, or start with ! to read environment variable."
295
+ "document-filename": {
296
+ "param": "--document-filename '<'document-filename'>'",
297
+ "description": "The filename of a JSON-LD document to create the proof for."
287
298
  },
288
- "data": {
289
- "param": "--data '<'data'>'",
290
- "description": "The base64 or hex encoded data to verify the proof for, or start with ! to read environment variable."
291
- },
292
- "type": {
293
- "param": "--type '<'type'>'",
294
- "description": "The type of the proof, or start with ! to read environment variable."
295
- },
296
- "value": {
297
- "param": "--value '<'value'>'",
298
- "description": "The base64 or hex encoded data to use for verifying the proof, or start with ! to read environment variable."
299
+ "proof-filename": {
300
+ "param": "--proof-filename '<'proof-filename'>'",
301
+ "description": "The filename of the proof JSON."
299
302
  }
300
303
  },
301
304
  "progress": {
302
305
  "verifyingProof": "Verifying Proof"
303
306
  },
304
307
  "labels": {
305
- "verificationMethodId": "Verification Method Id",
306
- "type": "Proof Type",
307
- "value": "Proof Value",
308
+ "documentFilename": "Document Filename",
309
+ "proofFilename": "Proof Filename",
308
310
  "isVerified": "Is Verified"
309
311
  }
310
312
  },
311
313
  "common": {
312
314
  "options": {
315
+ "connector": {
316
+ "param": "--connector '<'connector'>'",
317
+ "description": "The connector to use for the identity operation."
318
+ },
313
319
  "node": {
314
320
  "param": "--node '<'url'>'",
315
321
  "description": "The url for the node endpoint, or an environment variable name containing the url."
322
+ },
323
+ "network": {
324
+ "param": "--network '<'network'>'",
325
+ "description": "The network to use for the identity operation."
316
326
  }
317
327
  },
318
328
  "labels": {
319
329
  "did": "DID",
320
330
  "node": "Node",
321
331
  "explorer": "Explorer",
322
- "explore": "Explore"
332
+ "explore": "Explore",
333
+ "connector": "Connector",
334
+ "network": "Network"
323
335
  }
324
336
  }
325
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-cli",
3
- "version": "0.0.1-next.8",
3
+ "version": "0.0.1",
4
4
  "description": "A command line interface for interacting with the identity connectors",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,33 +14,33 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@iota/sdk-wasm": "1.1.3",
18
- "@twin.org/cli-core": "next",
19
- "@twin.org/core": "next",
20
- "@twin.org/crypto": "next",
21
- "@twin.org/crypto-cli": "next",
22
- "@twin.org/data-json-ld": "next",
23
- "@twin.org/entity": "next",
24
- "@twin.org/entity-storage-connector-memory": "next",
25
- "@twin.org/identity-connector-iota": "0.0.1-next.8",
26
- "@twin.org/identity-models": "0.0.1-next.8",
27
- "@twin.org/nameof": "next",
28
- "@twin.org/standards-w3c-did": "next",
29
- "@twin.org/vault-connector-entity-storage": "next",
30
- "@twin.org/vault-models": "next",
31
- "@twin.org/wallet-cli": "next",
32
- "@twin.org/wallet-connector-iota": "next",
33
- "@twin.org/wallet-models": "next",
34
- "commander": "12.1.0"
17
+ "@twin.org/cli-core": "^0.0.1",
18
+ "@twin.org/core": "^0.0.1",
19
+ "@twin.org/crypto": "^0.0.1",
20
+ "@twin.org/crypto-cli": "^0.0.1",
21
+ "@twin.org/data-json-ld": "^0.0.1",
22
+ "@twin.org/entity": "^0.0.1",
23
+ "@twin.org/entity-storage-connector-memory": "^0.0.1",
24
+ "@twin.org/identity-connector-iota": "^0.0.1",
25
+ "@twin.org/identity-models": "^0.0.1",
26
+ "@twin.org/nameof": "^0.0.1",
27
+ "@twin.org/standards-w3c-did": "^0.0.1",
28
+ "@twin.org/vault-connector-entity-storage": "^0.0.1",
29
+ "@twin.org/vault-models": "^0.0.1",
30
+ "@twin.org/wallet-cli": "^0.0.1",
31
+ "@twin.org/wallet-connector-iota": "^0.0.1",
32
+ "@twin.org/wallet-models": "^0.0.1",
33
+ "@twin.org/web": "^0.0.1",
34
+ "commander": "14.0.0"
35
35
  },
36
36
  "main": "./dist/cjs/index.cjs",
37
37
  "module": "./dist/esm/index.mjs",
38
38
  "types": "./dist/types/index.d.ts",
39
39
  "exports": {
40
40
  ".": {
41
+ "types": "./dist/types/index.d.ts",
41
42
  "require": "./dist/cjs/index.cjs",
42
- "import": "./dist/esm/index.mjs",
43
- "types": "./dist/types/index.d.ts"
43
+ "import": "./dist/esm/index.mjs"
44
44
  }
45
45
  },
46
46
  "files": [