@twin.org/identity-cli 0.0.1-next.20 → 0.0.1-next.23

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 (31) hide show
  1. package/dist/cjs/index.cjs +249 -226
  2. package/dist/esm/index.mjs +250 -230
  3. package/dist/locales/en.json +75 -9
  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/functions/actionCommandServiceRemove.md +12 -0
  22. package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +12 -0
  23. package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +12 -0
  24. package/docs/reference/functions/actionCommandVerificationMethodRemove.md +12 -0
  25. package/docs/reference/functions/setupIdentityConnector.md +47 -0
  26. package/docs/reference/functions/setupVault.md +9 -0
  27. package/docs/reference/index.md +10 -0
  28. package/docs/reference/type-aliases/IdentityConnectorTypes.md +5 -0
  29. package/docs/reference/variables/IdentityConnectorTypes.md +19 -0
  30. package/locales/en.json +17 -2
  31. package/package.json +7 -5
@@ -199,9 +199,12 @@
199
199
  "jwtDecodeFailed": "Decoding the JWT failed",
200
200
  "jwtPayloadMissingParam": "The JWT is missing the required parameter \"{param}\""
201
201
  },
202
+ "iotaIdentityResolverConnector": {
203
+ "documentNotFound": "The document could not be found",
204
+ "resolveDocumentFailed": "Resolving the document failed"
205
+ },
202
206
  "iotaIdentityConnector": {
203
207
  "createDocumentFailed": "Creating the document failed",
204
- "resolveDocumentFailed": "Resolving the document failed",
205
208
  "missingDid": "The full id including DID is required",
206
209
  "addVerificationMethodFailed": "Adding the verification method failed",
207
210
  "removeVerificationMethodFailed": "Removing the verification method failed",
@@ -234,6 +237,47 @@
234
237
  "inclusionFailed": "The transaction generated was not included in a reasonable amount of time",
235
238
  "insufficientFunds": "There were insufficient funds to complete the operation"
236
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
+ "nftTransactionFailed": "The NFT transaction failed",
279
+ "addressNotFound": "The address is missing could not be found from the seed \"{address}\""
280
+ },
237
281
  "entityStorageVaultConnector": {
238
282
  "keyAlreadyExists": "The key \"{existingId}\" already exists in the vault",
239
283
  "keyNotFound": "The key \"{notFoundId}\" was not found in the vault",
@@ -249,6 +293,12 @@
249
293
  "iotaFaucetConnector": {
250
294
  "fundingFailed": "Fund the address from faucet failed",
251
295
  "insufficientFunds": "There were insufficient funds to complete the operation"
296
+ },
297
+ "iotaRebasedWalletConnector": {
298
+ "transferFailed": "The wallet transfer failed."
299
+ },
300
+ "iotaRebasedFaucetConnector": {
301
+ "fundingFailed": "Fund the address from faucet failed"
252
302
  }
253
303
  },
254
304
  "errorNames": {
@@ -349,8 +399,8 @@
349
399
  }
350
400
  },
351
401
  "address": {
352
- "summary": "Create bech32 addresses and keys from the seed.",
353
- "description": "Create a number of bech32 addresses and their associated key pairs from the seed.",
402
+ "summary": "Create addresses and keys from the seed.",
403
+ "description": "Create a number of addresses and their associated key pairs from the seed.",
354
404
  "options": {
355
405
  "seed": {
356
406
  "param": "--seed '<'seed'>'",
@@ -366,15 +416,15 @@
366
416
  },
367
417
  "account": {
368
418
  "param": "--account '<'number'>'",
369
- "description": "The account used to generate the bech32 addresses."
419
+ "description": "The account used to generate the addresses."
370
420
  },
371
421
  "hrp": {
372
422
  "param": "--hrp '<'hrp'>'",
373
- "description": "The human readable part of the bech32 addresses."
423
+ "description": "The human readable part for the addresses if generating bech32 format."
374
424
  },
375
425
  "coin": {
376
426
  "param": "--coin '<'coin'>'",
377
- "description": "The coin type used to generate the bech32 addresses."
427
+ "description": "The coin type used to generate the addresses."
378
428
  },
379
429
  "key-type": {
380
430
  "param": "--key-type '<'type'>'",
@@ -409,7 +459,7 @@
409
459
  "options": {
410
460
  "address": {
411
461
  "param": "--address '<'address'>'",
412
- "description": "The address to fill from the faucet either in bech32 format, or start with ! to read environment variable."
462
+ "description": "The address to fill from the faucet either bech32 or hex format, or start with ! to read environment variable."
413
463
  },
414
464
  "faucet": {
415
465
  "param": "--faucet '<'url'>'",
@@ -453,15 +503,24 @@
453
503
  "transferringFunds": "Transferring"
454
504
  },
455
505
  "labels": {
456
- "destAddress": "Destination Address"
506
+ "destAddress": "Destination Address",
507
+ "amount": "Amount"
457
508
  }
458
509
  },
459
510
  "common": {
460
511
  "options": {
512
+ "connector": {
513
+ "param": "--connector '<'connector'>'",
514
+ "description": "The connector to use for the identity operation."
515
+ },
461
516
  "node": {
462
517
  "param": "--node '<'url'>'",
463
518
  "description": "The url for the node endpoint, or an environment variable name containing the url."
464
519
  },
520
+ "network": {
521
+ "param": "--network '<'network'>'",
522
+ "description": "The network to use for the identity operation."
523
+ },
465
524
  "explorer": {
466
525
  "param": "--explorer '<'url'>'",
467
526
  "description": "The url for the explorer endpoint, or an environment variable name containing the url."
@@ -473,6 +532,8 @@
473
532
  "node": "Node",
474
533
  "explorer": "Explorer",
475
534
  "explore": "Explore",
535
+ "connector": "Connector",
536
+ "network": "Network",
476
537
  "did": "DID"
477
538
  }
478
539
  },
@@ -483,13 +544,18 @@
483
544
  "seed": {
484
545
  "param": "--seed '<'seed'>'",
485
546
  "description": "The seed for the controller address in hex or base64 used to create the DID, or start with ! to read environment variable."
547
+ },
548
+ "addressIndex": {
549
+ "param": "--address-index '<'index'>'",
550
+ "description": "The address index to use for the creation."
486
551
  }
487
552
  },
488
553
  "progress": {
489
554
  "creatingIdentity": "Creating identity"
490
555
  },
491
556
  "labels": {
492
- "identity": "Identity"
557
+ "identity": "Identity",
558
+ "addressIndex": "Address Index"
493
559
  }
494
560
  },
495
561
  "identity-resolve": {
@@ -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.20
3
+ ## v0.0.1-next.23
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
@@ -22,12 +22,24 @@ The private key for the controller.
22
22
 
23
23
  The id of the service to remove.
24
24
 
25
+ #### connector
26
+
27
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
28
+
29
+ The connector to perform the operations with.
30
+
25
31
  #### node
26
32
 
27
33
  `string`
28
34
 
29
35
  The node URL.
30
36
 
37
+ #### network
38
+
39
+ `string`
40
+
41
+ The network to use for rebased connector.
42
+
31
43
  #### explorer
32
44
 
33
45
  `string`
@@ -28,12 +28,24 @@ The id of the document to revoke the index.
28
28
 
29
29
  The revocation index for the credential.
30
30
 
31
+ #### connector
32
+
33
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
34
+
35
+ The connector to perform the operations with.
36
+
31
37
  #### node
32
38
 
33
39
  `string`
34
40
 
35
41
  The node URL.
36
42
 
43
+ #### network
44
+
45
+ `string`
46
+
47
+ The network to use for rebased connector.
48
+
37
49
  ## Returns
38
50
 
39
51
  `Promise`\<`void`\>
@@ -28,12 +28,24 @@ The id of the document to unrevoke the index.
28
28
 
29
29
  The revocation index for the credential.
30
30
 
31
+ #### connector
32
+
33
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
34
+
35
+ The connector to perform the operations with.
36
+
31
37
  #### node
32
38
 
33
39
  `string`
34
40
 
35
41
  The node URL.
36
42
 
43
+ #### network
44
+
45
+ `string`
46
+
47
+ The network to use for rebased connector.
48
+
37
49
  ## Returns
38
50
 
39
51
  `Promise`\<`void`\>
@@ -22,12 +22,24 @@ The private key for the controller.
22
22
 
23
23
  The id of the verification method to remove.
24
24
 
25
+ #### connector
26
+
27
+ [`IdentityConnectorTypes`](../type-aliases/IdentityConnectorTypes.md)
28
+
29
+ The connector to perform the operations with.
30
+
25
31
  #### node
26
32
 
27
33
  `string`
28
34
 
29
35
  The node URL.
30
36
 
37
+ #### network
38
+
39
+ `string`
40
+
41
+ The network to use for rebased connector.
42
+
31
43
  #### explorer
32
44
 
33
45
  `string`