@twin.org/identity-cli 0.0.1-next.4 → 0.0.1-next.41
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.
- package/bin/index.js +0 -0
- package/dist/cjs/index.cjs +292 -277
- package/dist/esm/index.mjs +292 -280
- package/dist/locales/en.json +904 -789
- package/dist/types/commands/identityCreate.d.ts +6 -0
- package/dist/types/commands/identityResolve.d.ts +5 -0
- package/dist/types/commands/proofCreate.d.ts +6 -1
- package/dist/types/commands/proofVerify.d.ts +9 -7
- package/dist/types/commands/serviceAdd.d.ts +4 -0
- package/dist/types/commands/serviceRemove.d.ts +5 -0
- package/dist/types/commands/setupCommands.d.ts +18 -0
- package/dist/types/commands/verifiableCredentialCreate.d.ts +4 -4
- package/dist/types/commands/verifiableCredentialRevoke.d.ts +5 -0
- package/dist/types/commands/verifiableCredentialUnrevoke.d.ts +5 -0
- package/dist/types/commands/verifiableCredentialVerify.d.ts +4 -0
- package/dist/types/commands/verificationMethodAdd.d.ts +4 -0
- package/dist/types/commands/verificationMethodRemove.d.ts +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/identityConnectorTypes.d.ts +17 -0
- package/docs/changelog.md +34 -1
- package/docs/examples.md +9 -9
- package/docs/reference/classes/CLI.md +10 -4
- package/docs/reference/functions/actionCommandIdentityCreate.md +3 -1
- package/docs/reference/functions/actionCommandIdentityResolve.md +3 -1
- package/docs/reference/functions/actionCommandProofCreate.md +3 -1
- package/docs/reference/functions/actionCommandProofVerify.md +3 -1
- package/docs/reference/functions/actionCommandServiceAdd.md +3 -1
- package/docs/reference/functions/actionCommandServiceRemove.md +25 -5
- package/docs/reference/functions/actionCommandVerifiableCredentialCreate.md +3 -1
- package/docs/reference/functions/actionCommandVerifiableCredentialRevoke.md +25 -5
- package/docs/reference/functions/actionCommandVerifiableCredentialUnrevoke.md +25 -5
- package/docs/reference/functions/actionCommandVerifiableCredentialVerify.md +3 -1
- package/docs/reference/functions/actionCommandVerificationMethodAdd.md +3 -1
- package/docs/reference/functions/actionCommandVerificationMethodRemove.md +25 -5
- package/docs/reference/functions/setupIdentityConnector.md +47 -0
- package/docs/reference/functions/setupVault.md +9 -0
- package/docs/reference/index.md +10 -0
- package/docs/reference/type-aliases/IdentityConnectorTypes.md +5 -0
- package/docs/reference/variables/IdentityConnectorTypes.md +19 -0
- package/locales/en.json +35 -36
- package/package.json +9 -6
|
@@ -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 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 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 connector.
|
|
15
18
|
*/
|
|
16
19
|
export declare function actionCommandProofCreate(opts: {
|
|
17
20
|
id: string;
|
|
18
21
|
privateKey: string;
|
|
19
|
-
|
|
22
|
+
documentFilename: 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.
|
|
@@ -9,15 +10,16 @@ export declare function buildCommandProofVerify(): Command;
|
|
|
9
10
|
* Action the proof verify command.
|
|
10
11
|
* @param opts The options for the command.
|
|
11
12
|
* @param opts.id The id of the verification method to use for the credential.
|
|
12
|
-
* @param opts.
|
|
13
|
-
* @param opts.
|
|
14
|
-
* @param opts.
|
|
13
|
+
* @param opts.documentFilename The data to verify the proof for.
|
|
14
|
+
* @param opts.proofFilename The proof value.
|
|
15
|
+
* @param opts.connector The connector to perform the operations with.
|
|
15
16
|
* @param opts.node The node URL.
|
|
17
|
+
* @param opts.network The network to use for connector.
|
|
16
18
|
*/
|
|
17
19
|
export declare function actionCommandProofVerify(opts: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
value: string;
|
|
20
|
+
documentFilename: string;
|
|
21
|
+
proofFilename: string;
|
|
22
|
+
connector?: IdentityConnectorTypes;
|
|
22
23
|
node: string;
|
|
24
|
+
network?: string;
|
|
23
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 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 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.
|
|
@@ -11,19 +12,18 @@ export declare function buildCommandVerifiableCredentialCreate(): 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.credentialId The id of the credential.
|
|
14
|
-
* @param opts.types The types for the credential.
|
|
15
15
|
* @param opts.subjectJson The JSON data for the subject.
|
|
16
|
-
* @param opts.contexts The contexts for the credential.
|
|
17
16
|
* @param opts.revocationIndex The revocation index for the credential.
|
|
17
|
+
* @param opts.connector The connector to perform the operations with.
|
|
18
18
|
* @param opts.node The node URL.
|
|
19
19
|
*/
|
|
20
20
|
export declare function actionCommandVerifiableCredentialCreate(opts: {
|
|
21
21
|
id: string;
|
|
22
22
|
privateKey: string;
|
|
23
23
|
credentialId?: string;
|
|
24
|
-
types?: string[];
|
|
25
24
|
subjectJson: string;
|
|
26
|
-
contexts?: string[];
|
|
27
25
|
revocationIndex?: string;
|
|
26
|
+
connector?: IdentityConnectorTypes;
|
|
28
27
|
node: string;
|
|
28
|
+
network?: string;
|
|
29
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 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 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 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>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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 Stardust.
|
|
11
|
+
*/
|
|
12
|
+
readonly IotaStardust: "iota-stardust";
|
|
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,38 @@
|
|
|
1
1
|
# @twin.org/identity-cli - Changelog
|
|
2
2
|
|
|
3
|
-
## v0.0.1-next.
|
|
3
|
+
## [0.0.1-next.41](https://github.com/twinfoundation/identity/compare/identity-cli-v0.0.1-next.40...identity-cli-v0.0.1-next.41) (2025-04-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **identity-cli:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/identity-models bumped from 0.0.1-next.40 to 0.0.1-next.41
|
|
16
|
+
* @twin.org/identity-connector-iota bumped from 0.0.1-next.40 to 0.0.1-next.41
|
|
17
|
+
* @twin.org/identity-connector-iota-stardust bumped from 0.0.1-next.40 to 0.0.1-next.41
|
|
18
|
+
|
|
19
|
+
## [0.0.1-next.40](https://github.com/twinfoundation/identity/compare/identity-cli-v0.0.1-next.39...identity-cli-v0.0.1-next.40) (2025-03-28)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* Import path and bump version ([#21](https://github.com/twinfoundation/identity/issues/21)) ([ccea845](https://github.com/twinfoundation/identity/commit/ccea845bf32562267280bc1b3dde1c9af1a00360))
|
|
25
|
+
* Install sdk-wasm ([#20](https://github.com/twinfoundation/identity/issues/20)) ([75ec14e](https://github.com/twinfoundation/identity/commit/75ec14e072f8c219863a1c028a3b0783802086e9))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @twin.org/identity-models bumped from 0.0.1-next.39 to 0.0.1-next.40
|
|
33
|
+
* @twin.org/identity-connector-iota bumped from 0.0.1-next.39 to 0.0.1-next.40
|
|
34
|
+
* @twin.org/identity-connector-iota-stardust bumped from 0.0.1-next.39 to 0.0.1-next.40
|
|
35
|
+
|
|
36
|
+
## v0.0.1-next.39
|
|
4
37
|
|
|
5
38
|
- 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
|
-
--
|
|
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
|
|
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
|
|
105
|
-
twin-identity faucet --load-env config.env wallet.env --address !
|
|
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 --
|
|
107
|
+
twin-identity identity-create --load-env config.env wallet.env --seed !SEED --env identity.env
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### identity-resolve
|
|
@@ -197,15 +197,15 @@ twin-identity verifiable-credential-unrevoke --load-env config.env wallet.env id
|
|
|
197
197
|
This command will generate a proof using the specified verification method.
|
|
198
198
|
|
|
199
199
|
```shell
|
|
200
|
-
twin-identity proof-create --load-env config.env verification-method.env --id !DID_VERIFICATION_METHOD_ID --private-key !DID_VERIFICATION_METHOD_PRIVATE_KEY --data
|
|
200
|
+
twin-identity proof-create --load-env config.env verification-method.env --id !DID_VERIFICATION_METHOD_ID --private-key !DID_VERIFICATION_METHOD_PRIVATE_KEY --document-filename unsecured.json --json data-proof.json
|
|
201
201
|
```
|
|
202
202
|
|
|
203
|
-
This will output the proof
|
|
203
|
+
This will output the proof.
|
|
204
204
|
|
|
205
205
|
## proof-verify
|
|
206
206
|
|
|
207
|
-
This command will verify a proof
|
|
207
|
+
This command will verify a proof for a document.
|
|
208
208
|
|
|
209
209
|
```shell
|
|
210
|
-
twin-identity proof-verify --load-env config.env verification-method.env --id !DID_VERIFICATION_METHOD_ID --
|
|
210
|
+
twin-identity proof-verify --load-env config.env verification-method.env --id !DID_VERIFICATION_METHOD_ID --document-filename unsecured.json --proof-filename data-proof.json
|
|
211
211
|
```
|
|
@@ -30,19 +30,25 @@ Run the app.
|
|
|
30
30
|
|
|
31
31
|
#### Parameters
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
##### argv
|
|
34
|
+
|
|
35
|
+
`string`[]
|
|
34
36
|
|
|
35
37
|
The process arguments.
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
##### localesDirectory?
|
|
40
|
+
|
|
41
|
+
`string`
|
|
38
42
|
|
|
39
43
|
The directory for the locales, default to relative to the script.
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
##### options?
|
|
42
46
|
|
|
43
47
|
Additional options for the CLI.
|
|
44
48
|
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 service remove command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### opts
|
|
10
10
|
|
|
11
11
|
The options for the command.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
#### seed
|
|
14
|
+
|
|
15
|
+
`string`
|
|
14
16
|
|
|
15
17
|
The private key for the controller.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
#### id
|
|
20
|
+
|
|
21
|
+
`string`
|
|
18
22
|
|
|
19
23
|
The id of the service to remove.
|
|
20
24
|
|
|
21
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -6,7 +6,9 @@ Action the verifiable credential create command.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
|
|
9
|
+
### opts
|
|
10
10
|
|
|
11
11
|
The options for the command.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
#### seed
|
|
14
|
+
|
|
15
|
+
`string`
|
|
14
16
|
|
|
15
17
|
The seed to generate the private key for the controller.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
#### did
|
|
20
|
+
|
|
21
|
+
`string`
|
|
18
22
|
|
|
19
23
|
The id of the document to revoke the index.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
#### revocationIndex
|
|
26
|
+
|
|
27
|
+
`string`
|
|
22
28
|
|
|
23
29
|
The revocation index for the credential.
|
|
24
30
|
|
|
25
|
-
|
|
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`\>
|