@twin.org/identity-cli 0.0.1-next.19 → 0.0.1-next.22

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 (40) hide show
  1. package/dist/cjs/index.cjs +249 -226
  2. package/dist/esm/index.mjs +250 -230
  3. package/dist/locales/en.json +77 -14
  4. package/dist/types/commands/identityCreate.d.ts +6 -0
  5. package/dist/types/commands/identityResolve.d.ts +5 -0
  6. package/dist/types/commands/proofCreate.d.ts +5 -0
  7. package/dist/types/commands/proofVerify.d.ts +5 -0
  8. package/dist/types/commands/serviceAdd.d.ts +4 -0
  9. package/dist/types/commands/serviceRemove.d.ts +5 -0
  10. package/dist/types/commands/setupCommands.d.ts +18 -0
  11. package/dist/types/commands/verifiableCredentialCreate.d.ts +4 -0
  12. package/dist/types/commands/verifiableCredentialRevoke.d.ts +5 -0
  13. package/dist/types/commands/verifiableCredentialUnrevoke.d.ts +5 -0
  14. package/dist/types/commands/verifiableCredentialVerify.d.ts +4 -0
  15. package/dist/types/commands/verificationMethodAdd.d.ts +4 -0
  16. package/dist/types/commands/verificationMethodRemove.d.ts +5 -0
  17. package/dist/types/index.d.ts +2 -0
  18. package/dist/types/models/identityConnectorTypes.d.ts +17 -0
  19. package/docs/changelog.md +1 -1
  20. package/docs/examples.md +5 -5
  21. package/docs/reference/classes/CLI.md +10 -4
  22. package/docs/reference/functions/actionCommandIdentityCreate.md +3 -1
  23. package/docs/reference/functions/actionCommandIdentityResolve.md +3 -1
  24. package/docs/reference/functions/actionCommandProofCreate.md +3 -1
  25. package/docs/reference/functions/actionCommandProofVerify.md +3 -1
  26. package/docs/reference/functions/actionCommandServiceAdd.md +3 -1
  27. package/docs/reference/functions/actionCommandServiceRemove.md +25 -5
  28. package/docs/reference/functions/actionCommandVerifiableCredentialCreate.md +3 -1
  29. package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +25 -5
  30. package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +25 -5
  31. package/docs/reference/functions/actionCommandVerifiableCredentialVerify.md +3 -1
  32. package/docs/reference/functions/actionCommandVerificationMethodAdd.md +3 -1
  33. package/docs/reference/functions/actionCommandVerificationMethodRemove.md +25 -5
  34. package/docs/reference/functions/setupIdentityConnector.md +47 -0
  35. package/docs/reference/functions/setupVault.md +9 -0
  36. package/docs/reference/index.md +10 -0
  37. package/docs/reference/type-aliases/IdentityConnectorTypes.md +5 -0
  38. package/docs/reference/variables/IdentityConnectorTypes.md +19 -0
  39. package/locales/en.json +17 -2
  40. package/package.json +8 -6
@@ -6,23 +6,43 @@ Action the service 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 service 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 rebased connector.
42
+
43
+ #### explorer
44
+
45
+ `string`
26
46
 
27
47
  The explorer URL.
28
48
 
@@ -6,7 +6,9 @@ Action the verifiable credential create 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,26 +6,46 @@ Action the verifiable credential revoke 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 revoke 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 rebased connector.
48
+
29
49
  ## Returns
30
50
 
31
51
  `Promise`\<`void`\>
@@ -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 rebased 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 rebased 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
+ ### IotaRebased
16
+
17
+ > `readonly` **IotaRebased**: `"iota-rebased"` = `"iota-rebased"`
18
+
19
+ IOTA Rebased.
package/locales/en.json CHANGED
@@ -14,13 +14,18 @@
14
14
  "seed": {
15
15
  "param": "--seed '<'seed'>'",
16
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
+ "addressIndex": {
19
+ "param": "--address-index '<'index'>'",
20
+ "description": "The address index to use for the creation."
17
21
  }
18
22
  },
19
23
  "progress": {
20
24
  "creatingIdentity": "Creating identity"
21
25
  },
22
26
  "labels": {
23
- "identity": "Identity"
27
+ "identity": "Identity",
28
+ "addressIndex": "Address Index"
24
29
  }
25
30
  },
26
31
  "identity-resolve": {
@@ -308,16 +313,26 @@
308
313
  },
309
314
  "common": {
310
315
  "options": {
316
+ "connector": {
317
+ "param": "--connector '<'connector'>'",
318
+ "description": "The connector to use for the identity operation."
319
+ },
311
320
  "node": {
312
321
  "param": "--node '<'url'>'",
313
322
  "description": "The url for the node endpoint, or an environment variable name containing the url."
323
+ },
324
+ "network": {
325
+ "param": "--network '<'network'>'",
326
+ "description": "The network to use for the identity operation."
314
327
  }
315
328
  },
316
329
  "labels": {
317
330
  "did": "DID",
318
331
  "node": "Node",
319
332
  "explorer": "Explorer",
320
- "explore": "Explore"
333
+ "explore": "Explore",
334
+ "connector": "Connector",
335
+ "network": "Network"
321
336
  }
322
337
  }
323
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-cli",
3
- "version": "0.0.1-next.19",
3
+ "version": "0.0.1-next.22",
4
4
  "description": "A command line interface for interacting with the identity connectors",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,25 +22,27 @@
22
22
  "@twin.org/data-json-ld": "next",
23
23
  "@twin.org/entity": "next",
24
24
  "@twin.org/entity-storage-connector-memory": "next",
25
- "@twin.org/identity-connector-iota": "0.0.1-next.19",
26
- "@twin.org/identity-models": "0.0.1-next.19",
25
+ "@twin.org/identity-connector-iota": "0.0.1-next.22",
26
+ "@twin.org/identity-connector-iota-rebased": "0.0.1-next.22",
27
+ "@twin.org/identity-models": "0.0.1-next.22",
27
28
  "@twin.org/nameof": "next",
28
29
  "@twin.org/standards-w3c-did": "next",
29
30
  "@twin.org/vault-connector-entity-storage": "next",
30
31
  "@twin.org/vault-models": "next",
31
32
  "@twin.org/wallet-cli": "next",
32
33
  "@twin.org/wallet-connector-iota": "next",
34
+ "@twin.org/wallet-connector-iota-rebased": "next",
33
35
  "@twin.org/wallet-models": "next",
34
- "commander": "12.1.0"
36
+ "commander": "13.0.0"
35
37
  },
36
38
  "main": "./dist/cjs/index.cjs",
37
39
  "module": "./dist/esm/index.mjs",
38
40
  "types": "./dist/types/index.d.ts",
39
41
  "exports": {
40
42
  ".": {
43
+ "types": "./dist/types/index.d.ts",
41
44
  "require": "./dist/cjs/index.cjs",
42
- "import": "./dist/esm/index.mjs",
43
- "types": "./dist/types/index.d.ts"
45
+ "import": "./dist/esm/index.mjs"
44
46
  }
45
47
  },
46
48
  "files": [