@twin.org/identity-models 0.0.1-next.29 → 0.0.1-next.31
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
CHANGED
|
@@ -134,7 +134,7 @@ class VerificationHelper {
|
|
|
134
134
|
* @param jwt The token to verify.
|
|
135
135
|
* @returns The decoded payload.
|
|
136
136
|
*/
|
|
137
|
-
async verifyJwt(resolver, jwt) {
|
|
137
|
+
static async verifyJwt(resolver, jwt) {
|
|
138
138
|
core.Guards.object(VerificationHelper.CLASS_NAME, "resolver", resolver);
|
|
139
139
|
core.Guards.string(VerificationHelper.CLASS_NAME, "jwt", jwt);
|
|
140
140
|
const jwtDecoded = await web.Jwt.decode(jwt);
|
|
@@ -159,7 +159,7 @@ class VerificationHelper {
|
|
|
159
159
|
* @param secureDocument The secure document to verify.
|
|
160
160
|
* @returns True if the verification is successful.
|
|
161
161
|
*/
|
|
162
|
-
async verifyProof(resolver, secureDocument) {
|
|
162
|
+
static async verifyProof(resolver, secureDocument) {
|
|
163
163
|
core.Guards.object(VerificationHelper.CLASS_NAME, "resolver", resolver);
|
|
164
164
|
core.Guards.object(VerificationHelper.CLASS_NAME, "secureDocument", secureDocument);
|
|
165
165
|
core.Guards.object(VerificationHelper.CLASS_NAME, "secureDocument.proof", secureDocument.proof);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -132,7 +132,7 @@ class VerificationHelper {
|
|
|
132
132
|
* @param jwt The token to verify.
|
|
133
133
|
* @returns The decoded payload.
|
|
134
134
|
*/
|
|
135
|
-
async verifyJwt(resolver, jwt) {
|
|
135
|
+
static async verifyJwt(resolver, jwt) {
|
|
136
136
|
Guards.object(VerificationHelper.CLASS_NAME, "resolver", resolver);
|
|
137
137
|
Guards.string(VerificationHelper.CLASS_NAME, "jwt", jwt);
|
|
138
138
|
const jwtDecoded = await Jwt.decode(jwt);
|
|
@@ -157,7 +157,7 @@ class VerificationHelper {
|
|
|
157
157
|
* @param secureDocument The secure document to verify.
|
|
158
158
|
* @returns True if the verification is successful.
|
|
159
159
|
*/
|
|
160
|
-
async verifyProof(resolver, secureDocument) {
|
|
160
|
+
static async verifyProof(resolver, secureDocument) {
|
|
161
161
|
Guards.object(VerificationHelper.CLASS_NAME, "resolver", resolver);
|
|
162
162
|
Guards.object(VerificationHelper.CLASS_NAME, "secureDocument", secureDocument);
|
|
163
163
|
Guards.object(VerificationHelper.CLASS_NAME, "secureDocument.proof", secureDocument.proof);
|
|
@@ -15,7 +15,7 @@ export declare class VerificationHelper {
|
|
|
15
15
|
* @param jwt The token to verify.
|
|
16
16
|
* @returns The decoded payload.
|
|
17
17
|
*/
|
|
18
|
-
verifyJwt<T extends IJwtHeader, U extends IJwtPayload>(resolver: IIdentityResolverConnector, jwt: string): Promise<{
|
|
18
|
+
static verifyJwt<T extends IJwtHeader, U extends IJwtPayload>(resolver: IIdentityResolverConnector, jwt: string): Promise<{
|
|
19
19
|
header: T;
|
|
20
20
|
payload: U;
|
|
21
21
|
}>;
|
|
@@ -25,5 +25,5 @@ export declare class VerificationHelper {
|
|
|
25
25
|
* @param secureDocument The secure document to verify.
|
|
26
26
|
* @returns True if the verification is successful.
|
|
27
27
|
*/
|
|
28
|
-
verifyProof(resolver: IIdentityResolverConnector, secureDocument: IJsonLdNodeObject): Promise<boolean>;
|
|
28
|
+
static verifyProof(resolver: IIdentityResolverConnector, secureDocument: IJsonLdNodeObject): Promise<boolean>;
|
|
29
29
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -24,7 +24,7 @@ Runtime name for the class.
|
|
|
24
24
|
|
|
25
25
|
### verifyJwt()
|
|
26
26
|
|
|
27
|
-
> **verifyJwt**\<`T`, `U`\>(`resolver`, `jwt`): `Promise`\<\{ `header`: `T`; `payload`: `U`; \}\>
|
|
27
|
+
> `static` **verifyJwt**\<`T`, `U`\>(`resolver`, `jwt`): `Promise`\<\{ `header`: `T`; `payload`: `U`; \}\>
|
|
28
28
|
|
|
29
29
|
Verified the JWT.
|
|
30
30
|
|
|
@@ -58,7 +58,7 @@ The decoded payload.
|
|
|
58
58
|
|
|
59
59
|
### verifyProof()
|
|
60
60
|
|
|
61
|
-
> **verifyProof**(`resolver`, `secureDocument`): `Promise`\<`boolean`\>
|
|
61
|
+
> `static` **verifyProof**(`resolver`, `secureDocument`): `Promise`\<`boolean`\>
|
|
62
62
|
|
|
63
63
|
Verified the proof for the document e.g. verifiable credential.
|
|
64
64
|
|