File tree 23 files changed +96
-104
lines changed
23 files changed +96
-104
lines changed Original file line number Diff line number Diff line change 1
- import type { SupportedCredential } from '@blockchain-lab-um/oidc-types' ;
1
+ import { SupportedCredential } from '@blockchain-lab-um/oidc-types' ;
2
2
3
3
/**
4
4
* This file is used to store environment variables that are used in the app.
Original file line number Diff line number Diff line change 1
- import type {
1
+ import {
2
2
CredentialOfferRequest ,
3
3
CredentialRequest ,
4
4
CredentialResponse ,
@@ -18,10 +18,10 @@ import {
18
18
Query ,
19
19
Response ,
20
20
} from '@nestjs/common' ;
21
- import type { FastifyReply } from 'fastify' ;
21
+ import { FastifyReply } from 'fastify' ;
22
22
import qs from 'qs' ;
23
23
24
- import type { AppService } from './app.service.js' ;
24
+ import { AppService } from './app.service.js' ;
25
25
26
26
@Controller ( )
27
27
export class AppController {
Original file line number Diff line number Diff line change 1
1
import {
2
- type CredentialOffer ,
3
- type CredentialOfferRequest ,
4
- type CredentialRequest ,
5
- type SupportedCredential ,
2
+ CredentialOffer ,
3
+ CredentialOfferRequest ,
4
+ CredentialRequest ,
5
+ SupportedCredential ,
6
6
TOKEN_ERRORS ,
7
- type TokenRequest ,
8
- type TokenResponse ,
7
+ TokenRequest ,
8
+ TokenResponse ,
9
9
} from '@blockchain-lab-um/oidc-types' ;
10
10
import { qsCustomDecoder } from '@blockchain-lab-um/utils' ;
11
11
import {
12
12
FastifyAdapter ,
13
- type NestFastifyApplication ,
13
+ NestFastifyApplication ,
14
14
} from '@nestjs/platform-fastify' ;
15
- import { Test , type TestingModule } from '@nestjs/testing' ;
16
- import type { RawServerDefault } from 'fastify' ;
15
+ import { Test , TestingModule } from '@nestjs/testing' ;
16
+ import { RawServerDefault } from 'fastify' ;
17
17
import qs from 'qs' ;
18
18
import request from 'supertest' ;
19
19
Original file line number Diff line number Diff line change @@ -4,20 +4,20 @@ import {
4
4
isValidAuthorizationHeader ,
5
5
} from '@blockchain-lab-um/oidc-rp-plugin' ;
6
6
import {
7
- type CredentialOfferRequest ,
8
- type CredentialRequest ,
9
- type CredentialResponse ,
10
- type IssuerServerMetadata ,
7
+ CredentialOfferRequest ,
8
+ CredentialRequest ,
9
+ CredentialResponse ,
10
+ IssuerServerMetadata ,
11
11
TOKEN_ERRORS ,
12
- type TokenRequest ,
13
- type TokenResponse ,
12
+ TokenRequest ,
13
+ TokenResponse ,
14
14
} from '@blockchain-lab-um/oidc-types' ;
15
15
import { Injectable } from '@nestjs/common' ;
16
- import type { ConfigService } from '@nestjs/config' ;
16
+ import { ConfigService } from '@nestjs/config' ;
17
17
18
- import type { IConfig } from './config/configuration.js' ;
19
- import type { AgentService } from './modules/agent/agent.service.js' ;
20
- import type { DatastoreService } from './modules/datastore/datastore.service.js' ;
18
+ import { IConfig } from './config/configuration.js' ;
19
+ import { AgentService } from './modules/agent/agent.service.js' ;
20
+ import { DatastoreService } from './modules/datastore/datastore.service.js' ;
21
21
22
22
@Injectable ( )
23
23
export class AppService {
Original file line number Diff line number Diff line change 1
- import type { SupportedCredential } from '@blockchain-lab-um/oidc-types' ;
1
+ import { SupportedCredential } from '@blockchain-lab-um/oidc-types' ;
2
2
import { ConfigModule } from '@nestjs/config' ;
3
3
import Joi from 'joi' ;
4
4
Original file line number Diff line number Diff line change 1
1
import { DetailedError } from '@blockchain-lab-um/oidc-rp-plugin' ;
2
2
import {
3
- type ArgumentsHost ,
3
+ ArgumentsHost ,
4
4
Catch ,
5
- type ExceptionFilter ,
5
+ ExceptionFilter ,
6
6
HttpException ,
7
7
HttpStatus ,
8
8
} from '@nestjs/common' ;
9
- import type { FastifyReply } from 'fastify' ;
9
+ import { FastifyReply } from 'fastify' ;
10
10
11
11
@Catch ( )
12
12
export class AllExceptionsFilter implements ExceptionFilter {
Original file line number Diff line number Diff line change @@ -3,20 +3,20 @@ import {
3
3
getDidKeyResolver ,
4
4
} from '@blockchain-lab-um/did-provider-key' ;
5
5
import {
6
- type IOIDCRPPlugin ,
6
+ IOIDCRPPlugin ,
7
7
OIDCRPPlugin ,
8
8
isError ,
9
9
privateKeyToDid ,
10
10
} from '@blockchain-lab-um/oidc-rp-plugin' ;
11
11
import { Injectable } from '@nestjs/common' ;
12
- import type { ConfigService } from '@nestjs/config' ;
12
+ import { ConfigService } from '@nestjs/config' ;
13
13
import {
14
- type ICredentialPlugin ,
15
- type IDIDManager ,
16
- type IKeyManager ,
17
- type IResolver ,
18
- type MinimalImportableKey ,
19
- type TAgent ,
14
+ ICredentialPlugin ,
15
+ IDIDManager ,
16
+ IKeyManager ,
17
+ IResolver ,
18
+ MinimalImportableKey ,
19
+ TAgent ,
20
20
createAgent ,
21
21
} from '@veramo/core' ;
22
22
import { CredentialPlugin } from '@veramo/credential-w3c' ;
@@ -37,7 +37,7 @@ import { getResolver as getEthrResolver } from 'ethr-did-resolver';
37
37
import { DataSource } from 'typeorm' ;
38
38
39
39
import {
40
- type IConfig ,
40
+ IConfig ,
41
41
loadSupportedCredentials ,
42
42
} from '../../config/configuration.js' ;
43
43
Original file line number Diff line number Diff line change 1
- import type { Credentials } from '@blockchain-lab-um/oidc-types' ;
1
+ import { Credentials } from '@blockchain-lab-um/oidc-types' ;
2
2
3
3
export interface DataStoreObject < T > {
4
4
data : T ;
Original file line number Diff line number Diff line change 1
- import type { ConfigService } from '@nestjs/config' ;
1
+ import { ConfigService } from '@nestjs/config' ;
2
2
import { Cron , CronExpression } from '@nestjs/schedule' ;
3
3
4
- import type { IConfig } from '../../config/configuration.js' ;
5
- import type { UserSession , UserSessionStore } from './datastore.interface.js' ;
4
+ import { IConfig } from '../../config/configuration.js' ;
5
+ import { UserSession , UserSessionStore } from './datastore.interface.js' ;
6
6
7
7
export class DatastoreService {
8
8
private userSessionStore : UserSessionStore ;
Original file line number Diff line number Diff line change @@ -2,16 +2,13 @@ import {
2
2
KeyDIDProvider ,
3
3
getDidKeyResolver ,
4
4
} from '@blockchain-lab-um/did-provider-key' ;
5
+ import { IOIDCRPPlugin , OIDCRPPlugin } from '@blockchain-lab-um/oidc-rp-plugin' ;
5
6
import {
6
- type IOIDCRPPlugin ,
7
- OIDCRPPlugin ,
8
- } from '@blockchain-lab-um/oidc-rp-plugin' ;
9
- import {
10
- type ICredentialPlugin ,
11
- type IDIDManager ,
12
- type IKeyManager ,
13
- type IResolver ,
14
- type TAgent ,
7
+ ICredentialPlugin ,
8
+ IDIDManager ,
9
+ IKeyManager ,
10
+ IResolver ,
11
+ TAgent ,
15
12
createAgent ,
16
13
} from '@veramo/core' ;
17
14
import { CredentialPlugin } from '@veramo/credential-w3c' ;
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import {
3
3
isError ,
4
4
privateKeyToDid ,
5
5
} from '@blockchain-lab-um/oidc-rp-plugin' ;
6
- import type { MinimalImportableKey } from '@veramo/core' ;
6
+ import { MinimalImportableKey } from '@veramo/core' ;
7
7
import { bytesToBase64url , encodeBase64url } from '@veramo/utils' ;
8
8
import elliptic from 'elliptic' ;
9
9
import { sha256 } from 'ethereum-cryptography/sha256.js' ;
10
- import type { JWTPayload } from 'jose' ;
10
+ import { JWTPayload } from 'jose' ;
11
11
import { v4 as uuidv4 } from 'uuid' ;
12
12
13
- import type { Agent } from './testAgent.js' ;
13
+ import { Agent } from './testAgent.js' ;
14
14
15
15
const { ec : EC } = elliptic ;
16
16
Original file line number Diff line number Diff line change 1
- import type { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
1
+ import { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
2
2
3
3
/**
4
4
* This file is used to store environment variables that are used in the app.
Original file line number Diff line number Diff line change 1
- import type { AuthorizationResponse } from '@blockchain-lab-um/oidc-types' ;
1
+ import { AuthorizationResponse } from '@blockchain-lab-um/oidc-types' ;
2
2
import {
3
3
BadRequestException ,
4
4
Body ,
@@ -10,9 +10,9 @@ import {
10
10
Query ,
11
11
} from '@nestjs/common' ;
12
12
13
- import type { AuthorizationRequest } from './app.interface.js' ;
14
- import type { AppService } from './app.service.js' ;
15
- import type { VerificationResults } from './modules/datastore/datastore.interface.js' ;
13
+ import { AuthorizationRequest } from './app.interface.js' ;
14
+ import { AppService } from './app.service.js' ;
15
+ import { VerificationResults } from './modules/datastore/datastore.interface.js' ;
16
16
17
17
@Controller ( )
18
18
export class AppController {
Original file line number Diff line number Diff line change 1
- import type { AuthorizationResponse } from '@blockchain-lab-um/oidc-types' ;
1
+ import { AuthorizationResponse } from '@blockchain-lab-um/oidc-types' ;
2
2
3
3
export interface AuthorizationRequest {
4
4
credentialType : string ;
Original file line number Diff line number Diff line change 1
1
import { randomUUID } from 'node:crypto' ;
2
- import type { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
2
+ import { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
3
3
import {
4
4
FastifyAdapter ,
5
- type NestFastifyApplication ,
5
+ NestFastifyApplication ,
6
6
} from '@nestjs/platform-fastify' ;
7
- import { Test , type TestingModule } from '@nestjs/testing' ;
7
+ import { Test , TestingModule } from '@nestjs/testing' ;
8
8
import { PEX } from '@sphereon/pex' ;
9
- import type { RawServerDefault } from 'fastify' ;
9
+ import { RawServerDefault } from 'fastify' ;
10
10
import * as qs from 'qs' ;
11
11
import request from 'supertest' ;
12
12
Original file line number Diff line number Diff line change 1
1
import { DetailedError , isError } from '@blockchain-lab-um/oidc-rp-plugin' ;
2
- import type {
2
+ import {
3
3
AuthorizationResponse ,
4
4
PresentationDefinition ,
5
5
} from '@blockchain-lab-um/oidc-types' ;
6
6
import { Injectable } from '@nestjs/common' ;
7
- import type { ConfigService } from '@nestjs/config' ;
7
+ import { ConfigService } from '@nestjs/config' ;
8
8
9
- import type { AuthorizationRequest } from './app.interface.js' ;
10
- import type { IConfig } from './config/configuration.js' ;
11
- import type { AgentService } from './modules/agent/agent.service.js' ;
12
- import type { VerificationResults } from './modules/datastore/datastore.interface.js' ;
13
- import type { DatastoreService } from './modules/datastore/datastore.service.js' ;
9
+ import { AuthorizationRequest } from './app.interface.js' ;
10
+ import { IConfig } from './config/configuration.js' ;
11
+ import { AgentService } from './modules/agent/agent.service.js' ;
12
+ import { VerificationResults } from './modules/datastore/datastore.interface.js' ;
13
+ import { DatastoreService } from './modules/datastore/datastore.service.js' ;
14
14
15
15
@Injectable ( )
16
16
export class AppService {
Original file line number Diff line number Diff line change 1
- import type { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
1
+ import { PresentationDefinition } from '@blockchain-lab-um/oidc-types' ;
2
2
import { ConfigModule } from '@nestjs/config' ;
3
3
import Joi from 'joi' ;
4
4
Original file line number Diff line number Diff line change 1
1
import { DetailedError } from '@blockchain-lab-um/oidc-rp-plugin' ;
2
2
import {
3
- type ArgumentsHost ,
3
+ ArgumentsHost ,
4
4
Catch ,
5
- type ExceptionFilter ,
5
+ ExceptionFilter ,
6
6
HttpException ,
7
7
HttpStatus ,
8
8
} from '@nestjs/common' ;
9
- import type { FastifyReply } from 'fastify' ;
9
+ import { FastifyReply } from 'fastify' ;
10
10
11
11
@Catch ( )
12
12
export class AllExceptionsFilter implements ExceptionFilter {
Original file line number Diff line number Diff line change 1
- import {
2
- type IOIDCRPPlugin ,
3
- OIDCRPPlugin ,
4
- } from '@blockchain-lab-um/oidc-rp-plugin' ;
1
+ import { IOIDCRPPlugin , OIDCRPPlugin } from '@blockchain-lab-um/oidc-rp-plugin' ;
5
2
import { Injectable } from '@nestjs/common' ;
6
- import type { ConfigService } from '@nestjs/config' ;
3
+ import { ConfigService } from '@nestjs/config' ;
7
4
import {
8
- type ICredentialPlugin ,
9
- type IDIDManager ,
10
- type IKeyManager ,
11
- type IResolver ,
12
- type TAgent ,
5
+ ICredentialPlugin ,
6
+ IDIDManager ,
7
+ IKeyManager ,
8
+ IResolver ,
9
+ TAgent ,
13
10
createAgent ,
14
11
} from '@veramo/core' ;
15
12
import {
16
13
CredentialIssuerEIP712 ,
17
- type ICredentialIssuerEIP712 ,
14
+ ICredentialIssuerEIP712 ,
18
15
} from '@veramo/credential-eip712' ;
19
16
import {
20
17
CredentialIssuerLD ,
21
- type ICredentialIssuerLD ,
18
+ ICredentialIssuerLD ,
22
19
LdDefaultContexts ,
23
20
VeramoEcdsaSecp256k1RecoverySignature2020 ,
24
21
VeramoEd25519Signature2018 ,
@@ -41,7 +38,7 @@ import { Resolver } from 'did-resolver';
41
38
import { getResolver as getEthrResolver } from 'ethr-did-resolver' ;
42
39
import { DataSource } from 'typeorm' ;
43
40
44
- import type { IConfig } from '../../config/configuration.js' ;
41
+ import { IConfig } from '../../config/configuration.js' ;
45
42
46
43
@Injectable ( )
47
44
export class AgentService {
Original file line number Diff line number Diff line change 1
- import type { ConfigService } from '@nestjs/config' ;
1
+ import { ConfigService } from '@nestjs/config' ;
2
2
import { Cron , CronExpression } from '@nestjs/schedule' ;
3
3
4
- import type { IConfig } from '../../config/configuration.js' ;
5
- import type {
4
+ import { IConfig } from '../../config/configuration.js' ;
5
+ import {
6
6
UserSession ,
7
7
UserSessionStore ,
8
8
VerificationResults ,
Original file line number Diff line number Diff line change
1
+ import { IOIDCRPPlugin , OIDCRPPlugin } from '@blockchain-lab-um/oidc-rp-plugin' ;
1
2
import {
2
- type IOIDCRPPlugin ,
3
- OIDCRPPlugin ,
4
- } from '@blockchain-lab-um/oidc-rp-plugin' ;
5
- import {
6
- type ICredentialPlugin ,
7
- type IDIDManager ,
8
- type IKeyManager ,
9
- type IResolver ,
10
- type TAgent ,
3
+ ICredentialPlugin ,
4
+ IDIDManager ,
5
+ IKeyManager ,
6
+ IResolver ,
7
+ TAgent ,
11
8
createAgent ,
12
9
} from '@veramo/core' ;
13
10
import {
14
11
CredentialIssuerEIP712 ,
15
- type ICredentialIssuerEIP712 ,
12
+ ICredentialIssuerEIP712 ,
16
13
} from '@veramo/credential-eip712' ;
17
14
import {
18
15
CredentialIssuerLD ,
19
- type ICredentialIssuerLD ,
16
+ ICredentialIssuerLD ,
20
17
LdDefaultContexts ,
21
18
VeramoEcdsaSecp256k1RecoverySignature2020 ,
22
19
VeramoEd25519Signature2018 ,
Original file line number Diff line number Diff line change 1
1
import { isError , privateKeyToDid } from '@blockchain-lab-um/oidc-rp-plugin' ;
2
- import type { IIdentifier , MinimalImportableKey } from '@veramo/core' ;
2
+ import { IIdentifier , MinimalImportableKey } from '@veramo/core' ;
3
3
import { bytesToBase64url , encodeBase64url } from '@veramo/utils' ;
4
4
import elliptic from 'elliptic' ;
5
5
import { sha256 } from 'ethereum-cryptography/sha256.js' ;
6
- import type { JWTPayload } from 'jose' ;
6
+ import { JWTPayload } from 'jose' ;
7
7
import { v4 as uuidv4 } from 'uuid' ;
8
8
9
- import type { Agent } from './testAgent.js' ;
9
+ import { Agent } from './testAgent.js' ;
10
10
11
11
const { ec : EC } = elliptic ;
12
12
You can’t perform that action at this time.
0 commit comments