@twin.org/attestation-models 0.0.1-next.14 → 0.0.1-next.16
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/dist/cjs/index.cjs +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/types/models/IAttestationComponent.d.ts +1 -2
- package/dist/types/models/IAttestationInformation.d.ts +2 -2
- package/dist/types/models/IAttestationJwtProof.d.ts +2 -1
- package/dist/types/models/api/IAttestationCreateRequest.d.ts +0 -4
- package/docs/changelog.md +1 -1
- package/docs/reference/interfaces/IAttestationComponent.md +1 -7
- package/docs/reference/interfaces/IAttestationCreateRequest.md +0 -6
- package/docs/reference/interfaces/IAttestationInformation.md +1 -1
- package/docs/reference/interfaces/IAttestationJwtProof.md +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
@@ -42,7 +42,7 @@ var properties$1 = {
|
|
42
42
|
}
|
43
43
|
],
|
44
44
|
additionalItems: {
|
45
|
-
|
45
|
+
$ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
46
46
|
}
|
47
47
|
}
|
48
48
|
],
|
@@ -126,7 +126,7 @@ var properties = {
|
|
126
126
|
}
|
127
127
|
],
|
128
128
|
additionalItems: {
|
129
|
-
|
129
|
+
$ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
130
130
|
}
|
131
131
|
}
|
132
132
|
],
|
package/dist/esm/index.mjs
CHANGED
@@ -40,7 +40,7 @@ var properties$1 = {
|
|
40
40
|
}
|
41
41
|
],
|
42
42
|
additionalItems: {
|
43
|
-
|
43
|
+
$ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
44
44
|
}
|
45
45
|
}
|
46
46
|
],
|
@@ -124,7 +124,7 @@ var properties = {
|
|
124
124
|
}
|
125
125
|
],
|
126
126
|
additionalItems: {
|
127
|
-
|
127
|
+
$ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
128
128
|
}
|
129
129
|
}
|
130
130
|
],
|
@@ -7,14 +7,13 @@ import type { IAttestationInformation } from "./IAttestationInformation";
|
|
7
7
|
export interface IAttestationComponent extends IComponent {
|
8
8
|
/**
|
9
9
|
* Attest the data and return the collated information.
|
10
|
-
* @param verificationMethodId The identity verification method to use for attesting the data.
|
11
10
|
* @param attestationObject The data to attest.
|
12
11
|
* @param namespace The namespace of the connector to use for the attestation, defaults to component configured namespace.
|
13
12
|
* @param identity The identity to perform the attestation operation with.
|
14
13
|
* @param nodeIdentity The node identity to include in the attestation.
|
15
14
|
* @returns The id of the attestation.
|
16
15
|
*/
|
17
|
-
create(
|
16
|
+
create(attestationObject: IJsonLdNodeObject, namespace?: string, identity?: string, nodeIdentity?: string): Promise<string>;
|
18
17
|
/**
|
19
18
|
* Resolve and verify the attestation id.
|
20
19
|
* @param id The attestation id to verify.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
1
|
+
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
2
2
|
import type { AttestationTypes } from "./attestationTypes";
|
3
3
|
/**
|
4
4
|
* Interface describing the collated attestation information.
|
@@ -7,7 +7,7 @@ export interface IAttestationInformation {
|
|
7
7
|
/**
|
8
8
|
* JSON-LD Context.
|
9
9
|
*/
|
10
|
-
"@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...
|
10
|
+
"@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...IJsonLdContextDefinitionElement[]];
|
11
11
|
/**
|
12
12
|
* JSON-LD Type.
|
13
13
|
*/
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
1
2
|
import type { AttestationTypes } from "./attestationTypes";
|
2
3
|
/**
|
3
4
|
* Interface describing an attestation proof.
|
@@ -6,7 +7,7 @@ export interface IAttestationJwtProof {
|
|
6
7
|
/**
|
7
8
|
* JSON-LD Context.
|
8
9
|
*/
|
9
|
-
"@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...
|
10
|
+
"@context": typeof AttestationTypes.ContextRoot | [typeof AttestationTypes.ContextRoot, ...IJsonLdContextDefinitionElement[]];
|
10
11
|
/**
|
11
12
|
* The type of the proof.
|
12
13
|
*/
|
package/docs/changelog.md
CHANGED
@@ -10,18 +10,12 @@ Interface describing an attestation contract.
|
|
10
10
|
|
11
11
|
### create()
|
12
12
|
|
13
|
-
> **create**(`
|
13
|
+
> **create**(`attestationObject`, `namespace`?, `identity`?, `nodeIdentity`?): `Promise`\<`string`\>
|
14
14
|
|
15
15
|
Attest the data and return the collated information.
|
16
16
|
|
17
17
|
#### Parameters
|
18
18
|
|
19
|
-
##### verificationMethodId
|
20
|
-
|
21
|
-
`string`
|
22
|
-
|
23
|
-
The identity verification method to use for attesting the data.
|
24
|
-
|
25
19
|
##### attestationObject
|
26
20
|
|
27
21
|
`IJsonLdNodeObject`
|
@@ -10,12 +10,6 @@ Attest the data and return the id of the attestation.
|
|
10
10
|
|
11
11
|
The data to be used in the signing.
|
12
12
|
|
13
|
-
#### verificationMethodId
|
14
|
-
|
15
|
-
> **verificationMethodId**: `string`
|
16
|
-
|
17
|
-
The identity verification method to use for attesting the data.
|
18
|
-
|
19
13
|
#### attestationObject
|
20
14
|
|
21
15
|
> **attestationObject**: `IJsonLdNodeObject`
|
@@ -6,7 +6,7 @@ Interface describing the collated attestation information.
|
|
6
6
|
|
7
7
|
### @context
|
8
8
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...
|
9
|
+
> **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...IJsonLdContextDefinitionElement[]`\]
|
10
10
|
|
11
11
|
JSON-LD Context.
|
12
12
|
|
@@ -6,7 +6,7 @@ Interface describing an attestation proof.
|
|
6
6
|
|
7
7
|
### @context
|
8
8
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...
|
9
|
+
> **@context**: `"https://schema.twindev.org/attestation/"` \| \[`"https://schema.twindev.org/attestation/"`, `...IJsonLdContextDefinitionElement[]`\]
|
10
10
|
|
11
11
|
JSON-LD Context.
|
12
12
|
|