Skip to content

Commit

Permalink
fix: some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
auer-martin committed Jul 25, 2024
1 parent 9202667 commit 5034468
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { parse } from 'querystring'

import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IPresentationDefinition } from '@sphereon/pex'
import { IProofType } from '@sphereon/ssi-types'

Expand All @@ -9,7 +10,6 @@ import {
RequestObject,
ResponseType,
Scope,
SigningAlgo,
SubjectIdentifierType,
SubjectType,
SupportedVersion,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IProofType } from '@sphereon/ssi-types'
import Ajv from 'ajv'
import * as dotenv from 'dotenv'
Expand All @@ -9,7 +10,6 @@ import {
RequestObject,
ResponseType,
Scope,
SigningAlgo,
SubjectType,
SupportedVersion,
VerifyAuthorizationRequestOpts,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IPresentationDefinition } from '@sphereon/pex'
import {
ICredential,
Expand All @@ -20,7 +21,6 @@ import {
ResponseMode,
ResponseType,
Scope,
SigningAlgo,
SubjectIdentifierType,
SubjectType,
SupportedVersion,
Expand Down
7 changes: 3 additions & 4 deletions packages/siop-oid4vp/lib/__tests__/DidJwtTestUtils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { JwtPayload, parseJWT, SigningAlgo } from '@sphereon/oid4vci-common'
import { VerifyCallback } from '@sphereon/wellknown-dids-client'
import { createJWT, EdDSASigner, ES256KSigner, ES256Signer, hexToBytes, JWTOptions, JWTVerifyOptions, Signer, verifyJWT } from 'did-jwt'
import { Resolvable } from 'did-resolver'

import { parseJWT } from '../helpers/jwtUtils'
import { DEFAULT_EXPIRATION_TIME, JwtPayload, ResponseIss, SigningAlgo, SIOPErrors, VerifiedJWT, VerifyJwtCallback } from '../types'
import { CreateJwtCallback } from '../types/JwtIssuer'
import { DEFAULT_EXPIRATION_TIME, ResponseIss, SIOPErrors, VerifiedJWT, VerifyJwtCallback } from '../types'

import { getResolver } from './ResolverTestUtils'

Expand Down Expand Up @@ -68,7 +67,7 @@ export const internalSignature = (hexPrivateKey: string, did: string, didUrl: st
})
}

export function getCreateJwtCallback(signature: InternalSignature): CreateJwtCallback {
export function getCreateJwtCallback(signature: InternalSignature) {
return (jwtIssuer, jwt) => {
if (jwtIssuer.method === 'did') {
const issuer = jwtIssuer.didUrl.split('#')[0]
Expand Down
2 changes: 1 addition & 1 deletion packages/siop-oid4vp/lib/__tests__/IT.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EventEmitter } from 'events'

import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IPresentationDefinition } from '@sphereon/pex'
import { CredentialMapper, IPresentation, IProofType, IVerifiableCredential, W3CVerifiablePresentation } from '@sphereon/ssi-types'
import nock from 'nock'
Expand All @@ -19,7 +20,6 @@ import {
RevocationVerification,
RP,
Scope,
SigningAlgo,
SubjectType,
SupportedVersion,
verifyRevocation,
Expand Down
2 changes: 1 addition & 1 deletion packages/siop-oid4vp/lib/__tests__/OP.request.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IProofType } from '@sphereon/ssi-types'
import nock from 'nock'

Expand All @@ -11,7 +12,6 @@ import {
ResponseType,
RP,
Scope,
SigningAlgo,
SubjectIdentifierType,
SubjectType,
SupportedVersion,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { PresentationDefinitionV1 } from '@sphereon/pex-models'
import { CredentialMapper, IPresentation, IProofType, IVerifiableCredential } from '@sphereon/ssi-types'
import { W3CVerifiablePresentation } from '@sphereon/ssi-types/src/types/w3c-vc'
Expand All @@ -14,7 +15,6 @@ import {
PresentationSignCallback,
ResponseType,
Scope,
SigningAlgo,
SubjectIdentifierType,
SubjectType,
} from '..'
Expand Down
2 changes: 1 addition & 1 deletion packages/siop-oid4vp/lib/__tests__/RP.request.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IProofType } from '@sphereon/ssi-types'

import {
Expand All @@ -8,7 +9,6 @@ import {
ResponseType,
RP,
Scope,
SigningAlgo,
SubjectIdentifierType,
SubjectType,
SupportedVersion,
Expand Down
2 changes: 1 addition & 1 deletion packages/siop-oid4vp/lib/__tests__/SdJwt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createHash } from 'node:crypto'

import { SigningAlgo } from '@sphereon/oid4vci-common'
import { IPresentationDefinition, SdJwtDecodedVerifiableCredentialWithKbJwtInput } from '@sphereon/pex'
import { OriginalVerifiableCredential } from '@sphereon/ssi-types'

Expand All @@ -16,7 +17,6 @@ import {
RevocationVerification,
RP,
Scope,
SigningAlgo,
SubjectType,
SupportedVersion,
VPTokenLocation,
Expand Down
5 changes: 1 addition & 4 deletions packages/siop-oid4vp/lib/__tests__/TestUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import crypto from 'crypto'

import { uuidv4 } from '@sphereon/oid4vci-common'
import { JwtPayload, parseJWT, SigningAlgo, uuidv4 } from '@sphereon/oid4vci-common'
import { IProofType } from '@sphereon/ssi-types'
import base58 from 'bs58'
import { ethers } from 'ethers'
Expand All @@ -11,18 +11,15 @@ import {
assertValidMetadata,
base64ToHexString,
DiscoveryMetadataPayload,
JwtPayload,
KeyCurve,
KeyType,
ResponseIss,
ResponseType,
RPRegistrationMetadataPayload,
Scope,
SigningAlgo,
SubjectSyntaxTypesSupportedValues,
SubjectType,
} from '../'
import { parseJWT } from '../helpers/jwtUtils'
import SIOPErrors from '../types/Errors'

import { DIDDocument } from './ResolverTestUtils'
Expand Down
4 changes: 2 additions & 2 deletions packages/siop-oid4vp/lib/__tests__/e2e/EBSI.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { getResolver as getKeyResolver } from '@cef-ebsi/key-did-resolver'
// import { EbsiWallet } from '@cef-ebsi/wallet-lib';
import EbsiWallet from '@cef-ebsi/wallet-lib'
import { uuidv4 } from '@sphereon/oid4vci-common'
import { SigningAlgo, uuidv4 } from '@sphereon/oid4vci-common'
import { PresentationSignCallBackParams } from '@sphereon/pex'
import { parseDid, W3CVerifiablePresentation } from '@sphereon/ssi-types'
import { Resolver } from 'did-resolver'
import { importJWK, JWK, SignJWT } from 'jose'

import { OP, SigningAlgo } from '../../'
import { OP } from '../../'
import { getCreateJwtCallback, getVerifyJwtCallback } from '../DidJwtTestUtils'

const ID_TOKEN_REQUEST_URL = 'https://api-conformance.ebsi.eu/conformance/v3/auth-mock/id_token_request'
Expand Down
11 changes: 2 additions & 9 deletions packages/siop-oid4vp/lib/__tests__/e2e/mattr.launchpad.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { PresentationSignCallBackParams, PresentationSubmissionLocation } from '@sphereon/pex'
import { W3CVerifiablePresentation } from '@sphereon/ssi-types'
import * as ed25519 from '@transmute/did-key-ed25519'
Expand All @@ -6,15 +7,7 @@ import { DIDDocument, DIDResolutionResult } from 'did-resolver'
import { importJWK, JWK, SignJWT } from 'jose'
import * as u8a from 'uint8arrays'

import {
AuthorizationRequest,
AuthorizationResponse,
OP,
PresentationDefinitionWithLocation,
PresentationExchange,
SigningAlgo,
SupportedVersion,
} from '../..'
import { AuthorizationRequest, AuthorizationResponse, OP, PresentationDefinitionWithLocation, PresentationExchange, SupportedVersion } from '../..'
import { getCreateJwtCallback, getVerifyJwtCallback } from '../DidJwtTestUtils'

export interface InitiateOfferRequest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { Format } from '@sphereon/pex-models'
import { IProofType } from '@sphereon/ssi-types'

import { SigningAlgo, SIOPErrors, supportedCredentialsFormats } from '../..'
import { SIOPErrors, supportedCredentialsFormats } from '../..'

describe('DidSiopMetadata should ', () => {
it('find supportedCredentialsFormats correctly', async function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PassBy, ResponseType, RevocationVerification, RP, Scope, SigningAlgo, SubjectType, SupportedVersion } from '../..'
import { parseJWT } from '../../helpers/jwtUtils'
import { parseJWT, SigningAlgo } from '@sphereon/oid4vci-common'

import { PassBy, ResponseType, RevocationVerification, RP, Scope, SubjectType, SupportedVersion } from '../..'
import { internalSignature } from '../DidJwtTestUtils'

const EXAMPLE_REDIRECT_URL = 'https://acme.com/hello'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SigningAlgo } from '@sphereon/oid4vci-common'
import { PresentationSignCallBackParams } from '@sphereon/pex'
import { IProofType } from '@sphereon/ssi-types'
import * as jose from 'jose'
Expand All @@ -20,7 +21,6 @@ import {
ResponseType,
RevocationVerification,
RP,
SigningAlgo,
SupportedVersion,
VPTokenLocation,
} from '../..'
Expand Down

0 comments on commit 5034468

Please sign in to comment.