@twin.org/trust-models 0.0.3-next.1 → 0.0.3-next.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITrustVerifier.js","sourceRoot":"","sources":["../../../src/models/ITrustVerifier.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent, IError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Interface describing a trust verifier component.\n */\nexport interface ITrustVerifier extends IComponent {\n\t/**\n\t * Verify a payload by checking the validity of its structure and content.\n\t * @param payload The payload to verify.\n\t * @returns Whether the payload is verified and
|
|
1
|
+
{"version":3,"file":"ITrustVerifier.js","sourceRoot":"","sources":["../../../src/models/ITrustVerifier.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent, IError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Interface describing a trust verifier component.\n */\nexport interface ITrustVerifier extends IComponent {\n\t/**\n\t * Verify a payload by checking the validity of its structure and content.\n\t * @param payload The payload to verify.\n\t * @param info Information extracted from previous verifiers and to be added by this verifier.\n\t * @returns Whether the payload is verified and possible verification failures, returns undefined if payload not processed.\n\t */\n\tverify(\n\t\tpayload: unknown,\n\t\tinfo: IJsonLdNodeObject[]\n\t): Promise<\n\t\t| {\n\t\t\t\tverified: boolean;\n\t\t\t\tfailures?: IError[];\n\t\t }\n\t\t| undefined\n\t>;\n}\n"]}
|
|
@@ -7,11 +7,11 @@ export interface ITrustVerifier extends IComponent {
|
|
|
7
7
|
/**
|
|
8
8
|
* Verify a payload by checking the validity of its structure and content.
|
|
9
9
|
* @param payload The payload to verify.
|
|
10
|
-
* @
|
|
10
|
+
* @param info Information extracted from previous verifiers and to be added by this verifier.
|
|
11
|
+
* @returns Whether the payload is verified and possible verification failures, returns undefined if payload not processed.
|
|
11
12
|
*/
|
|
12
|
-
verify(payload: unknown): Promise<{
|
|
13
|
+
verify(payload: unknown, info: IJsonLdNodeObject[]): Promise<{
|
|
13
14
|
verified: boolean;
|
|
14
|
-
info?: IJsonLdNodeObject[];
|
|
15
15
|
failures?: IError[];
|
|
16
|
-
}>;
|
|
16
|
+
} | undefined>;
|
|
17
17
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.2](https://github.com/twinfoundation/trust/compare/trust-models-v0.0.3-next.1...trust-models-v0.0.3-next.2) (2025-12-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support pass through of info between verifiers ([1ce64b9](https://github.com/twinfoundation/trust/commit/1ce64b97a949278b447cc12b576ce5de537f30f3))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.1](https://github.com/twinfoundation/trust/compare/trust-models-v0.0.3-next.0...trust-models-v0.0.3-next.1) (2025-12-02)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -10,7 +10,7 @@ Interface describing a trust verifier component.
|
|
|
10
10
|
|
|
11
11
|
### verify()
|
|
12
12
|
|
|
13
|
-
> **verify**(`payload`): `Promise`\<\{ `verified`: `boolean`; `
|
|
13
|
+
> **verify**(`payload`, `info`): `Promise`\<\{ `verified`: `boolean`; `failures?`: `IError`[]; \} \| `undefined`\>
|
|
14
14
|
|
|
15
15
|
Verify a payload by checking the validity of its structure and content.
|
|
16
16
|
|
|
@@ -22,8 +22,14 @@ Verify a payload by checking the validity of its structure and content.
|
|
|
22
22
|
|
|
23
23
|
The payload to verify.
|
|
24
24
|
|
|
25
|
+
##### info
|
|
26
|
+
|
|
27
|
+
`IJsonLdNodeObject`[]
|
|
28
|
+
|
|
29
|
+
Information extracted from previous verifiers and to be added by this verifier.
|
|
30
|
+
|
|
25
31
|
#### Returns
|
|
26
32
|
|
|
27
|
-
`Promise`\<\{ `verified`: `boolean`; `
|
|
33
|
+
`Promise`\<\{ `verified`: `boolean`; `failures?`: `IError`[]; \} \| `undefined`\>
|
|
28
34
|
|
|
29
|
-
Whether the payload is verified and
|
|
35
|
+
Whether the payload is verified and possible verification failures, returns undefined if payload not processed.
|