diff --git a/packages/core/src/test/index.spec.ts b/packages/core/src/test/index.spec.ts index ebf93430..d2b4ff89 100644 --- a/packages/core/src/test/index.spec.ts +++ b/packages/core/src/test/index.spec.ts @@ -1,9 +1,8 @@ import { SDJwtInstance, SdJwtPayload } from '../index'; -import { Signer, Verifier } from '@sd-jwt/types'; +import { Signer, Verifier, KbVerifier, JwtPayload } from '@sd-jwt/types'; import Crypto, { KeyLike } from 'node:crypto'; import { describe, expect, test } from 'vitest'; import { digest, generateSalt } from '@sd-jwt/crypto-nodejs'; -import { KbVerifier, JwtPayload } from '@sd-jwt/types'; import { importJWK, exportJWK, JWK } from 'jose'; export const createSignerVerifier = () => { diff --git a/packages/types/src/type.ts b/packages/types/src/type.ts index b5f3918b..10223dff 100644 --- a/packages/types/src/type.ts +++ b/packages/types/src/type.ts @@ -34,6 +34,27 @@ export type KBOptions = { payload: Omit; }; +interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; +} + export interface JwtPayload { cnf?: { jwk: JsonWebKey;