@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
@@ -195,9 +195,16 @@
195
195
  "noKeyOrSigner": "No key or signer was provided for JWT creation",
196
196
  "noKeyOrVerifier": "No key or verifier was provided for JWT creation"
197
197
  },
198
+ "jwtHelper": {
199
+ "jwtDecodeFailed": "Decoding the JWT failed",
200
+ "jwtPayloadMissingParam": "The JWT is missing the required parameter \"{param}\""
201
+ },
202
+ "iotaIdentityResolverConnector": {
203
+ "documentNotFound": "The document could not be found",
204
+ "resolveDocumentFailed": "Resolving the document failed"
205
+ },
198
206
  "iotaIdentityConnector": {
199
207
  "createDocumentFailed": "Creating the document failed",
200
- "resolveDocumentFailed": "Resolving the document failed",
201
208
  "missingDid": "The full id including DID is required",
202
209
  "addVerificationMethodFailed": "Adding the verification method failed",
203
210
  "removeVerificationMethodFailed": "Removing the verification method failed",
@@ -230,6 +237,45 @@
230
237
  "inclusionFailed": "The transaction generated was not included in a reasonable amount of time",
231
238
  "insufficientFunds": "There were insufficient funds to complete the operation"
232
239
  },
240
+ "iotaRebasedIdentityResolverConnector": {
241
+ "documentNotFound": "The document could not be found",
242
+ "resolveDocumentFailed": "Resolving the document failed"
243
+ },
244
+ "iotaRebasedIdentityConnector": {
245
+ "createDocumentFailed": "Creating the document failed",
246
+ "missingDid": "The full id including DID is required",
247
+ "addVerificationMethodFailed": "Adding the verification method failed",
248
+ "removeVerificationMethodFailed": "Removing the verification method failed",
249
+ "addServiceFailed": "Adding the service failed",
250
+ "removeServiceFailed": "Removing the service failed",
251
+ "documentNotFound": "The document could not be found",
252
+ "stateControllerMissing": "The state controller address is missing from the metadata",
253
+ "verificationMethodNotFound": "The verification method could not be found",
254
+ "serviceNotFound": "The service could not be found",
255
+ "publicKeyJwkMissing": "The verification method contains no publicKeyJwk in method \"{method}\"",
256
+ "verificationKeyMissing": "The verification key is missing from the vault for method \"{method}\"",
257
+ "createVerifiableCredentialFailed": "Creating the verifiable credential failed",
258
+ "checkingVerifiableCredentialFailed": "Checking the verifiable credential failed",
259
+ "createVerifiablePresentationFailed": "Creating the verifiable presentation failed",
260
+ "checkingVerifiablePresentationFailed": "Checking the verifiable presentation failed",
261
+ "expectingJwtCredential": "Expecting JWT credential in the presentation",
262
+ "keyIndexOutOfRange": "The supplied keyIndex is not in the range of the key list",
263
+ "createProofFailed": "Creating the signature for the data failed",
264
+ "methodMissing": "The verification method specified does not exist \"{method}\"",
265
+ "verifyProofFailed": "Verifying the signature for the data failed",
266
+ "revokeVerifiableCredentialsFailed": "Revoking verifiable credentials failed",
267
+ "unrevokeVerifiableCredentialsFailed": "Unrevoking verifiable credentials failed",
268
+ "inclusionFailed": "The transaction generated for the identity was not included in a reasonable amount of time",
269
+ "insufficientFunds": "There were insufficient funds to complete the operation",
270
+ "walletConnectorMissing": "The wallet connector must be available to perform this operation",
271
+ "proofType": "The proof type must be DataIntegrityProof, it is currently {proofType}",
272
+ "cryptosuite": "The proof cryptosuite must be eddsa-jcs-2022, it is currently {cryptosuite}"
273
+ },
274
+ "iotaRebased": {
275
+ "insufficientFunds": "There were insufficient funds to complete the operation",
276
+ "packageNotFoundOnNetwork": "The package \"{packageId}\" was not found on the network",
277
+ "packageObjectError": "Failed to fetch the package object \"{packageId}\""
278
+ },
233
279
  "entityStorageVaultConnector": {
234
280
  "keyAlreadyExists": "The key \"{existingId}\" already exists in the vault",
235
281
  "keyNotFound": "The key \"{notFoundId}\" was not found in the vault",
@@ -245,6 +291,12 @@
245
291
  "iotaFaucetConnector": {
246
292
  "fundingFailed": "Fund the address from faucet failed",
247
293
  "insufficientFunds": "There were insufficient funds to complete the operation"
294
+ },
295
+ "iotaRebasedWalletConnector": {
296
+ "transferFailed": "The wallet transfer failed."
297
+ },
298
+ "iotaRebasedFaucetConnector": {
299
+ "fundingFailed": "Fund the address from faucet failed"
248
300
  }
249
301
  },
250
302
  "errorNames": {
@@ -345,8 +397,8 @@
345
397
  }
346
398
  },
347
399
  "address": {
348
- "summary": "Create bech32 addresses and keys from the seed.",
349
- "description": "Create a number of bech32 addresses and their associated key pairs from the seed.",
400
+ "summary": "Create addresses and keys from the seed.",
401
+ "description": "Create a number of addresses and their associated key pairs from the seed.",
350
402
  "options": {
351
403
  "seed": {
352
404
  "param": "--seed '<'seed'>'",
@@ -362,15 +414,15 @@
362
414
  },
363
415
  "account": {
364
416
  "param": "--account '<'number'>'",
365
- "description": "The account used to generate the bech32 addresses."
417
+ "description": "The account used to generate the addresses."
366
418
  },
367
419
  "hrp": {
368
420
  "param": "--hrp '<'hrp'>'",
369
- "description": "The human readable part of the bech32 addresses."
421
+ "description": "The human readable part for the addresses if generating bech32 format."
370
422
  },
371
423
  "coin": {
372
424
  "param": "--coin '<'coin'>'",
373
- "description": "The coin type used to generate the bech32 addresses."
425
+ "description": "The coin type used to generate the addresses."
374
426
  },
375
427
  "key-type": {
376
428
  "param": "--key-type '<'type'>'",
@@ -405,7 +457,7 @@
405
457
  "options": {
406
458
  "address": {
407
459
  "param": "--address '<'address'>'",
408
- "description": "The address to fill from the faucet either in bech32 format, or start with ! to read environment variable."
460
+ "description": "The address to fill from the faucet either bech32 or hex format, or start with ! to read environment variable."
409
461
  },
410
462
  "faucet": {
411
463
  "param": "--faucet '<'url'>'",
@@ -449,15 +501,24 @@
449
501
  "transferringFunds": "Transferring"
450
502
  },
451
503
  "labels": {
452
- "destAddress": "Destination Address"
504
+ "destAddress": "Destination Address",
505
+ "amount": "Amount"
453
506
  }
454
507
  },
455
508
  "common": {
456
509
  "options": {
510
+ "connector": {
511
+ "param": "--connector '<'connector'>'",
512
+ "description": "The connector to use for the identity operation."
513
+ },
457
514
  "node": {
458
515
  "param": "--node '<'url'>'",
459
516
  "description": "The url for the node endpoint, or an environment variable name containing the url."
460
517
  },
518
+ "network": {
519
+ "param": "--network '<'network'>'",
520
+ "description": "The network to use for the identity operation."
521
+ },
461
522
  "explorer": {
462
523
  "param": "--explorer '<'url'>'",
463
524
  "description": "The url for the explorer endpoint, or an environment variable name containing the url."
@@ -469,6 +530,8 @@
469
530
  "node": "Node",
470
531
  "explorer": "Explorer",
471
532
  "explore": "Explore",
533
+ "connector": "Connector",
534
+ "network": "Network",
472
535
  "did": "DID"
473
536
  }
474
537
  },
@@ -479,13 +542,18 @@
479
542
  "seed": {
480
543
  "param": "--seed '<'seed'>'",
481
544
  "description": "The seed for the controller address in hex or base64 used to create the DID, or start with ! to read environment variable."
545
+ },
546
+ "addressIndex": {
547
+ "param": "--address-index '<'index'>'",
548
+ "description": "The address index to use for the creation."
482
549
  }
483
550
  },
484
551
  "progress": {
485
552
  "creatingIdentity": "Creating identity"
486
553
  },
487
554
  "labels": {
488
- "identity": "Identity"
555
+ "identity": "Identity",
556
+ "addressIndex": "Address Index"
489
557
  }
490
558
  },
491
559
  "identity-resolve": {
@@ -781,11 +849,6 @@
781
849
  "errorMessages": {
782
850
  "fetch": "Fetch"
783
851
  },
784
- "identityRole": {
785
- "organization": "Organization",
786
- "user": "User",
787
- "node": "Node"
788
- },
789
852
  "verifiableCredentialStates": {
790
853
  "pendingVerification": "Pending Verification",
791
854
  "rejected": "Rejected",
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the identity create command for the CLI.
5
6
  * @returns The command.
@@ -9,11 +10,16 @@ export declare function buildCommandIdentityCreate(): Command;
9
10
  * Action the identity create command.
10
11
  * @param opts The options for the command.
11
12
  * @param opts.seed The private key for the controller.
13
+ * @param opts.connector The connector to perform the operations with.
12
14
  * @param opts.node The node URL.
15
+ * @param opts.network The network to use for rebased connector.
13
16
  * @param opts.explorer The explorer URL.
14
17
  */
15
18
  export declare function actionCommandIdentityCreate(opts: {
16
19
  seed: string;
20
+ connector?: IdentityConnectorTypes;
17
21
  node: string;
22
+ network?: string;
18
23
  explorer: string;
24
+ addressIndex?: string;
19
25
  } & CliOutputOptions): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the identity resolve command for the CLI.
5
6
  * @returns The command.
@@ -9,11 +10,15 @@ export declare function buildCommandIdentityResolve(): Command;
9
10
  * Action the identity resolve command.
10
11
  * @param opts The options for the command.
11
12
  * @param opts.did The identity to resolve.
13
+ * @param opts.connector The connector to perform the operations with.
12
14
  * @param opts.node The node URL.
15
+ * @param opts.network The network to use for rebased connector.
13
16
  * @param opts.explorer The explorer URL.
14
17
  */
15
18
  export declare function actionCommandIdentityResolve(opts: {
16
19
  did: string;
20
+ connector?: IdentityConnectorTypes;
17
21
  node: string;
22
+ network?: string;
18
23
  explorer: string;
19
24
  } & CliOutputOptions): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the proof create command for the CLI.
5
6
  * @returns The command.
@@ -11,11 +12,15 @@ export declare function buildCommandProofCreate(): Command;
11
12
  * @param opts.id The id of the verification method to use for the credential.
12
13
  * @param opts.privateKey The private key for the verification method.
13
14
  * @param opts.data The data to create the proof for.
15
+ * @param opts.connector The connector to perform the operations with.
14
16
  * @param opts.node The node URL.
17
+ * @param opts.network The network to use for rebased connector.
15
18
  */
16
19
  export declare function actionCommandProofCreate(opts: {
17
20
  id: string;
18
21
  privateKey: string;
19
22
  data: string;
23
+ connector?: IdentityConnectorTypes;
20
24
  node: string;
25
+ network?: string;
21
26
  } & CliOutputOptions): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the proof verify command for the CLI.
5
6
  * @returns The command.
@@ -12,12 +13,16 @@ export declare function buildCommandProofVerify(): Command;
12
13
  * @param opts.data The data to verify the proof for.
13
14
  * @param opts.cryptosuite The cryptosuite of the proof.
14
15
  * @param opts.value The proof value.
16
+ * @param opts.connector The connector to perform the operations with.
15
17
  * @param opts.node The node URL.
18
+ * @param opts.network The network to use for rebased connector.
16
19
  */
17
20
  export declare function actionCommandProofVerify(opts: {
18
21
  id: string;
19
22
  data: string;
20
23
  cryptosuite: string;
21
24
  value: string;
25
+ connector?: IdentityConnectorTypes;
22
26
  node: string;
27
+ network?: string;
23
28
  } & CliOutputOptions): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the service add command for the CLI.
5
6
  * @returns The command.
@@ -13,6 +14,7 @@ export declare function buildCommandServiceAdd(): Command;
13
14
  * @param opts.id The id of the service to add.
14
15
  * @param opts.type The type of the service to add.
15
16
  * @param opts.endpoint The service endpoint.
17
+ * @param opts.connector The connector to perform the operations with.
16
18
  * @param opts.node The node URL.
17
19
  * @param opts.explorer The explorer URL.
18
20
  */
@@ -22,6 +24,8 @@ export declare function actionCommandServiceAdd(opts: {
22
24
  id: string;
23
25
  type: string;
24
26
  endpoint: string;
27
+ connector?: IdentityConnectorTypes;
25
28
  node: string;
29
+ network?: string;
26
30
  explorer: string;
27
31
  } & CliOutputOptions): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { Command } from "commander";
2
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
2
3
  /**
3
4
  * Build the service remove command for the CLI.
4
5
  * @returns The command.
@@ -9,12 +10,16 @@ export declare function buildCommandServiceRemove(): Command;
9
10
  * @param opts The options for the command.
10
11
  * @param opts.seed The private key for the controller.
11
12
  * @param opts.id The id of the service to remove.
13
+ * @param opts.connector The connector to perform the operations with.
12
14
  * @param opts.node The node URL.
15
+ * @param opts.network The network to use for rebased connector.
13
16
  * @param opts.explorer The explorer URL.
14
17
  */
15
18
  export declare function actionCommandServiceRemove(opts: {
16
19
  seed: string;
17
20
  id: string;
21
+ connector?: IdentityConnectorTypes;
18
22
  node: string;
23
+ network?: string;
19
24
  explorer: string;
20
25
  }): Promise<void>;
@@ -1,4 +1,22 @@
1
+ import type { IIdentityConnector } from "@twin.org/identity-models";
2
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
1
3
  /**
2
4
  * Setup the vault for use in the CLI commands.
3
5
  */
4
6
  export declare function setupVault(): void;
7
+ /**
8
+ * Setup the identity connector for use in the CLI commands.
9
+ * @param options The options for the identity connector.
10
+ * @param options.nodeEndpoint The node endpoint.
11
+ * @param options.network The network.
12
+ * @param options.addressIndex The wallet index.
13
+ * @param options.vaultSeedId The vault seed ID.
14
+ * @param connector The connector to use.
15
+ * @returns The identity connector.
16
+ */
17
+ export declare function setupIdentityConnector(options: {
18
+ nodeEndpoint: string;
19
+ network?: string;
20
+ addressIndex?: number;
21
+ vaultSeedId?: string;
22
+ }, connector?: IdentityConnectorTypes): IIdentityConnector;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the verifiable credential create command for the CLI.
5
6
  * @returns The command.
@@ -13,6 +14,7 @@ export declare function buildCommandVerifiableCredentialCreate(): Command;
13
14
  * @param opts.credentialId The id of the credential.
14
15
  * @param opts.subjectJson The JSON data for the subject.
15
16
  * @param opts.revocationIndex The revocation index for the credential.
17
+ * @param opts.connector The connector to perform the operations with.
16
18
  * @param opts.node The node URL.
17
19
  */
18
20
  export declare function actionCommandVerifiableCredentialCreate(opts: {
@@ -21,5 +23,7 @@ export declare function actionCommandVerifiableCredentialCreate(opts: {
21
23
  credentialId?: string;
22
24
  subjectJson: string;
23
25
  revocationIndex?: string;
26
+ connector?: IdentityConnectorTypes;
24
27
  node: string;
28
+ network?: string;
25
29
  } & CliOutputOptions): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { Command } from "commander";
2
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
2
3
  /**
3
4
  * Build the verifiable credential revoke command for the CLI.
4
5
  * @returns The command.
@@ -10,11 +11,15 @@ export declare function buildCommandVerifiableCredentialRevoke(): Command;
10
11
  * @param opts.seed The seed to generate the private key for the controller.
11
12
  * @param opts.did The id of the document to revoke the index.
12
13
  * @param opts.revocationIndex The revocation index for the credential.
14
+ * @param opts.connector The connector to perform the operations with.
13
15
  * @param opts.node The node URL.
16
+ * @param opts.network The network to use for rebased connector.
14
17
  */
15
18
  export declare function actionCommandVerifiableCredentialRevoke(opts: {
16
19
  seed: string;
17
20
  did: string;
18
21
  revocationIndex: string;
22
+ connector?: IdentityConnectorTypes;
19
23
  node: string;
24
+ network?: string;
20
25
  }): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { Command } from "commander";
2
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
2
3
  /**
3
4
  * Build the verifiable credential unrevoke command for the CLI.
4
5
  * @returns The command.
@@ -10,11 +11,15 @@ export declare function buildCommandVerifiableCredentialUnrevoke(): Command;
10
11
  * @param opts.seed The seed to generate the private key for the controller.
11
12
  * @param opts.did The id of the document to unrevoke the index.
12
13
  * @param opts.revocationIndex The revocation index for the credential.
14
+ * @param opts.connector The connector to perform the operations with.
13
15
  * @param opts.node The node URL.
16
+ * @param opts.network The network to use for rebased connector.
14
17
  */
15
18
  export declare function actionCommandVerifiableCredentialUnrevoke(opts: {
16
19
  seed: string;
17
20
  did: string;
18
21
  revocationIndex: string;
22
+ connector?: IdentityConnectorTypes;
19
23
  node: string;
24
+ network?: string;
20
25
  }): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { Command } from "commander";
3
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
3
4
  /**
4
5
  * Build the verifiable credential verify command for the CLI.
5
6
  * @returns The command.
@@ -9,9 +10,12 @@ export declare function buildCommandVerifiableCredentialVerify(): Command;
9
10
  * Action the verifiable credential verify command.
10
11
  * @param opts The options for the command.
11
12
  * @param opts.jwt The JSON web token for the verifiable credential.
13
+ * @param opts.connector The connector to perform the operations with.
12
14
  * @param opts.node The node URL.
13
15
  */
14
16
  export declare function actionCommandVerifiableCredentialVerify(opts: {
15
17
  jwt: string;
18
+ connector?: IdentityConnectorTypes;
16
19
  node: string;
20
+ network?: string;
17
21
  } & CliOutputOptions): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  import { type CliOutputOptions } from "@twin.org/cli-core";
2
2
  import { DidVerificationMethodType } from "@twin.org/standards-w3c-did";
3
3
  import { Command } from "commander";
4
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
4
5
  /**
5
6
  * Build the verification method add command for the CLI.
6
7
  * @returns The command.
@@ -13,6 +14,7 @@ export declare function buildCommandVerificationMethodAdd(): Command;
13
14
  * @param opts.did The identity of the document to add to.
14
15
  * @param opts.type The type of the verification method to add.
15
16
  * @param opts.id The id of the verification method to add.
17
+ * @param opts.connector The connector to perform the operations with.
16
18
  * @param opts.node The node URL.
17
19
  * @param opts.explorer The explorer URL.
18
20
  */
@@ -21,6 +23,8 @@ export declare function actionCommandVerificationMethodAdd(opts: {
21
23
  did: string;
22
24
  type: DidVerificationMethodType;
23
25
  id?: string;
26
+ connector?: IdentityConnectorTypes;
24
27
  node: string;
28
+ network?: string;
25
29
  explorer: string;
26
30
  } & CliOutputOptions): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { Command } from "commander";
2
+ import { IdentityConnectorTypes } from "../models/identityConnectorTypes";
2
3
  /**
3
4
  * Build the verification method remove command for the CLI.
4
5
  * @returns The command.
@@ -9,12 +10,16 @@ export declare function buildCommandVerificationMethodRemove(): Command;
9
10
  * @param opts The options for the command.
10
11
  * @param opts.seed The private key for the controller.
11
12
  * @param opts.id The id of the verification method to remove.
13
+ * @param opts.connector The connector to perform the operations with.
12
14
  * @param opts.node The node URL.
13
15
  * @param opts.explorer The explorer URL.
16
+ * @param opts.network The network to use for rebased connector.
14
17
  */
15
18
  export declare function actionCommandVerificationMethodRemove(opts: {
16
19
  seed: string;
17
20
  id: string;
21
+ connector?: IdentityConnectorTypes;
18
22
  node: string;
23
+ network?: string;
19
24
  explorer: string;
20
25
  }): Promise<void>;
@@ -5,9 +5,11 @@ export * from "./commands/proofCreate";
5
5
  export * from "./commands/proofVerify";
6
6
  export * from "./commands/serviceAdd";
7
7
  export * from "./commands/serviceRemove";
8
+ export * from "./commands/setupCommands";
8
9
  export * from "./commands/verifiableCredentialCreate";
9
10
  export * from "./commands/verifiableCredentialRevoke";
10
11
  export * from "./commands/verifiableCredentialUnrevoke";
11
12
  export * from "./commands/verifiableCredentialVerify";
12
13
  export * from "./commands/verificationMethodAdd";
13
14
  export * from "./commands/verificationMethodRemove";
15
+ export * from "./models/identityConnectorTypes";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The identity connector types.
3
+ */
4
+ export declare const IdentityConnectorTypes: {
5
+ /**
6
+ * IOTA.
7
+ */
8
+ readonly Iota: "iota";
9
+ /**
10
+ * IOTA Rebased.
11
+ */
12
+ readonly IotaRebased: "iota-rebased";
13
+ };
14
+ /**
15
+ * The identity connector types.
16
+ */
17
+ export type IdentityConnectorTypes = (typeof IdentityConnectorTypes)[keyof typeof IdentityConnectorTypes];
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/identity-cli - Changelog
2
2
 
3
- ## v0.0.1-next.19
3
+ ## v0.0.1-next.22
4
4
 
5
5
  - Initial Release
package/docs/examples.md CHANGED
@@ -64,7 +64,7 @@ Creates a Decentralized Identifier (DID).
64
64
 
65
65
  Options:
66
66
  --seed <seed> The seed for the controller address in hex or base64 used to create the DID, or start with ! to read environment variable.
67
- --controller <controller> The address which controls the identity in bech32 format, or start with ! to read environment variable.
67
+ --address-index <index> The address index to use for the creation. (default: "0")
68
68
  --no-console Hides the output in the console.
69
69
  --json <filename> Creates a JSON file containing the output.
70
70
  --merge-json If the JSON file already exists merge the data instead of overwriting.
@@ -81,7 +81,7 @@ The commands `mnemonic`, `address`, `faucet` and `transfer` are described in mor
81
81
 
82
82
  ### identity-create
83
83
 
84
- Use this command to create a new DID, the controller address must have sufficient funds to store the identity. The seed and the funds can be generated using the `mnemonic` and `faucet` commands.
84
+ Use this command to create a new DID, the wallet address must have sufficient funds to store the identity. The seed and the funds can be generated using the `mnemonic` and `faucet` commands.
85
85
 
86
86
  ```shell
87
87
  # Generate a seed and mnemonic and store it in the env file
@@ -101,10 +101,10 @@ EXPLORER_URL="https://explorer.iota.org/iota-testnet/"
101
101
  To then request some funds and generate the identity you can issue the following commands:
102
102
 
103
103
  ```shell
104
- # Fund the controller address from the faucet loading the config and wallet env files
105
- twin-identity faucet --load-env config.env wallet.env --address !ADDRESS_0_BECH32
104
+ # Fund the wallet address from the faucet loading the config and wallet env files
105
+ twin-identity faucet --load-env config.env wallet.env --address !ADDRESS_0
106
106
  # Create an identity
107
- twin-identity identity-create --load-env config.env wallet.env --seed !SEED --controller !ADDRESS_0_BECH32 --env identity.env
107
+ twin-identity identity-create --load-env config.env wallet.env --seed !SEED --env identity.env
108
108
  ```
109
109
 
110
110
  ### identity-resolve
@@ -30,19 +30,25 @@ Run the app.
30
30
 
31
31
  #### Parameters
32
32
 
33
- **argv**: `string`[]
33
+ ##### argv
34
+
35
+ `string`[]
34
36
 
35
37
  The process arguments.
36
38
 
37
- **localesDirectory?**: `string`
39
+ ##### localesDirectory?
40
+
41
+ `string`
38
42
 
39
43
  The directory for the locales, default to relative to the script.
40
44
 
41
- **options?**
45
+ ##### options?
42
46
 
43
47
  Additional options for the CLI.
44
48
 
45
- **options.overrideOutputWidth?**: `number`
49
+ ###### overrideOutputWidth
50
+
51
+ `number`
46
52
 
47
53
  The override output width.
48
54
 
@@ -6,7 +6,9 @@ Action the identity 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,7 +6,9 @@ Action the identity resolve 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 proof 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,7 +6,9 @@ Action the proof 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 service 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