@twin.org/trust-models 0.0.3-next.4 → 0.0.3-next.6
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/es/helpers/trustHelper.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/ITrustComponent.js.map +1 -1
- package/dist/es/models/ITrustGenerator.js.map +1 -1
- package/dist/es/models/ITrustVerificationInfo.js +4 -0
- package/dist/es/models/ITrustVerificationInfo.js.map +1 -0
- package/dist/es/models/ITrustVerifier.js.map +1 -1
- package/dist/types/helpers/trustHelper.d.ts +2 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/ITrustComponent.d.ts +5 -5
- package/dist/types/models/ITrustGenerator.d.ts +2 -1
- package/dist/types/models/ITrustVerificationInfo.d.ts +10 -0
- package/dist/types/models/ITrustVerifier.d.ts +3 -3
- package/docs/changelog.md +14 -0
- package/docs/reference/classes/TrustHelper.md +2 -2
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/ITrustComponent.md +11 -5
- package/docs/reference/interfaces/ITrustGenerator.md +7 -1
- package/docs/reference/interfaces/ITrustVerificationInfo.md +15 -0
- package/docs/reference/interfaces/ITrustVerifier.md +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustHelper.js","sourceRoot":"","sources":["../../../src/helpers/trustHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"trustHelper.js","sourceRoot":"","sources":["../../../src/helpers/trustHelper.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKnD;;GAEG;AACH,MAAM,OAAO,WAAW;IACvB;;OAEG;IACI,MAAM,CAAU,UAAU,iBAAiC;IAElE;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,WAAW,CAC9B,SAA0B,EAC1B,YAAqB,EACrB,MAAc,EACd,iBAA4B;QAE5B,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;QAC5E,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC3B,MAAM,IAAI,iBAAiB,CAAC,WAAW,CAAC,UAAU,EAAE,mBAAmB,EAAE;gBACxE,MAAM;gBACN,MAAM,EAAE,WAAW,CAAC,MAAM;aAC1B,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC;IACzB,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { UnauthorizedError } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { ITrustComponent } from \"../models/ITrustComponent.js\";\nimport type { ITrustVerificationInfo } from \"../models/ITrustVerificationInfo.js\";\n\n/**\n * Helper class for trust-related operations.\n */\nexport class TrustHelper {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<TrustHelper>();\n\n\t/**\n\t * Verify the trust payload for the action.\n\t * @param component The trust component to use.\n\t * @param trustPayload The trust payload to verify.\n\t * @param action The action being performed.\n\t * @param overrideVerifiers List of verifiers to use instead of the default ones.\n\t * @returns The information from the trust verification.\n\t */\n\tpublic static async verifyTrust(\n\t\tcomponent: ITrustComponent,\n\t\ttrustPayload: unknown,\n\t\taction: string,\n\t\toverrideVerifiers?: string[]\n\t): Promise<ITrustVerificationInfo | undefined> {\n\t\tconst trustResult = await component.verify(trustPayload, overrideVerifiers);\n\t\tif (!trustResult.verified) {\n\t\t\tthrow new UnauthorizedError(TrustHelper.CLASS_NAME, \"trustVerifyFailed\", {\n\t\t\t\taction,\n\t\t\t\terrors: trustResult.errors\n\t\t\t});\n\t\t}\n\t\treturn trustResult.info;\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export * from "./factories/trustVerifierFactory.js";
|
|
|
5
5
|
export * from "./helpers/trustHelper.js";
|
|
6
6
|
export * from "./models/ITrustComponent.js";
|
|
7
7
|
export * from "./models/ITrustGenerator.js";
|
|
8
|
+
export * from "./models/ITrustVerificationInfo.js";
|
|
8
9
|
export * from "./models/ITrustVerifier.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
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,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/trustGeneratorFactory.js\";\nexport * from \"./factories/trustVerifierFactory.js\";\nexport * from \"./helpers/trustHelper.js\";\nexport * from \"./models/ITrustComponent.js\";\nexport * from \"./models/ITrustGenerator.js\";\nexport * from \"./models/ITrustVerifier.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./factories/trustGeneratorFactory.js\";\nexport * from \"./factories/trustVerifierFactory.js\";\nexport * from \"./helpers/trustHelper.js\";\nexport * from \"./models/ITrustComponent.js\";\nexport * from \"./models/ITrustGenerator.js\";\nexport * from \"./models/ITrustVerificationInfo.js\";\nexport * from \"./models/ITrustVerifier.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITrustComponent.js","sourceRoot":"","sources":["../../../src/models/ITrustComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent, IError } from \"@twin.org/core\";\n\n/**\n * Interface describing a trust component.\n */\nexport interface ITrustComponent extends IComponent {\n\t/**\n\t * Verify a payload by checking the validity of its structure and content using the registered verifiers.\n\t * @param payload The payload to verify.\n\t * @param overrideVerifiers List of verifiers to use instead of the default ones.\n\t * @returns Whether the payload is verified and any additional information extracted from the payload, or errors.\n\t */\n\tverify(\n\t\tpayload: unknown,\n\t\toverrideVerifiers?: string[]\n\t): Promise<{\n\t\tverified: boolean;\n\t\tinfo?:
|
|
1
|
+
{"version":3,"file":"ITrustComponent.js","sourceRoot":"","sources":["../../../src/models/ITrustComponent.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 { ITrustVerificationInfo } from \"./ITrustVerificationInfo.js\";\n\n/**\n * Interface describing a trust component.\n */\nexport interface ITrustComponent extends IComponent {\n\t/**\n\t * Verify a payload by checking the validity of its structure and content using the registered verifiers.\n\t * @param payload The payload to verify.\n\t * @param overrideVerifiers List of verifiers to use instead of the default ones.\n\t * @returns Whether the payload is verified and any additional information extracted from the payload, or errors.\n\t */\n\tverify(\n\t\tpayload: unknown,\n\t\toverrideVerifiers?: string[]\n\t): Promise<{\n\t\tverified: boolean;\n\t\tinfo?: ITrustVerificationInfo;\n\t\terrors?: IError[];\n\t}>;\n\n\t/**\n\t * Generate a payload using the specified generators.\n\t * @param identity The identity for which to generate the payload.\n\t * @param generatorType The type of generator to use, defaults to the default generator type or first in factory.\n\t * @param info Optional information to include in the generated payload.\n\t * @returns The generated payload.\n\t */\n\tgenerate(\n\t\tidentity: string,\n\t\tgeneratorType?: string,\n\t\tinfo?: { [key: string]: unknown }\n\t): Promise<unknown>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITrustGenerator.js","sourceRoot":"","sources":["../../../src/models/ITrustGenerator.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing a trust generator component.\n */\nexport interface ITrustGenerator extends IComponent {\n\t/**\n\t * Generate a trust payload.\n\t * @param info Information to use in the generation.\n\t * @returns The generated payload.\n\t */\n\tgenerate(info?: { [key: string]: unknown }): Promise<unknown>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ITrustGenerator.js","sourceRoot":"","sources":["../../../src/models/ITrustGenerator.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing a trust generator component.\n */\nexport interface ITrustGenerator extends IComponent {\n\t/**\n\t * Generate a trust payload.\n\t * @param identity The identity for which to generate the payload.\n\t * @param info Information to use in the generation.\n\t * @returns The generated payload.\n\t */\n\tgenerate(identity: string, info?: { [key: string]: unknown }): Promise<unknown>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITrustVerificationInfo.js","sourceRoot":"","sources":["../../../src/models/ITrustVerificationInfo.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing a trust verifier information.\n */\nexport interface ITrustVerificationInfo {\n\t[key: string]: unknown;\n\n\t/**\n\t * The identity associated with the payload.\n\t */\n\tidentity: string;\n}\n"]}
|
|
@@ -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\";\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 * @param errors Array to collect verification errors.\n\t * @returns Whether the payload is verified, returns undefined if payload was not processed.\n\t */\n\tverify(\n\t\tpayload: unknown,\n\t\tinfo:
|
|
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 { ITrustVerificationInfo } from \"./ITrustVerificationInfo.js\";\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 * @param info.identity The identity associated with the payload.\n\t * @param errors Array to collect verification errors.\n\t * @returns Whether the payload is verified, returns undefined if payload was not processed.\n\t */\n\tverify(\n\t\tpayload: unknown,\n\t\tinfo: ITrustVerificationInfo,\n\t\terrors: IError[]\n\t): Promise<boolean | undefined>;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ITrustComponent } from "../models/ITrustComponent.js";
|
|
2
|
+
import type { ITrustVerificationInfo } from "../models/ITrustVerificationInfo.js";
|
|
2
3
|
/**
|
|
3
4
|
* Helper class for trust-related operations.
|
|
4
5
|
*/
|
|
@@ -15,7 +16,5 @@ export declare class TrustHelper {
|
|
|
15
16
|
* @param overrideVerifiers List of verifiers to use instead of the default ones.
|
|
16
17
|
* @returns The information from the trust verification.
|
|
17
18
|
*/
|
|
18
|
-
static verifyTrust(component: ITrustComponent, trustPayload: unknown, action: string, overrideVerifiers?: string[]): Promise<
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
} | undefined>;
|
|
19
|
+
static verifyTrust(component: ITrustComponent, trustPayload: unknown, action: string, overrideVerifiers?: string[]): Promise<ITrustVerificationInfo | undefined>;
|
|
21
20
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export * from "./factories/trustVerifierFactory.js";
|
|
|
3
3
|
export * from "./helpers/trustHelper.js";
|
|
4
4
|
export * from "./models/ITrustComponent.js";
|
|
5
5
|
export * from "./models/ITrustGenerator.js";
|
|
6
|
+
export * from "./models/ITrustVerificationInfo.js";
|
|
6
7
|
export * from "./models/ITrustVerifier.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IComponent, IError } from "@twin.org/core";
|
|
2
|
+
import type { ITrustVerificationInfo } from "./ITrustVerificationInfo.js";
|
|
2
3
|
/**
|
|
3
4
|
* Interface describing a trust component.
|
|
4
5
|
*/
|
|
@@ -11,18 +12,17 @@ export interface ITrustComponent extends IComponent {
|
|
|
11
12
|
*/
|
|
12
13
|
verify(payload: unknown, overrideVerifiers?: string[]): Promise<{
|
|
13
14
|
verified: boolean;
|
|
14
|
-
info?:
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
};
|
|
15
|
+
info?: ITrustVerificationInfo;
|
|
17
16
|
errors?: IError[];
|
|
18
17
|
}>;
|
|
19
18
|
/**
|
|
20
19
|
* Generate a payload using the specified generators.
|
|
21
|
-
* @param
|
|
20
|
+
* @param identity The identity for which to generate the payload.
|
|
21
|
+
* @param generatorType The type of generator to use, defaults to the default generator type or first in factory.
|
|
22
22
|
* @param info Optional information to include in the generated payload.
|
|
23
23
|
* @returns The generated payload.
|
|
24
24
|
*/
|
|
25
|
-
generate(
|
|
25
|
+
generate(identity: string, generatorType?: string, info?: {
|
|
26
26
|
[key: string]: unknown;
|
|
27
27
|
}): Promise<unknown>;
|
|
28
28
|
}
|
|
@@ -5,10 +5,11 @@ import type { IComponent } from "@twin.org/core";
|
|
|
5
5
|
export interface ITrustGenerator extends IComponent {
|
|
6
6
|
/**
|
|
7
7
|
* Generate a trust payload.
|
|
8
|
+
* @param identity The identity for which to generate the payload.
|
|
8
9
|
* @param info Information to use in the generation.
|
|
9
10
|
* @returns The generated payload.
|
|
10
11
|
*/
|
|
11
|
-
generate(info?: {
|
|
12
|
+
generate(identity: string, info?: {
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}): Promise<unknown>;
|
|
14
15
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IComponent, IError } from "@twin.org/core";
|
|
2
|
+
import type { ITrustVerificationInfo } from "./ITrustVerificationInfo.js";
|
|
2
3
|
/**
|
|
3
4
|
* Interface describing a trust verifier component.
|
|
4
5
|
*/
|
|
@@ -7,10 +8,9 @@ export interface ITrustVerifier extends IComponent {
|
|
|
7
8
|
* Verify a payload by checking the validity of its structure and content.
|
|
8
9
|
* @param payload The payload to verify.
|
|
9
10
|
* @param info Information extracted from previous verifiers and to be added by this verifier.
|
|
11
|
+
* @param info.identity The identity associated with the payload.
|
|
10
12
|
* @param errors Array to collect verification errors.
|
|
11
13
|
* @returns Whether the payload is verified, returns undefined if payload was not processed.
|
|
12
14
|
*/
|
|
13
|
-
verify(payload: unknown, info:
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}, errors: IError[]): Promise<boolean | undefined>;
|
|
15
|
+
verify(payload: unknown, info: ITrustVerificationInfo, errors: IError[]): Promise<boolean | undefined>;
|
|
16
16
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/trust/compare/trust-models-v0.0.3-next.5...trust-models-v0.0.3-next.6) (2025-12-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* always include identity in verification info ([9594d19](https://github.com/twinfoundation/trust/commit/9594d19e9d718bd42b82964750ae3bcfb7df51bf))
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/trust/compare/trust-models-v0.0.3-next.4...trust-models-v0.0.3-next.5) (2025-12-04)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add default generator config ([54d98ba](https://github.com/twinfoundation/trust/commit/54d98ba53b7450b56337daeda504437be0d21943))
|
|
16
|
+
|
|
3
17
|
## [0.0.3-next.4](https://github.com/twinfoundation/trust/compare/trust-models-v0.0.3-next.3...trust-models-v0.0.3-next.4) (2025-12-04)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -24,7 +24,7 @@ Runtime name for the class.
|
|
|
24
24
|
|
|
25
25
|
### verifyTrust()
|
|
26
26
|
|
|
27
|
-
> `static` **verifyTrust**(`component`, `trustPayload`, `action`, `overrideVerifiers?`): `Promise
|
|
27
|
+
> `static` **verifyTrust**(`component`, `trustPayload`, `action`, `overrideVerifiers?`): `Promise`\<[`ITrustVerificationInfo`](../interfaces/ITrustVerificationInfo.md) \| `undefined`\>
|
|
28
28
|
|
|
29
29
|
Verify the trust payload for the action.
|
|
30
30
|
|
|
@@ -56,6 +56,6 @@ List of verifiers to use instead of the default ones.
|
|
|
56
56
|
|
|
57
57
|
#### Returns
|
|
58
58
|
|
|
59
|
-
`Promise
|
|
59
|
+
`Promise`\<[`ITrustVerificationInfo`](../interfaces/ITrustVerificationInfo.md) \| `undefined`\>
|
|
60
60
|
|
|
61
61
|
The information from the trust verification.
|
package/docs/reference/index.md
CHANGED
|
@@ -10,7 +10,7 @@ Interface describing a trust component.
|
|
|
10
10
|
|
|
11
11
|
### verify()
|
|
12
12
|
|
|
13
|
-
> **verify**(`payload`, `overrideVerifiers?`): `Promise`\<\{ `verified`: `boolean`; `info?`:
|
|
13
|
+
> **verify**(`payload`, `overrideVerifiers?`): `Promise`\<\{ `verified`: `boolean`; `info?`: [`ITrustVerificationInfo`](ITrustVerificationInfo.md); `errors?`: `IError`[]; \}\>
|
|
14
14
|
|
|
15
15
|
Verify a payload by checking the validity of its structure and content using the registered verifiers.
|
|
16
16
|
|
|
@@ -30,7 +30,7 @@ List of verifiers to use instead of the default ones.
|
|
|
30
30
|
|
|
31
31
|
#### Returns
|
|
32
32
|
|
|
33
|
-
`Promise`\<\{ `verified`: `boolean`; `info?`:
|
|
33
|
+
`Promise`\<\{ `verified`: `boolean`; `info?`: [`ITrustVerificationInfo`](ITrustVerificationInfo.md); `errors?`: `IError`[]; \}\>
|
|
34
34
|
|
|
35
35
|
Whether the payload is verified and any additional information extracted from the payload, or errors.
|
|
36
36
|
|
|
@@ -38,17 +38,23 @@ Whether the payload is verified and any additional information extracted from th
|
|
|
38
38
|
|
|
39
39
|
### generate()
|
|
40
40
|
|
|
41
|
-
> **generate**(`
|
|
41
|
+
> **generate**(`identity`, `generatorType?`, `info?`): `Promise`\<`unknown`\>
|
|
42
42
|
|
|
43
43
|
Generate a payload using the specified generators.
|
|
44
44
|
|
|
45
45
|
#### Parameters
|
|
46
46
|
|
|
47
|
-
#####
|
|
47
|
+
##### identity
|
|
48
48
|
|
|
49
49
|
`string`
|
|
50
50
|
|
|
51
|
-
The
|
|
51
|
+
The identity for which to generate the payload.
|
|
52
|
+
|
|
53
|
+
##### generatorType?
|
|
54
|
+
|
|
55
|
+
`string`
|
|
56
|
+
|
|
57
|
+
The type of generator to use, defaults to the default generator type or first in factory.
|
|
52
58
|
|
|
53
59
|
##### info?
|
|
54
60
|
|
|
@@ -10,12 +10,18 @@ Interface describing a trust generator component.
|
|
|
10
10
|
|
|
11
11
|
### generate()
|
|
12
12
|
|
|
13
|
-
> **generate**(`info?`): `Promise`\<`unknown`\>
|
|
13
|
+
> **generate**(`identity`, `info?`): `Promise`\<`unknown`\>
|
|
14
14
|
|
|
15
15
|
Generate a trust payload.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
+
##### identity
|
|
20
|
+
|
|
21
|
+
`string`
|
|
22
|
+
|
|
23
|
+
The identity for which to generate the payload.
|
|
24
|
+
|
|
19
25
|
##### info?
|
|
20
26
|
|
|
21
27
|
Information to use in the generation.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Interface: ITrustVerificationInfo
|
|
2
|
+
|
|
3
|
+
Interface describing a trust verifier information.
|
|
4
|
+
|
|
5
|
+
## Indexable
|
|
6
|
+
|
|
7
|
+
\[`key`: `string`\]: `unknown`
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### identity
|
|
12
|
+
|
|
13
|
+
> **identity**: `string`
|
|
14
|
+
|
|
15
|
+
The identity associated with the payload.
|