Skip to content

Commit fcf9592

Browse files
committed
Solve lint errors
Signed-off-by: Sagar Khole <sagar.khole@ayanworks.com>
1 parent 57bc7c9 commit fcf9592

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/controllers/agent/AgentController.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
SafeW3cJsonLdVerifyCredentialOptions,
55
CustomW3cJsonLdSignCredentialOptions,
66
SignDataOptions,
7-
VerifyDataOptions
7+
VerifyDataOptions,
88
} from '../types'
99

1010
import {
@@ -15,7 +15,7 @@ import {
1515
W3cCredentialRecord,
1616
DidDocument,
1717
verkeyToPublicJwk,
18-
getKmsKeyIdForVerifiacationMethod
18+
getKmsKeyIdForVerifiacationMethod,
1919
} from '@credo-ts/core'
2020
import { Request as Req } from 'express'
2121
import 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 }

src/controllers/types.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,12 @@ export type ExtensibleW3cCredential = W3cCredential & {
466466

467467
export type CustomW3cJsonLdSignCredentialOptions = Omit<W3cJsonLdSignCredentialOptions, 'format' | 'credential'> & {
468468
credential: Omit<W3cCredential, 'context' | 'credentialSubject'> & {
469-
'@context': Array<string | Record<string, unknown>>,
469+
'@context': Array<string | Record<string, unknown>>
470470
credentialSubject: SingleOrArray<JsonObject>
471471
}
472472
[key: string]: unknown
473473
}
474474

475-
476475
export type DisclosureFrame = {
477476
[key: string]: boolean | DisclosureFrame
478477
}
@@ -555,10 +554,10 @@ export interface SchemaResponseDTO {
555554
export interface RegisterSchemaReturn {
556555
jobId?: string
557556
schemaState:
558-
| RegisterSchemaReturnStateWait
559-
| RegisterSchemaReturnStateAction
560-
| RegisterSchemaReturnStateFinished
561-
| RegisterSchemaReturnStateFailed
557+
| RegisterSchemaReturnStateWait
558+
| RegisterSchemaReturnStateAction
559+
| RegisterSchemaReturnStateFinished
560+
| RegisterSchemaReturnStateFailed
562561
schemaMetadata: Record<string, unknown>
563562
registrationMetadata: Record<string, unknown>
564563
}

0 commit comments

Comments
 (0)