@twin.org/standards-w3c-did 0.0.3-next.9 → 0.9.0
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/README.md +1 -1
- package/dist/es/dataTypes/didDataTypes.js +40 -0
- package/dist/es/dataTypes/didDataTypes.js.map +1 -0
- package/dist/es/index.js +5 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IDataIntegrityProof.js.map +1 -1
- package/dist/es/models/IDidDocument.js.map +1 -1
- package/dist/es/models/IDidDocumentVerificationMethod.js.map +1 -1
- package/dist/es/models/IDidService.js +0 -2
- package/dist/es/models/IDidService.js.map +1 -1
- package/dist/es/models/IDidVerifiableCredentialCommon.js.map +1 -1
- package/dist/es/models/IDidVerifiableCredentialV1.js.map +1 -1
- package/dist/es/models/IDidVerifiableCredentialV2.js.map +1 -1
- package/dist/es/models/IDidVerifiablePresentationCommon.js.map +1 -1
- package/dist/es/models/IDidVerifiablePresentationV1.js.map +1 -1
- package/dist/es/models/IDidVerifiablePresentationV2.js.map +1 -1
- package/dist/es/models/IJsonWebSignature2020Proof.js.map +1 -1
- package/dist/es/models/IMultikey.js.map +1 -1
- package/dist/es/models/IProofSignerVerifierAsync.js +2 -0
- package/dist/es/models/IProofSignerVerifierAsync.js.map +1 -0
- package/dist/es/models/didContexts.js +45 -9
- package/dist/es/models/didContexts.js.map +1 -1
- package/dist/es/models/didTypes.js +4 -0
- package/dist/es/models/didTypes.js.map +1 -1
- package/dist/es/models/jwsAlgorithms.js +17 -0
- package/dist/es/models/jwsAlgorithms.js.map +1 -0
- package/dist/es/schemas/DidDocument.json +163 -0
- package/dist/es/schemas/DidVerifiableCredential.json +14 -0
- package/dist/es/schemas/DidVerifiablePresentation.json +14 -0
- package/dist/es/signerVerifiers/dataIntegrityProofAsyncSignerVerifier.js +73 -0
- package/dist/es/signerVerifiers/dataIntegrityProofAsyncSignerVerifier.js.map +1 -0
- package/dist/es/signerVerifiers/dataIntegrityProofSignerVerifier.js +3 -3
- package/dist/es/signerVerifiers/dataIntegrityProofSignerVerifier.js.map +1 -1
- package/dist/es/signerVerifiers/jsonWebSignature2020AsyncSignerVerifier.js +91 -0
- package/dist/es/signerVerifiers/jsonWebSignature2020AsyncSignerVerifier.js.map +1 -0
- package/dist/es/signerVerifiers/jsonWebSignature2020SignerVerifier.js +3 -2
- package/dist/es/signerVerifiers/jsonWebSignature2020SignerVerifier.js.map +1 -1
- package/dist/es/utils/proofHelper.js +39 -0
- package/dist/es/utils/proofHelper.js.map +1 -1
- package/dist/es/utils/verifiableCredentialHelper.js +64 -7
- package/dist/es/utils/verifiableCredentialHelper.js.map +1 -1
- package/dist/types/dataTypes/didDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/IDataIntegrityProof.d.ts +4 -3
- package/dist/types/models/IDidDocument.d.ts +4 -3
- package/dist/types/models/IDidDocumentVerificationMethod.d.ts +1 -1
- package/dist/types/models/IDidService.d.ts +3 -2
- package/dist/types/models/IDidVerifiableCredentialCommon.d.ts +9 -8
- package/dist/types/models/IDidVerifiableCredentialV1.d.ts +2 -1
- package/dist/types/models/IDidVerifiableCredentialV2.d.ts +2 -1
- package/dist/types/models/IDidVerifiablePresentationCommon.d.ts +3 -2
- package/dist/types/models/IDidVerifiablePresentationV1.d.ts +2 -1
- package/dist/types/models/IDidVerifiablePresentationV2.d.ts +2 -1
- package/dist/types/models/IJsonWebSignature2020Proof.d.ts +2 -1
- package/dist/types/models/IMultikey.d.ts +2 -1
- package/dist/types/models/IProofSignerVerifierAsync.d.ts +34 -0
- package/dist/types/models/didContexts.d.ts +45 -9
- package/dist/types/models/didTypes.d.ts +4 -0
- package/dist/types/models/jwsAlgorithms.d.ts +17 -0
- package/dist/types/signerVerifiers/dataIntegrityProofAsyncSignerVerifier.d.ts +42 -0
- package/dist/types/signerVerifiers/dataIntegrityProofSignerVerifier.d.ts +3 -3
- package/dist/types/signerVerifiers/jsonWebSignature2020AsyncSignerVerifier.d.ts +41 -0
- package/dist/types/signerVerifiers/jsonWebSignature2020SignerVerifier.d.ts +3 -2
- package/dist/types/utils/proofHelper.d.ts +19 -0
- package/dist/types/utils/verifiableCredentialHelper.d.ts +31 -6
- package/docs/changelog.md +679 -77
- package/docs/examples.md +84 -1
- package/docs/reference/classes/DataIntegrityProofAsyncSignerVerifier.md +139 -0
- package/docs/reference/classes/DataIntegrityProofSignerVerifier.md +9 -6
- package/docs/reference/classes/DidDataTypes.md +25 -0
- package/docs/reference/classes/JsonWebSignature2020AsyncSignerVerifier.md +136 -0
- package/docs/reference/classes/JsonWebSignature2020SignerVerifier.md +10 -6
- package/docs/reference/classes/MultikeyHelper.md +4 -4
- package/docs/reference/classes/ProofHelper.md +73 -5
- package/docs/reference/classes/VerifiableCredentialHelper.md +105 -9
- package/docs/reference/index.md +6 -0
- package/docs/reference/interfaces/IDataIntegrityProof.md +23 -23
- package/docs/reference/interfaces/IDidCredentialSchema.md +2 -2
- package/docs/reference/interfaces/IDidCredentialStatus.md +3 -3
- package/docs/reference/interfaces/IDidDocument.md +21 -21
- package/docs/reference/interfaces/IDidDocumentVerificationMethod.md +9 -17
- package/docs/reference/interfaces/IDidLabel.md +4 -4
- package/docs/reference/interfaces/IDidPresentationVerification.md +4 -4
- package/docs/reference/interfaces/IDidService.md +5 -5
- package/docs/reference/interfaces/IDidVerifiableCredentialCommon.md +24 -21
- package/docs/reference/interfaces/IDidVerifiableCredentialV1.md +26 -26
- package/docs/reference/interfaces/IDidVerifiableCredentialV2.md +26 -26
- package/docs/reference/interfaces/IDidVerifiablePresentationCommon.md +8 -8
- package/docs/reference/interfaces/IDidVerifiablePresentationV1.md +12 -12
- package/docs/reference/interfaces/IDidVerifiablePresentationV2.md +12 -12
- package/docs/reference/interfaces/IJsonWebSignature2020Proof.md +10 -10
- package/docs/reference/interfaces/IMultikey.md +14 -14
- package/docs/reference/interfaces/IProofSignerVerifier.md +3 -3
- package/docs/reference/interfaces/IProofSignerVerifierAsync.md +102 -0
- package/docs/reference/type-aliases/JwsAlgorithms.md +5 -0
- package/docs/reference/variables/DidContexts.md +71 -17
- package/docs/reference/variables/DidCryptoSuites.md +2 -2
- package/docs/reference/variables/DidTypes.md +12 -6
- package/docs/reference/variables/JwsAlgorithms.md +23 -0
- package/docs/reference/variables/ProofTypes.md +2 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Standards W3C DID
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides data models for the [W3C DID Core specification](https://www.w3.org/TR/did-core/), helping teams represent decentralised identifiers with consistent, interoperable structures.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHelper } from "@twin.org/data-core";
|
|
4
|
+
import { DidContexts } from "../models/didContexts.js";
|
|
5
|
+
import { DidTypes } from "../models/didTypes.js";
|
|
6
|
+
import DidDocumentSchema from "../schemas/DidDocument.json" with { type: "json" };
|
|
7
|
+
import DidVerifiableCredentialSchema from "../schemas/DidVerifiableCredential.json" with { type: "json" };
|
|
8
|
+
import DidVerifiablePresentationSchema from "../schemas/DidVerifiablePresentation.json" with { type: "json" };
|
|
9
|
+
/**
|
|
10
|
+
* Handles data type registration for DID.
|
|
11
|
+
*/
|
|
12
|
+
export class DidDataTypes {
|
|
13
|
+
/**
|
|
14
|
+
* Register all the data types.
|
|
15
|
+
*/
|
|
16
|
+
static registerTypes() {
|
|
17
|
+
const types = [
|
|
18
|
+
{
|
|
19
|
+
type: DidTypes.Document,
|
|
20
|
+
schema: DidDocumentSchema
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
DataTypeHelper.registerTypes(DidContexts.Namespace, undefined, types);
|
|
24
|
+
DataTypeHelper.registerTypes(DidContexts.JsonSchemaNamespace, undefined, types.map(t => ({ type: `Did${t.type}`, schema: t.schema })));
|
|
25
|
+
const typesCredentials = [
|
|
26
|
+
{
|
|
27
|
+
type: DidTypes.VerifiableCredential,
|
|
28
|
+
schema: DidVerifiableCredentialSchema
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: DidTypes.VerifiablePresentation,
|
|
32
|
+
schema: DidVerifiablePresentationSchema
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
DataTypeHelper.registerTypes(DidContexts.NamespaceVCv1, undefined, typesCredentials);
|
|
36
|
+
DataTypeHelper.registerTypes(DidContexts.NamespaceVCv2, undefined, typesCredentials);
|
|
37
|
+
DataTypeHelper.registerTypes(DidContexts.JsonSchemaNamespace, undefined, typesCredentials.map(t => ({ type: `Did${t.type}`, schema: t.schema })));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=didDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"didDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/didDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,iBAAiB,MAAM,6BAA6B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClF,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,+BAA+B,MAAM,2CAA2C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE9G;;GAEG;AACH,MAAM,OAAgB,YAAY;IACjC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,QAAQ,CAAC,QAAQ;gBACvB,MAAM,EAAE,iBAAiB;aACzB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACtE,cAAc,CAAC,aAAa,CAC3B,WAAW,CAAC,mBAAmB,EAC/B,SAAS,EACT,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC5D,CAAC;QAEF,MAAM,gBAAgB,GAAG;YACxB;gBACC,IAAI,EAAE,QAAQ,CAAC,oBAAoB;gBACnC,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,QAAQ,CAAC,sBAAsB;gBACrC,MAAM,EAAE,+BAA+B;aACvC;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;QACrF,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;QACrF,cAAc,CAAC,aAAa,CAC3B,WAAW,CAAC,mBAAmB,EAC/B,SAAS,EACT,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACvE,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { DidContexts } from \"../models/didContexts.js\";\nimport { DidTypes } from \"../models/didTypes.js\";\nimport DidDocumentSchema from \"../schemas/DidDocument.json\" with { type: \"json\" };\nimport DidVerifiableCredentialSchema from \"../schemas/DidVerifiableCredential.json\" with { type: \"json\" };\nimport DidVerifiablePresentationSchema from \"../schemas/DidVerifiablePresentation.json\" with { type: \"json\" };\n\n/**\n * Handles data type registration for DID.\n */\nexport abstract class DidDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: DidTypes.Document,\n\t\t\t\tschema: DidDocumentSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(DidContexts.Namespace, undefined, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDidContexts.JsonSchemaNamespace,\n\t\t\tundefined,\n\t\t\ttypes.map(t => ({ type: `Did${t.type}`, schema: t.schema }))\n\t\t);\n\n\t\tconst typesCredentials = [\n\t\t\t{\n\t\t\t\ttype: DidTypes.VerifiableCredential,\n\t\t\t\tschema: DidVerifiableCredentialSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: DidTypes.VerifiablePresentation,\n\t\t\t\tschema: DidVerifiablePresentationSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(DidContexts.NamespaceVCv1, undefined, typesCredentials);\n\t\tDataTypeHelper.registerTypes(DidContexts.NamespaceVCv2, undefined, typesCredentials);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDidContexts.JsonSchemaNamespace,\n\t\t\tundefined,\n\t\t\ttypesCredentials.map(t => ({ type: `Did${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./dataTypes/didDataTypes.js";
|
|
3
4
|
export * from "./models/didContexts.js";
|
|
4
5
|
export * from "./models/didCryptoSuites.js";
|
|
5
6
|
export * from "./models/didTypes.js";
|
|
@@ -21,12 +22,16 @@ export * from "./models/IDidVerifiablePresentationCommon.js";
|
|
|
21
22
|
export * from "./models/IDidVerifiablePresentationV1.js";
|
|
22
23
|
export * from "./models/IDidVerifiablePresentationV2.js";
|
|
23
24
|
export * from "./models/IJsonWebSignature2020Proof.js";
|
|
25
|
+
export * from "./models/jwsAlgorithms.js";
|
|
24
26
|
export * from "./models/IMultikey.js";
|
|
25
27
|
export * from "./models/IProof.js";
|
|
26
28
|
export * from "./models/IProofSignerVerifier.js";
|
|
29
|
+
export * from "./models/IProofSignerVerifierAsync.js";
|
|
27
30
|
export * from "./models/proofTypes.js";
|
|
28
31
|
export * from "./signerVerifiers/dataIntegrityProofSignerVerifier.js";
|
|
32
|
+
export * from "./signerVerifiers/dataIntegrityProofAsyncSignerVerifier.js";
|
|
29
33
|
export * from "./signerVerifiers/jsonWebSignature2020SignerVerifier.js";
|
|
34
|
+
export * from "./signerVerifiers/jsonWebSignature2020AsyncSignerVerifier.js";
|
|
30
35
|
export * from "./utils/multikeyHelper.js";
|
|
31
36
|
export * from "./utils/proofHelper.js";
|
|
32
37
|
export * from "./utils/verifiableCredentialHelper.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uBAAuB,CAAC;AACtC,cAAc,0CAA0C,CAAC;AACzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uDAAuD,CAAC;AACtE,cAAc,yDAAyD,CAAC;AACxE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/didContexts.js\";\nexport * from \"./models/didCryptoSuites.js\";\nexport * from \"./models/didTypes.js\";\nexport * from \"./models/didVerificationMethodType.js\";\nexport * from \"./models/IDataIntegrityProof.js\";\nexport * from \"./models/IDidCredentialSchema.js\";\nexport * from \"./models/IDidCredentialStatus.js\";\nexport * from \"./models/IDidDocument.js\";\nexport * from \"./models/IDidDocumentVerificationMethod.js\";\nexport * from \"./models/IDidLabel.js\";\nexport * from \"./models/IDidPresentationVerification.js\";\nexport * from \"./models/IDidService.js\";\nexport * from \"./models/IDidVerifiableCredential.js\";\nexport * from \"./models/IDidVerifiableCredentialCommon.js\";\nexport * from \"./models/IDidVerifiableCredentialV1.js\";\nexport * from \"./models/IDidVerifiableCredentialV2.js\";\nexport * from \"./models/IDidVerifiablePresentation.js\";\nexport * from \"./models/IDidVerifiablePresentationCommon.js\";\nexport * from \"./models/IDidVerifiablePresentationV1.js\";\nexport * from \"./models/IDidVerifiablePresentationV2.js\";\nexport * from \"./models/IJsonWebSignature2020Proof.js\";\nexport * from \"./models/IMultikey.js\";\nexport * from \"./models/IProof.js\";\nexport * from \"./models/IProofSignerVerifier.js\";\nexport * from \"./models/proofTypes.js\";\nexport * from \"./signerVerifiers/dataIntegrityProofSignerVerifier.js\";\nexport * from \"./signerVerifiers/jsonWebSignature2020SignerVerifier.js\";\nexport * from \"./utils/multikeyHelper.js\";\nexport * from \"./utils/proofHelper.js\";\nexport * from \"./utils/verifiableCredentialHelper.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uBAAuB,CAAC;AACtC,cAAc,0CAA0C,CAAC;AACzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uDAAuD,CAAC;AACtE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,yDAAyD,CAAC;AACxE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/didDataTypes.js\";\nexport * from \"./models/didContexts.js\";\nexport * from \"./models/didCryptoSuites.js\";\nexport * from \"./models/didTypes.js\";\nexport * from \"./models/didVerificationMethodType.js\";\nexport * from \"./models/IDataIntegrityProof.js\";\nexport * from \"./models/IDidCredentialSchema.js\";\nexport * from \"./models/IDidCredentialStatus.js\";\nexport * from \"./models/IDidDocument.js\";\nexport * from \"./models/IDidDocumentVerificationMethod.js\";\nexport * from \"./models/IDidLabel.js\";\nexport * from \"./models/IDidPresentationVerification.js\";\nexport * from \"./models/IDidService.js\";\nexport * from \"./models/IDidVerifiableCredential.js\";\nexport * from \"./models/IDidVerifiableCredentialCommon.js\";\nexport * from \"./models/IDidVerifiableCredentialV1.js\";\nexport * from \"./models/IDidVerifiableCredentialV2.js\";\nexport * from \"./models/IDidVerifiablePresentation.js\";\nexport * from \"./models/IDidVerifiablePresentationCommon.js\";\nexport * from \"./models/IDidVerifiablePresentationV1.js\";\nexport * from \"./models/IDidVerifiablePresentationV2.js\";\nexport * from \"./models/IJsonWebSignature2020Proof.js\";\nexport * from \"./models/jwsAlgorithms.js\";\nexport * from \"./models/IMultikey.js\";\nexport * from \"./models/IProof.js\";\nexport * from \"./models/IProofSignerVerifier.js\";\nexport * from \"./models/IProofSignerVerifierAsync.js\";\nexport * from \"./models/proofTypes.js\";\nexport * from \"./signerVerifiers/dataIntegrityProofSignerVerifier.js\";\nexport * from \"./signerVerifiers/dataIntegrityProofAsyncSignerVerifier.js\";\nexport * from \"./signerVerifiers/jsonWebSignature2020SignerVerifier.js\";\nexport * from \"./signerVerifiers/jsonWebSignature2020AsyncSignerVerifier.js\";\nexport * from \"./utils/multikeyHelper.js\";\nexport * from \"./utils/proofHelper.js\";\nexport * from \"./utils/verifiableCredentialHelper.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataIntegrityProof.js","sourceRoot":"","sources":["../../../src/models/IDataIntegrityProof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { DidCryptoSuites } from \"./didCryptoSuites.js\";\nimport type { ProofTypes } from \"./proofTypes.js\";\n\n/**\n * Interface describing a did proof.\n * https://www.w3.org/TR/vc-data-integrity/\n */\nexport interface IDataIntegrityProof {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextDataIntegrity\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDataIntegrityProof.js","sourceRoot":"","sources":["../../../src/models/IDataIntegrityProof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray, SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { DidCryptoSuites } from \"./didCryptoSuites.js\";\nimport type { ProofTypes } from \"./proofTypes.js\";\n\n/**\n * Interface describing a did proof.\n * https://www.w3.org/TR/vc-data-integrity/\n */\nexport interface IDataIntegrityProof {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextDataIntegrity\n\t\t| SingleOccurrenceArray<\n\t\t\t\tIJsonLdContextDefinitionElement,\n\t\t\t\ttypeof DidContexts.ContextDataIntegrity\n\t\t >;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ProofTypes.DataIntegrityProof;\n\n\t/**\n\t * An identifier for the cryptographic suite that can be used to verify the proof.\n\t */\n\tcryptosuite: DidCryptoSuites | string;\n\n\t/**\n\t * The id of the proof.\n\t */\n\tid?: string;\n\n\t/**\n\t * The reason the proof was created.\n\t */\n\tproofPurpose: string;\n\n\t/**\n\t * Contains the base-encoded binary data necessary to verify the\n\t * digital proof using the verificationMethod specified.\n\t */\n\tproofValue?: string;\n\n\t/**\n\t * The verification method of the proof.\n\t */\n\tverificationMethod?: string;\n\n\t/**\n\t * The iso date of when the proof was created.\n\t */\n\tcreated?: string;\n\n\t/**\n\t * The iso date of when the proof expires.\n\t */\n\texpires?: string;\n\n\t/**\n\t * One or more security domains in which the proof is meant to be used.\n\t */\n\tdomain?: ObjectOrArray<string>;\n\n\t/**\n\t * Provided to mitigate replay attacks on domains.\n\t */\n\tchallenge?: ObjectOrArray<string>;\n\n\t/**\n\t * Identifies another data integrity proof that MUST verify before\n\t * the current proof is processed\n\t */\n\tpreviousProof?: string;\n\n\t/**\n\t * Use of this field is to increase privacy by decreasing linkability\n\t * that is the result of deterministically generated signatures.\n\t */\n\tnonce?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidDocument.js","sourceRoot":"","sources":["../../../src/models/IDidDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidDocumentVerificationMethod } from \"./IDidDocumentVerificationMethod.js\";\nimport type { IDidService } from \"./IDidService.js\";\n\n/**\n * Interface describing a DID Document.\n * Spec https://www.w3.org/TR/did-core/#did-document-properties.\n */\nexport interface IDidDocument {\n\t/**\n\t * The context for the document.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.Context\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDidDocument.js","sourceRoot":"","sources":["../../../src/models/IDidDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray, SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidDocumentVerificationMethod } from \"./IDidDocumentVerificationMethod.js\";\nimport type { IDidService } from \"./IDidService.js\";\n\n/**\n * Interface describing a DID Document.\n * Spec https://www.w3.org/TR/did-core/#did-document-properties.\n */\nexport interface IDidDocument {\n\t/**\n\t * The context for the document.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.Context\n\t\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DidContexts.Context>;\n\n\t/**\n\t * The id for the document.\n\t */\n\tid: string;\n\n\t/**\n\t * Aliases for the document.\n\t */\n\talsoKnownAs?: ObjectOrArray<string>;\n\n\t/**\n\t * The controller for the document.\n\t */\n\tcontroller?: ObjectOrArray<string>;\n\n\t/**\n\t * The verification methods.\n\t */\n\tverificationMethod?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The authentication methods.\n\t */\n\tauthentication?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The assertion methods.\n\t */\n\tassertionMethod?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The key agreements.\n\t */\n\tkeyAgreement?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The capability invocations.\n\t */\n\tcapabilityInvocation?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The capability delegations.\n\t */\n\tcapabilityDelegation?: (string | IDidDocumentVerificationMethod)[];\n\n\t/**\n\t * The services.\n\t */\n\tservice?: IDidService[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidDocumentVerificationMethod.js","sourceRoot":"","sources":["../../../src/models/IDidDocumentVerificationMethod.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IJwk } from \"@twin.org/web\";\n\n/**\n * Interface describing a DID document verification method.\n */\nexport interface IDidDocumentVerificationMethod
|
|
1
|
+
{"version":3,"file":"IDidDocumentVerificationMethod.js","sourceRoot":"","sources":["../../../src/models/IDidDocumentVerificationMethod.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IJwk } from \"@twin.org/web\";\n\n/**\n * Interface describing a DID document verification method.\n */\nexport interface IDidDocumentVerificationMethod {\n\t/**\n\t * The id of the entry.\n\t */\n\tid: string;\n\n\t/**\n\t * The controller for the entry.\n\t */\n\tcontroller: string;\n\n\t/**\n\t * The type of the entry.\n\t */\n\ttype: string;\n\n\t/**\n\t * The public key for the entry.\n\t * Spec https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03 .\n\t */\n\tpublicKeyMultibase?: string;\n\n\t/**\n\t * The public key for the entry as a JWK.\n\t * Spec https://datatracker.ietf.org/doc/html/rfc7517 .\n\t */\n\tpublicKeyJwk?: IJwk & IJsonLdNodeObject;\n\n\t/**\n\t * Multi key partial revocation.\n\t */\n\trevocation?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidService.js","sourceRoot":"","sources":["../../../src/models/IDidService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IDidService.js","sourceRoot":"","sources":["../../../src/models/IDidService.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\n\n/**\n * Interface describing a did document service.\n */\nexport interface IDidService {\n\t/**\n\t * The id of the service.\n\t */\n\tid: string;\n\n\t/**\n\t * The type of the service.\n\t */\n\ttype: ObjectOrArray<string>;\n\n\t/**\n\t * The endpoint for the service.\n\t */\n\tserviceEndpoint: ObjectOrArray<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiableCredentialCommon.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialCommon.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IDidCredentialSchema } from \"./IDidCredentialSchema.js\";\nimport type { IDidCredentialStatus } from \"./IDidCredentialStatus.js\";\nimport type { IDidLabel } from \"./IDidLabel.js\";\nimport type { IProof } from \"./IProof.js\";\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"IDidVerifiableCredentialCommon.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialCommon.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IDidCredentialSchema } from \"./IDidCredentialSchema.js\";\nimport type { IDidCredentialStatus } from \"./IDidCredentialStatus.js\";\nimport type { IDidLabel } from \"./IDidLabel.js\";\nimport type { IProof } from \"./IProof.js\";\n\n/**\n * Common properties shared by all verifiable credential versions.\n * @see https://www.w3.org/TR/vc-data-model-2.0\n */\nexport interface IDidVerifiableCredentialCommon {\n\t/**\n\t * The identifier for the verifiable credential.\n\t */\n\tid?: string;\n\n\t/**\n\t * The types of the data stored in the verifiable credential.\n\t */\n\ttype: ObjectOrArray<string>;\n\n\t/**\n\t * The data for the verifiable credential.\n\t */\n\tcredentialSubject?: ObjectOrArray<IJsonLdNodeObject>;\n\n\t/**\n\t * Used to discover information about the current status of the\n\t * verifiable credential, such as whether it is suspended or revoked.\n\t */\n\tcredentialStatus?: ObjectOrArray<IDidCredentialStatus>;\n\n\t/**\n\t * Annotate type definitions or lock them to specific versions of the vocabulary.\n\t */\n\tcredentialSchema?: ObjectOrArray<IDidCredentialSchema>;\n\n\t/**\n\t * The issuing identity.\n\t */\n\tissuer?: string | { id: string; name?: string | IDidLabel[]; description?: string | IDidLabel[] };\n\n\t/**\n\t * The name of the credential.\n\t */\n\tname?: string | IDidLabel[];\n\n\t/**\n\t * The description of the credential.\n\t */\n\tdescription?: string | IDidLabel[];\n\n\t/**\n\t * Evidence associated with the Credential.\n\t */\n\tevidence?: ObjectOrArray<IJsonLdNodeObject>;\n\n\t/**\n\t * Proofs that the verifiable credential is valid.\n\t * Optional if a different proof method is used, such as JWT.\n\t */\n\tproof?: ObjectOrArray<IProof>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiableCredentialV1.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialV1.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialCommon } from \"./IDidVerifiableCredentialCommon.js\";\n\n/**\n * Interface describing a verifiable credential.\n * https://www.w3.org/TR/vc-data-model-1.1\n */\nexport interface IDidVerifiableCredentialV1 extends IDidVerifiableCredentialCommon {\n\t/**\n\t * The context for the verifiable credential.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv1\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDidVerifiableCredentialV1.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialV1.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialCommon } from \"./IDidVerifiableCredentialCommon.js\";\n\n/**\n * Interface describing a verifiable credential.\n * https://www.w3.org/TR/vc-data-model-1.1\n */\nexport interface IDidVerifiableCredentialV1 extends IDidVerifiableCredentialCommon {\n\t/**\n\t * The context for the verifiable credential.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv1\n\t\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DidContexts.ContextVCv1>;\n\n\t/**\n\t * The date the verifiable credential was issued, depending on version validFrom might be set instead.\n\t */\n\tissuanceDate?: string;\n\n\t/**\n\t * The date the verifiable credential expires, depending on version validUntil might be set instead.\n\t */\n\texpirationDate?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiableCredentialV2.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialV2.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialCommon } from \"./IDidVerifiableCredentialCommon.js\";\n\n/**\n * Interface describing a verifiable credential.\n * https://www.w3.org/TR/vc-data-model-2.0\n */\nexport interface IDidVerifiableCredentialV2 extends IDidVerifiableCredentialCommon {\n\t/**\n\t * The context for the verifiable credential.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv2\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDidVerifiableCredentialV2.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiableCredentialV2.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialCommon } from \"./IDidVerifiableCredentialCommon.js\";\n\n/**\n * Interface describing a verifiable credential.\n * https://www.w3.org/TR/vc-data-model-2.0\n */\nexport interface IDidVerifiableCredentialV2 extends IDidVerifiableCredentialCommon {\n\t/**\n\t * The context for the verifiable credential.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv2\n\t\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DidContexts.ContextVCv2>;\n\n\t/**\n\t * The date the verifiable credential is valid from.\n\t */\n\tvalidFrom?: string;\n\n\t/**\n\t * The date the verifiable credential is valid until.\n\t */\n\tvalidUntil?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiablePresentationCommon.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationCommon.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IProof } from \"./IProof.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationCommon {\n\t/**\n\t * Provide a unique identifier for the presentation.\n\t */\n\tid?: string;\n\n\t/**\n\t * The types of the data stored in the verifiable credential.\n\t */\n\ttype: string
|
|
1
|
+
{"version":3,"file":"IDidVerifiablePresentationCommon.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationCommon.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IProof } from \"./IProof.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationCommon {\n\t/**\n\t * Provide a unique identifier for the presentation.\n\t */\n\tid?: string;\n\n\t/**\n\t * The types of the data stored in the verifiable credential.\n\t */\n\ttype: ObjectOrArray<string>;\n\n\t/**\n\t * The entity generating the presentation.\n\t */\n\tholder?: string;\n\n\t/**\n\t * Proofs that the verifiable presentation is valid.\n\t * Optional if a different proof method is used, such as JWT.\n\t */\n\tproof?: ObjectOrArray<IProof>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiablePresentationV1.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationV1.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialV1 } from \"./IDidVerifiableCredentialV1.js\";\nimport type { IDidVerifiablePresentationCommon } from \"./IDidVerifiablePresentationCommon.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationV1 extends IDidVerifiablePresentationCommon {\n\t/**\n\t * The context for the verifiable presentation.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv1\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDidVerifiablePresentationV1.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationV1.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialV1 } from \"./IDidVerifiableCredentialV1.js\";\nimport type { IDidVerifiablePresentationCommon } from \"./IDidVerifiablePresentationCommon.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationV1 extends IDidVerifiablePresentationCommon {\n\t/**\n\t * The context for the verifiable presentation.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv1\n\t\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DidContexts.ContextVCv1>;\n\n\t/**\n\t * The data for the verifiable credentials.\n\t */\n\tverifiableCredential?: (string | IDidVerifiableCredentialV1)[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDidVerifiablePresentationV2.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationV2.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialV2 } from \"./IDidVerifiableCredentialV2.js\";\nimport type { IDidVerifiablePresentationCommon } from \"./IDidVerifiablePresentationCommon.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationV2 extends IDidVerifiablePresentationCommon {\n\t/**\n\t * The context for the verifiable presentation.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv2\n\t\t|
|
|
1
|
+
{"version":3,"file":"IDidVerifiablePresentationV2.js","sourceRoot":"","sources":["../../../src/models/IDidVerifiablePresentationV2.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { IDidVerifiableCredentialV2 } from \"./IDidVerifiableCredentialV2.js\";\nimport type { IDidVerifiablePresentationCommon } from \"./IDidVerifiablePresentationCommon.js\";\n\n/**\n * Interface describing a verifiable presentation.\n */\nexport interface IDidVerifiablePresentationV2 extends IDidVerifiablePresentationCommon {\n\t/**\n\t * The context for the verifiable presentation.\n\t */\n\t\"@context\":\n\t\t| typeof DidContexts.ContextVCv2\n\t\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof DidContexts.ContextVCv2>;\n\n\t/**\n\t * The data for the verifiable credentials.\n\t */\n\tverifiableCredential?: (string | IDidVerifiableCredentialV2)[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IJsonWebSignature2020Proof.js","sourceRoot":"","sources":["../../../src/models/IJsonWebSignature2020Proof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { ProofTypes } from \"./proofTypes.js\";\n\n/**\n * Interface describing a did proof in JSON Web Signature 2020 Format.\n * https://www.w3.org/TR/vc-jws-2020/\n */\nexport interface IJsonWebSignature2020Proof {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextSecurityJws2020\n\t\t|
|
|
1
|
+
{"version":3,"file":"IJsonWebSignature2020Proof.js","sourceRoot":"","sources":["../../../src/models/IJsonWebSignature2020Proof.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { ProofTypes } from \"./proofTypes.js\";\n\n/**\n * Interface describing a did proof in JSON Web Signature 2020 Format.\n * https://www.w3.org/TR/vc-jws-2020/\n */\nexport interface IJsonWebSignature2020Proof {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextSecurityJws2020\n\t\t| SingleOccurrenceArray<\n\t\t\t\tIJsonLdContextDefinitionElement,\n\t\t\t\ttypeof DidContexts.ContextSecurityJws2020\n\t\t >;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof ProofTypes.JsonWebSignature2020;\n\n\t/**\n\t * The reason the proof was created.\n\t */\n\tproofPurpose: string;\n\n\t/**\n\t * The verification method of the proof.\n\t */\n\tverificationMethod?: string;\n\n\t/**\n\t * The iso date of when the proof was created.\n\t */\n\tcreated?: string;\n\n\t/**\n\t * The JSON Web Signature.\n\t */\n\tjws?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IMultikey.js","sourceRoot":"","sources":["../../../src/models/IMultikey.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { DidTypes } from \"./didTypes.js\";\n\n/**\n * Interface describing a Multikey.\n * https://www.w3.org/TR/cid-1.0/\n */\nexport interface IMultikey {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextControllerIdentifiers\n\t\t| typeof DidContexts.ContextSecurityMultikey\n\t\t|
|
|
1
|
+
{"version":3,"file":"IMultikey.js","sourceRoot":"","sources":["../../../src/models/IMultikey.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { DidContexts } from \"./didContexts.js\";\nimport type { DidTypes } from \"./didTypes.js\";\n\n/**\n * Interface describing a Multikey.\n * https://www.w3.org/TR/cid-1.0/\n */\nexport interface IMultikey {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof DidContexts.ContextControllerIdentifiers\n\t\t| typeof DidContexts.ContextSecurityMultikey\n\t\t| SingleOccurrenceArray<\n\t\t\t\tIJsonLdContextDefinitionElement,\n\t\t\t\ttypeof DidContexts.ContextControllerIdentifiers\n\t\t >\n\t\t| SingleOccurrenceArray<\n\t\t\t\tIJsonLdContextDefinitionElement,\n\t\t\t\ttypeof DidContexts.ContextSecurityMultikey\n\t\t >;\n\n\t/**\n\t * The id of the entry.\n\t */\n\tid?: string;\n\n\t/**\n\t * The type of the entry.\n\t */\n\ttype: typeof DidTypes.Multikey;\n\n\t/**\n\t * The controller for the entry.\n\t */\n\tcontroller?: string;\n\n\t/**\n\t * The public key for the entry.\n\t */\n\tpublicKeyMultibase: string;\n\n\t/**\n\t * The secret key for the entry.\n\t */\n\tsecretKeyMultibase?: string;\n\n\t/**\n\t * The date the entry expires.\n\t */\n\texpires?: string;\n\n\t/**\n\t * The date the entry was revoked.\n\t */\n\trevoked?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IProofSignerVerifierAsync.js","sourceRoot":"","sources":["../../../src/models/IProofSignerVerifierAsync.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IJwk } from \"@twin.org/web\";\nimport type { IProof } from \"./IProof.js\";\n\n/**\n * Interface describing an async proof signer and verifier.\n * Supports signing with callbacks to prevent private key exposure.\n */\nexport interface IProofSignerVerifierAsync {\n\t/**\n\t * Create a proof with an async signing callback.\n\t * This method prevents private key exposure by delegating signing to a secure callback.\n\t * @param unsecuredDocument The data to create the proof for.\n\t * @param unsignedProof The proof options.\n\t * @param signCallback Async callback that signs data with a private key from secure storage.\n\t * Receives data and JWS algorithm for vault-side validation.\n\t * @returns The created proof.\n\t */\n\tcreateProofWithSigner(\n\t\tunsecuredDocument: IJsonLdNodeObject,\n\t\tunsignedProof: IProof,\n\t\tsignCallback: (data: Uint8Array, algorithm: string) => Promise<Uint8Array>\n\t): Promise<IProof>;\n\n\t/**\n\t * Verify a proof for the given data.\n\t * @param securedDocument The credential to verify.\n\t * @param signedProof The proof to verify.\n\t * @param verifyKey The public key to verify the proof with.\n\t * @returns True if the credential was verified.\n\t */\n\tverifyProof(\n\t\tsecuredDocument: IJsonLdNodeObject,\n\t\tsignedProof: IProof,\n\t\tverifyKey: IJwk\n\t): Promise<boolean>;\n\n\t/**\n\t * Create a hash for the given data.\n\t * @param unsecuredDocument The data to create the proof for.\n\t * @param unsignedProof The unsigned proof.\n\t * @returns The created hash.\n\t */\n\tcreateHash(unsecuredDocument: IJsonLdNodeObject, unsignedProof: IProof): Promise<Uint8Array>;\n}\n"]}
|
|
@@ -6,35 +6,71 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const DidContexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The canonical RDF namespace URI for DID.
|
|
10
|
+
*/
|
|
11
|
+
Namespace: "https://www.w3.org/ns/did/v1",
|
|
12
|
+
/**
|
|
13
|
+
* The value to use in the JSON-LD context for DID.
|
|
10
14
|
*/
|
|
11
15
|
Context: "https://www.w3.org/ns/did/v1",
|
|
12
16
|
/**
|
|
13
|
-
* The
|
|
17
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
18
|
+
*/
|
|
19
|
+
JsonSchemaNamespace: "https://schema.twindev.org/w3c-did/",
|
|
20
|
+
/**
|
|
21
|
+
* The canonical RDF namespace URI for DID VC v1.
|
|
22
|
+
*/
|
|
23
|
+
NamespaceVCv1: "https://www.w3.org/2018/credentials/v1",
|
|
24
|
+
/**
|
|
25
|
+
* The value to use in the JSON-LD context for DID VC v1.
|
|
14
26
|
*/
|
|
15
27
|
ContextVCv1: "https://www.w3.org/2018/credentials/v1",
|
|
16
28
|
/**
|
|
17
|
-
* The
|
|
29
|
+
* The canonical RDF namespace URI for DID VC v2.
|
|
30
|
+
*/
|
|
31
|
+
NamespaceVCv2: "https://www.w3.org/ns/credentials/v2",
|
|
32
|
+
/**
|
|
33
|
+
* The value to use in the JSON-LD context for DID VC v2.
|
|
18
34
|
*/
|
|
19
35
|
ContextVCv2: "https://www.w3.org/ns/credentials/v2",
|
|
20
36
|
/**
|
|
21
|
-
* The
|
|
37
|
+
* The canonical RDF namespace URI for security ed25519 suites.
|
|
38
|
+
*/
|
|
39
|
+
NamespaceSecurityEd25519: "https://w3id.org/security/suites/ed25519-2020/v1",
|
|
40
|
+
/**
|
|
41
|
+
* The value to use in the JSON-LD context for security ed25519 suites.
|
|
22
42
|
*/
|
|
23
43
|
ContextSecurityEd25519: "https://w3id.org/security/suites/ed25519-2020/v1",
|
|
24
44
|
/**
|
|
25
|
-
* The
|
|
45
|
+
* The canonical RDF namespace URI for security jws-2020 suites.
|
|
46
|
+
*/
|
|
47
|
+
NamespaceSecurityJws2020: "https://w3id.org/security/suites/jws-2020/v1",
|
|
48
|
+
/**
|
|
49
|
+
* The value to use in the JSON-LD context for security jws-2020 suites.
|
|
26
50
|
*/
|
|
27
51
|
ContextSecurityJws2020: "https://w3id.org/security/suites/jws-2020/v1",
|
|
28
52
|
/**
|
|
29
|
-
* The
|
|
53
|
+
* The canonical RDF namespace URI for VC Data Integrity.
|
|
54
|
+
*/
|
|
55
|
+
NamespaceDataIntegrity: "https://w3id.org/security/data-integrity/v2",
|
|
56
|
+
/**
|
|
57
|
+
* The value to use in the JSON-LD context for VC Data Integrity.
|
|
30
58
|
*/
|
|
31
|
-
ContextDataIntegrity: "https://
|
|
59
|
+
ContextDataIntegrity: "https://w3id.org/security/data-integrity/v2",
|
|
32
60
|
/**
|
|
33
|
-
* The
|
|
61
|
+
* The canonical RDF namespace URI for controller identifiers.
|
|
62
|
+
*/
|
|
63
|
+
NamespaceControllerIdentifiers: "https://www.w3.org/ns/cid/v1",
|
|
64
|
+
/**
|
|
65
|
+
* The value to use in the JSON-LD context for controller identifiers.
|
|
34
66
|
*/
|
|
35
67
|
ContextControllerIdentifiers: "https://www.w3.org/ns/cid/v1",
|
|
36
68
|
/**
|
|
37
|
-
* The
|
|
69
|
+
* The canonical RDF namespace URI for security multikey suites.
|
|
70
|
+
*/
|
|
71
|
+
NamespaceSecurityMultikey: "https://w3id.org/security/multikey/v1",
|
|
72
|
+
/**
|
|
73
|
+
* The value to use in the JSON-LD context for security multikey suites.
|
|
38
74
|
*/
|
|
39
75
|
ContextSecurityMultikey: "https://w3id.org/security/multikey/v1"
|
|
40
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didContexts.js","sourceRoot":"","sources":["../../../src/models/didContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,8BAA8B;IAEvC;;OAEG;IACH,WAAW,EAAE,wCAAwC;IAErD;;OAEG;IACH,WAAW,EAAE,sCAAsC;IAEnD;;OAEG;IACH,sBAAsB,EAAE,kDAAkD;IAE1E;;OAEG;IACH,sBAAsB,EAAE,8CAA8C;IAEtE;;OAEG;IACH,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"didContexts.js","sourceRoot":"","sources":["../../../src/models/didContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,8BAA8B;IAEzC;;OAEG;IACH,OAAO,EAAE,8BAA8B;IAEvC;;OAEG;IACH,mBAAmB,EAAE,qCAAqC;IAE1D;;OAEG;IACH,aAAa,EAAE,wCAAwC;IAEvD;;OAEG;IACH,WAAW,EAAE,wCAAwC;IAErD;;OAEG;IACH,aAAa,EAAE,sCAAsC;IAErD;;OAEG;IACH,WAAW,EAAE,sCAAsC;IAEnD;;OAEG;IACH,wBAAwB,EAAE,kDAAkD;IAE5E;;OAEG;IACH,sBAAsB,EAAE,kDAAkD;IAE1E;;OAEG;IACH,wBAAwB,EAAE,8CAA8C;IAExE;;OAEG;IACH,sBAAsB,EAAE,8CAA8C;IAEtE;;OAEG;IACH,sBAAsB,EAAE,6CAA6C;IAErE;;OAEG;IACH,oBAAoB,EAAE,6CAA6C;IAEnE;;OAEG;IACH,8BAA8B,EAAE,8BAA8B;IAE9D;;OAEG;IACH,4BAA4B,EAAE,8BAA8B;IAE5D;;OAEG;IACH,yBAAyB,EAAE,uCAAuC;IAElE;;OAEG;IACH,uBAAuB,EAAE,uCAAuC;CACvD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts for DIDs.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DidContexts = {\n\t/**\n\t * The canonical RDF namespace URI for DID.\n\t */\n\tNamespace: \"https://www.w3.org/ns/did/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for DID.\n\t */\n\tContext: \"https://www.w3.org/ns/did/v1\",\n\n\t/**\n\t * The namespace location of the hosted version of the JSON Schema.\n\t */\n\tJsonSchemaNamespace: \"https://schema.twindev.org/w3c-did/\",\n\n\t/**\n\t * The canonical RDF namespace URI for DID VC v1.\n\t */\n\tNamespaceVCv1: \"https://www.w3.org/2018/credentials/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for DID VC v1.\n\t */\n\tContextVCv1: \"https://www.w3.org/2018/credentials/v1\",\n\n\t/**\n\t * The canonical RDF namespace URI for DID VC v2.\n\t */\n\tNamespaceVCv2: \"https://www.w3.org/ns/credentials/v2\",\n\n\t/**\n\t * The value to use in the JSON-LD context for DID VC v2.\n\t */\n\tContextVCv2: \"https://www.w3.org/ns/credentials/v2\",\n\n\t/**\n\t * The canonical RDF namespace URI for security ed25519 suites.\n\t */\n\tNamespaceSecurityEd25519: \"https://w3id.org/security/suites/ed25519-2020/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for security ed25519 suites.\n\t */\n\tContextSecurityEd25519: \"https://w3id.org/security/suites/ed25519-2020/v1\",\n\n\t/**\n\t * The canonical RDF namespace URI for security jws-2020 suites.\n\t */\n\tNamespaceSecurityJws2020: \"https://w3id.org/security/suites/jws-2020/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for security jws-2020 suites.\n\t */\n\tContextSecurityJws2020: \"https://w3id.org/security/suites/jws-2020/v1\",\n\n\t/**\n\t * The canonical RDF namespace URI for VC Data Integrity.\n\t */\n\tNamespaceDataIntegrity: \"https://w3id.org/security/data-integrity/v2\",\n\n\t/**\n\t * The value to use in the JSON-LD context for VC Data Integrity.\n\t */\n\tContextDataIntegrity: \"https://w3id.org/security/data-integrity/v2\",\n\n\t/**\n\t * The canonical RDF namespace URI for controller identifiers.\n\t */\n\tNamespaceControllerIdentifiers: \"https://www.w3.org/ns/cid/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for controller identifiers.\n\t */\n\tContextControllerIdentifiers: \"https://www.w3.org/ns/cid/v1\",\n\n\t/**\n\t * The canonical RDF namespace URI for security multikey suites.\n\t */\n\tNamespaceSecurityMultikey: \"https://w3id.org/security/multikey/v1\",\n\n\t/**\n\t * The value to use in the JSON-LD context for security multikey suites.\n\t */\n\tContextSecurityMultikey: \"https://w3id.org/security/multikey/v1\"\n} as const;\n\n/**\n * The contexts for DIDs.\n */\nexport type DidContexts = (typeof DidContexts)[keyof typeof DidContexts];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didTypes.js","sourceRoot":"","sources":["../../../src/models/didTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;OAEG;IACH,sBAAsB,EAAE,wBAAwB;IAEhD;;OAEG;IACH,0BAA0B,EAAE,4BAA4B;IAExD;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for DIDs.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DidTypes = {\n\t/**\n\t * The type for Verifiable Credential.\n\t */\n\tVerifiableCredential: \"VerifiableCredential\",\n\n\t/**\n\t * The type for Verifiable Presentation.\n\t */\n\tVerifiablePresentation: \"VerifiablePresentation\",\n\n\t/**\n\t * The type for Ed25519VerificationKey2020.\n\t */\n\tEd25519VerificationKey2020: \"Ed25519VerificationKey2020\",\n\n\t/**\n\t * The type for JsonWebKey2020.\n\t */\n\tJsonWebKey2020: \"JsonWebKey2020\",\n\n\t/**\n\t * The type for LinkedDomains.\n\t */\n\tLinkedDomains: \"LinkedDomains\",\n\n\t/**\n\t * The type for Multikey.\n\t */\n\tMultikey: \"Multikey\"\n} as const;\n\n/**\n * The types for DIDs.\n */\nexport type DidTypes = (typeof DidTypes)[keyof typeof DidTypes];\n"]}
|
|
1
|
+
{"version":3,"file":"didTypes.js","sourceRoot":"","sources":["../../../src/models/didTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;OAEG;IACH,sBAAsB,EAAE,wBAAwB;IAEhD;;OAEG;IACH,0BAA0B,EAAE,4BAA4B;IAExD;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types for DIDs.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DidTypes = {\n\t/**\n\t * The type for Document.\n\t */\n\tDocument: \"Document\",\n\n\t/**\n\t * The type for Verifiable Credential.\n\t */\n\tVerifiableCredential: \"VerifiableCredential\",\n\n\t/**\n\t * The type for Verifiable Presentation.\n\t */\n\tVerifiablePresentation: \"VerifiablePresentation\",\n\n\t/**\n\t * The type for Ed25519VerificationKey2020.\n\t */\n\tEd25519VerificationKey2020: \"Ed25519VerificationKey2020\",\n\n\t/**\n\t * The type for JsonWebKey2020.\n\t */\n\tJsonWebKey2020: \"JsonWebKey2020\",\n\n\t/**\n\t * The type for LinkedDomains.\n\t */\n\tLinkedDomains: \"LinkedDomains\",\n\n\t/**\n\t * The type for Multikey.\n\t */\n\tMultikey: \"Multikey\"\n} as const;\n\n/**\n * The types for DIDs.\n */\nexport type DidTypes = (typeof DidTypes)[keyof typeof DidTypes];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* JWS signature algorithms supported for proof signing.
|
|
5
|
+
* Based on RFC 7518 (JSON Web Algorithms) and W3C DID standards.
|
|
6
|
+
* @see https://datatracker.ietf.org/doc/html/rfc7518#section-3.1
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
export const JwsAlgorithms = {
|
|
10
|
+
/**
|
|
11
|
+
* EdDSA signature algorithm using Ed25519 curve.
|
|
12
|
+
* Used by both DataIntegrityProof (eddsa-jcs-2022) and JsonWebSignature2020.
|
|
13
|
+
* @see https://www.w3.org/TR/vc-di-eddsa/
|
|
14
|
+
*/
|
|
15
|
+
EdDSA: "EdDSA"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=jwsAlgorithms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwsAlgorithms.js","sourceRoot":"","sources":["../../../src/models/jwsAlgorithms.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;;;OAIG;IACH,KAAK,EAAE,OAAO;CACL,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * JWS signature algorithms supported for proof signing.\n * Based on RFC 7518 (JSON Web Algorithms) and W3C DID standards.\n * @see https://datatracker.ietf.org/doc/html/rfc7518#section-3.1\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const JwsAlgorithms = {\n\t/**\n\t * EdDSA signature algorithm using Ed25519 curve.\n\t * Used by both DataIntegrityProof (eddsa-jcs-2022) and JsonWebSignature2020.\n\t * @see https://www.w3.org/TR/vc-di-eddsa/\n\t */\n\tEdDSA: \"EdDSA\"\n} as const;\n\n/**\n * JWS signature algorithms type.\n */\nexport type JwsAlgorithms = (typeof JwsAlgorithms)[keyof typeof JwsAlgorithms];\n"]}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-did/DidDocument",
|
|
4
|
+
"title": "DidDocument",
|
|
5
|
+
"description": "Interface describing a DID Document.\nSpec https://www.w3.org/TR/did-core/#did-document-properties.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"@context": {
|
|
9
|
+
"anyOf": [
|
|
10
|
+
{
|
|
11
|
+
"const": "https://www.w3.org/ns/did/v1"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"const": "https://www.w3.org/ns/did/v1"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"contains": {
|
|
26
|
+
"const": "https://www.w3.org/ns/did/v1"
|
|
27
|
+
},
|
|
28
|
+
"minContains": 1,
|
|
29
|
+
"maxContains": 1,
|
|
30
|
+
"minItems": 1
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"description": "The context for the document."
|
|
34
|
+
},
|
|
35
|
+
"id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "The id for the document."
|
|
38
|
+
},
|
|
39
|
+
"alsoKnownAs": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"description": "Aliases for the document."
|
|
52
|
+
},
|
|
53
|
+
"controller": {
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"description": "The controller for the document."
|
|
66
|
+
},
|
|
67
|
+
"verificationMethod": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"description": "The verification methods."
|
|
80
|
+
},
|
|
81
|
+
"authentication": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"anyOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"description": "The authentication methods."
|
|
94
|
+
},
|
|
95
|
+
"assertionMethod": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"description": "The assertion methods."
|
|
108
|
+
},
|
|
109
|
+
"keyAgreement": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"description": "The key agreements."
|
|
122
|
+
},
|
|
123
|
+
"capabilityInvocation": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": {
|
|
126
|
+
"anyOf": [
|
|
127
|
+
{
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"description": "The capability invocations."
|
|
136
|
+
},
|
|
137
|
+
"capabilityDelegation": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"anyOf": [
|
|
141
|
+
{
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidDocumentVerificationMethod"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"description": "The capability delegations."
|
|
150
|
+
},
|
|
151
|
+
"service": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidService"
|
|
155
|
+
},
|
|
156
|
+
"description": "The services."
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"required": [
|
|
160
|
+
"@context",
|
|
161
|
+
"id"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-did/DidVerifiableCredential",
|
|
4
|
+
"title": "DidVerifiableCredential",
|
|
5
|
+
"description": "Interface describing a verifiable credential.",
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredentialV1"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredentialV2"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-did/DidVerifiablePresentation",
|
|
4
|
+
"title": "DidVerifiablePresentation",
|
|
5
|
+
"description": "Interface describing a verifiable presentation.",
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidVerifiablePresentationV1"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.twindev.org/w3c-did/DidVerifiablePresentationV2"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|