@@ -4,7 +4,7 @@ import type {
44 SafeW3cJsonLdVerifyCredentialOptions ,
55 CustomW3cJsonLdSignCredentialOptions ,
66 SignDataOptions ,
7- VerifyDataOptions
7+ VerifyDataOptions ,
88} from '../types'
99
1010import {
@@ -15,7 +15,7 @@ import {
1515 W3cCredentialRecord ,
1616 DidDocument ,
1717 verkeyToPublicJwk ,
18- getKmsKeyIdForVerifiacationMethod
18+ getKmsKeyIdForVerifiacationMethod ,
1919} from '@credo-ts/core'
2020import { Request as Req } from 'express'
2121import jwt from 'jsonwebtoken'
@@ -86,7 +86,9 @@ export class AgentController extends Controller {
8686 public async verify ( @Request ( ) request : Req , @Body ( ) body : VerifyDataOptions ) : Promise < { verified : boolean } > {
8787 try {
8888 if ( ! body . data || ! body . signature || ! body . publicKeyBase58 || ! body . keyType ) {
89- throw new BadRequestError ( 'Missing required fields: data, signature, publicKeyBase58, and keyType are required.' )
89+ throw new BadRequestError (
90+ 'Missing required fields: data, signature, publicKeyBase58, and keyType are required.' ,
91+ )
9092 }
9193
9294 // Convert verkey to JWK
@@ -97,9 +99,9 @@ export class AgentController extends Controller {
9799 data : TypedArrayEncoder . fromBase64 ( body . data ) ,
98100 signature : TypedArrayEncoder . fromBase64 ( body . signature ) ,
99101 key : {
100- publicJwk : publicJwk as any
102+ publicJwk : publicJwk as any ,
101103 } ,
102- algorithm : ( ALGORITHM_MAP [ body . keyType . toLowerCase ( ) ] || body . keyType ) as any
104+ algorithm : ( ALGORITHM_MAP [ body . keyType . toLowerCase ( ) ] || body . keyType ) as any ,
103105 } )
104106
105107 return { verified : result . verified }
0 commit comments