diff --git a/packages/callback-example/lib/__tests__/issuerCallback.spec.ts b/packages/callback-example/lib/__tests__/issuerCallback.spec.ts index 8cc083bc..92692e10 100644 --- a/packages/callback-example/lib/__tests__/issuerCallback.spec.ts +++ b/packages/callback-example/lib/__tests__/issuerCallback.spec.ts @@ -1,5 +1,6 @@ import { KeyObject } from 'crypto' +import { uuidv4 } from '@sphereon/common' import { CredentialRequestClientBuilder, ProofOfPossessionBuilder } from '@sphereon/oid4vci-client' import { Alg, @@ -14,7 +15,6 @@ import { OpenId4VCIVersion, ProofOfPossession, } from '@sphereon/oid4vci-common' -import { uuidv4 } from '@sphereon/oid4vci-common' import { CredentialOfferSession } from '@sphereon/oid4vci-common/dist' import { CredentialSupportedBuilderV1_13, VcIssuer, VcIssuerBuilder } from '@sphereon/oid4vci-issuer' import { MemoryStates } from '@sphereon/oid4vci-issuer' diff --git a/packages/callback-example/package.json b/packages/callback-example/package.json index 84ea6044..bd797f99 100644 --- a/packages/callback-example/package.json +++ b/packages/callback-example/package.json @@ -10,6 +10,7 @@ "build:clean": "tsc --build --clean && tsc --build" }, "dependencies": { + "@sphereon/common": "workspace:*", "@digitalcredentials/did-method-key": "^2.0.3", "@digitalcredentials/ed25519-signature-2020": "^3.0.2", "@digitalcredentials/ed25519-verification-key-2020": "^4.0.0", diff --git a/packages/client/lib/AccessTokenClient.ts b/packages/client/lib/AccessTokenClient.ts index 13d8f3a5..fab8186d 100644 --- a/packages/client/lib/AccessTokenClient.ts +++ b/packages/client/lib/AccessTokenClient.ts @@ -1,3 +1,4 @@ +import { createDPoP, CreateDPoPClientOpts } from '@sphereon/common'; import { AccessTokenRequest, AccessTokenRequestOpts, @@ -6,8 +7,6 @@ import { AuthorizationServerOpts, AuthzFlowType, convertJsonToURI, - createDPoP, - CreateDPoPClientOpts, EndpointMetadata, formPost, getIssuerFromCredentialOfferPayload, diff --git a/packages/client/lib/AccessTokenClientV1_0_11.ts b/packages/client/lib/AccessTokenClientV1_0_11.ts index a94833c7..6a5be3e1 100644 --- a/packages/client/lib/AccessTokenClientV1_0_11.ts +++ b/packages/client/lib/AccessTokenClientV1_0_11.ts @@ -1,3 +1,4 @@ +import { createDPoP, CreateDPoPClientOpts } from '@sphereon/common'; import { AccessTokenRequest, AccessTokenRequestOpts, @@ -6,8 +7,6 @@ import { AuthorizationServerOpts, AuthzFlowType, convertJsonToURI, - createDPoP, - CreateDPoPClientOpts, CredentialOfferV1_0_11, CredentialOfferV1_0_13, EndpointMetadata, diff --git a/packages/client/lib/CredentialRequestClient.ts b/packages/client/lib/CredentialRequestClient.ts index f987e9bb..75a58df7 100644 --- a/packages/client/lib/CredentialRequestClient.ts +++ b/packages/client/lib/CredentialRequestClient.ts @@ -1,7 +1,6 @@ +import { createDPoP, CreateDPoPClientOpts } from '@sphereon/common'; import { acquireDeferredCredential, - createDPoP, - CreateDPoPClientOpts, CredentialRequestV1_0_13, CredentialResponse, getCredentialRequestForVersion, diff --git a/packages/client/lib/CredentialRequestClientV1_0_11.ts b/packages/client/lib/CredentialRequestClientV1_0_11.ts index 8e8ea44f..e05debf9 100644 --- a/packages/client/lib/CredentialRequestClientV1_0_11.ts +++ b/packages/client/lib/CredentialRequestClientV1_0_11.ts @@ -1,7 +1,6 @@ +import { createDPoP, CreateDPoPClientOpts } from '@sphereon/common'; import { acquireDeferredCredential, - createDPoP, - CreateDPoPClientOpts, CredentialResponse, getCredentialRequestForVersion, getUniformFormat, diff --git a/packages/client/lib/OpenID4VCIClient.ts b/packages/client/lib/OpenID4VCIClient.ts index 9f14b5ef..e764804d 100644 --- a/packages/client/lib/OpenID4VCIClient.ts +++ b/packages/client/lib/OpenID4VCIClient.ts @@ -1,3 +1,4 @@ +import { JWK } from '@sphereon/common'; import { AccessTokenResponse, Alg, @@ -23,7 +24,6 @@ import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject, - JWK, KID_JWK_X5C_ERROR, NotificationRequest, NotificationResult, diff --git a/packages/client/lib/OpenID4VCIClientV1_0_11.ts b/packages/client/lib/OpenID4VCIClientV1_0_11.ts index 61021bf8..d88cfa72 100644 --- a/packages/client/lib/OpenID4VCIClientV1_0_11.ts +++ b/packages/client/lib/OpenID4VCIClientV1_0_11.ts @@ -1,3 +1,4 @@ +import { JWK } from '@sphereon/common'; import { AccessTokenResponse, Alg, @@ -19,7 +20,6 @@ import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject, - JWK, KID_JWK_X5C_ERROR, OID4VCICredentialFormat, OpenId4VCIVersion, diff --git a/packages/client/lib/OpenID4VCIClientV1_0_13.ts b/packages/client/lib/OpenID4VCIClientV1_0_13.ts index 5b966336..8fbc62fa 100644 --- a/packages/client/lib/OpenID4VCIClientV1_0_13.ts +++ b/packages/client/lib/OpenID4VCIClientV1_0_13.ts @@ -1,3 +1,4 @@ +import { JWK } from '@sphereon/common'; import { AccessTokenResponse, Alg, @@ -17,7 +18,6 @@ import { getIssuerFromCredentialOfferPayload, getSupportedCredentials, getTypesFromCredentialSupported, - JWK, KID_JWK_X5C_ERROR, NotificationRequest, NotificationResult, diff --git a/packages/client/lib/ProofOfPossessionBuilder.ts b/packages/client/lib/ProofOfPossessionBuilder.ts index c51874d1..37bfc6e4 100644 --- a/packages/client/lib/ProofOfPossessionBuilder.ts +++ b/packages/client/lib/ProofOfPossessionBuilder.ts @@ -1,9 +1,9 @@ +import { JWK } from '@sphereon/common'; import { AccessTokenResponse, Alg, createProofOfPossession, EndpointMetadata, - JWK, Jwt, NO_JWT_PROVIDED, OpenId4VCIVersion, diff --git a/packages/client/lib/__tests__/SphereonE2E.spec.test.ts b/packages/client/lib/__tests__/SphereonE2E.spec.test.ts index 3952fce7..a28bea1f 100644 --- a/packages/client/lib/__tests__/SphereonE2E.spec.test.ts +++ b/packages/client/lib/__tests__/SphereonE2E.spec.test.ts @@ -1,6 +1,7 @@ import * as crypto from 'crypto'; -import { Alg, Jwt, ProofOfPossessionCallbacks, uuidv4 } from '@sphereon/oid4vci-common'; +import { uuidv4 } from '@sphereon/common'; +import { Alg, Jwt, ProofOfPossessionCallbacks } from '@sphereon/oid4vci-common'; import { CredentialMapper } from '@sphereon/ssi-types'; import * as didts from '@transmute/did-key.js'; import { fetch } from 'cross-fetch'; diff --git a/packages/client/lib/functions/AccessTokenUtil.ts b/packages/client/lib/functions/AccessTokenUtil.ts index 7528fef6..e60f5998 100644 --- a/packages/client/lib/functions/AccessTokenUtil.ts +++ b/packages/client/lib/functions/AccessTokenUtil.ts @@ -1,4 +1,5 @@ -import { AccessTokenRequest, AccessTokenRequestOpts, Jwt, OpenId4VCIVersion, uuidv4 } from '@sphereon/oid4vci-common'; +import { uuidv4 } from '@sphereon/common'; +import { AccessTokenRequest, AccessTokenRequestOpts, Jwt, OpenId4VCIVersion } from '@sphereon/oid4vci-common'; import { ProofOfPossessionBuilder } from '../ProofOfPossessionBuilder'; diff --git a/packages/client/package.json b/packages/client/package.json index 9cf2eb50..5070c723 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -15,6 +15,7 @@ "build": "tsc" }, "dependencies": { + "@sphereon/common": "workspace:*", "@sphereon/oid4vci-common": "workspace:*", "@sphereon/ssi-types": "0.28.0", "cross-fetch": "^3.1.8", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md new file mode 100644 index 00000000..dd5c47e1 --- /dev/null +++ b/packages/common/CHANGELOG.md @@ -0,0 +1,172 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.15.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.15.0...v0.15.1) (2024-07-23) + +### Bug Fixes + +- oid4vci draft 13 typing ([6d0bfc9](https://github.com/Sphereon-Opensource/OID4VCI/commit/6d0bfc9227b1120913b773904ef991757cb9282a)) + +# [0.15.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.14.0...v0.15.0) (2024-07-15) + +### Features + +- did-auth-siop-adapter ([32ec2fc](https://github.com/Sphereon-Opensource/OID4VCI/commit/32ec2fc27a22cd069dc12fe011debef7f870cf5d)) + +# [0.14.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.13.0...v0.14.0) (2024-07-06) + +### Features + +- Enable tx_code support for the issuer, and properly handle both the old userPin and tx_code on the client side. fixes [#117](https://github.com/Sphereon-Opensource/OID4VCI/issues/117) ([e54071c](https://github.com/Sphereon-Opensource/OID4VCI/commit/e54071c65b00ef921acafa2c2c73707a3bc33a44)) + +# [0.13.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.12.0...v0.13.0) (2024-07-03) + +### Bug Fixes + +- Make sure we use 'JWT' as typ instead of the lower case version as suggested in the JWT RFC. ([1ff4e40](https://github.com/Sphereon-Opensource/OID4VCI/commit/1ff4e40cefb183072951e3ede3f8b3a5842d645a)) + +### Features + +- add get types from offer function to get the types from multiple versions of credential offers ([b966d8c](https://github.com/Sphereon-Opensource/OID4VCI/commit/b966d8c75bb3df36e816706b961e749b86ae1586)) +- Add support for jwt-bearer client assertions in access token ([ab4905c](https://github.com/Sphereon-Opensource/OID4VCI/commit/ab4905ce7b4465b0c8adce6140209fb2c39f1469)) +- added a facade for CredentialRequestClientBuilder and adjusted the tests ([30cddd3](https://github.com/Sphereon-Opensource/OID4VCI/commit/30cddd3af544e97047d27f48d1d76ce16f80a79b)) +- added x5c support and made sure that we support request-responses without dids ([27bc1d9](https://github.com/Sphereon-Opensource/OID4VCI/commit/27bc1d9522fa74d8016dced63fa415efb6c4eebc)) +- Allow to pass in custom access token request params ([1a469f9](https://github.com/Sphereon-Opensource/OID4VCI/commit/1a469f9f1f07dc54facf831b3336eb706cb0fe7a)) + +# [0.12.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.10.3...v0.12.0) (2024-06-19) + +### Bug Fixes + +- (WIP) fixed all the build errors ([e522a3d](https://github.com/Sphereon-Opensource/OID4VCI/commit/e522a3dd5821fb710211e35c8871f89772b672a0)) +- (WIP) refactored and fixed build. still have to fix 33 test cases that are failing ([ff88a64](https://github.com/Sphereon-Opensource/OID4VCI/commit/ff88a647574baa9813939c296342cc112d00237f)) +- (WIP) refactored and fixed build. still have to fix 8 test cases that are failing ([d8c2c4f](https://github.com/Sphereon-Opensource/OID4VCI/commit/d8c2c4fa8d73ea14a0faa823a394cde23733db8f)) +- (WIP) refactored and fixed parts of the logic for v1_0_13. ([06117c0](https://github.com/Sphereon-Opensource/OID4VCI/commit/06117c0fd9a06170284ce5a89075d5b12fcd7d7b)) +- added back optional vct to CredentialConfigurationSupportedV1_0_13 for sd-jwt ([88341ef](https://github.com/Sphereon-Opensource/OID4VCI/commit/88341ef186c5c2842bf16729ab5c02fae9f22999)) +- added back the isEbsi function to the new version's OpenID4VCIClient ([479bea7](https://github.com/Sphereon-Opensource/OID4VCI/commit/479bea791e2d82a1e564e08a569f4caf205e1cc1)) +- added generic union types for frequently used types ([72474d6](https://github.com/Sphereon-Opensource/OID4VCI/commit/72474d6b95d58914d31ee36875feace8f0432942)) +- added generic union types for frequently used types ([f10d0b2](https://github.com/Sphereon-Opensource/OID4VCI/commit/f10d0b22c4a1c4f6d57fe21d5a7d659f35a3fc27)) +- Ensure we have a single client that handles both v13 and v11 and lower ([eadbba0](https://github.com/Sphereon-Opensource/OID4VCI/commit/eadbba03ddb6e9e32b69bb3a4d9eb9ca8ac2d260)) +- fixed some issue in the IssuerMetadataUtils ([8a6c16f](https://github.com/Sphereon-Opensource/OID4VCI/commit/8a6c16f39fdee838d935edbc46c6842b628f08b7)) +- fixed some issue in the IssuerMetadataUtils plus added some unittests for it ([d348641](https://github.com/Sphereon-Opensource/OID4VCI/commit/d348641523d786d354fff3dfe75dbdda18e2d550)) +- fixed type mismatch in some files ([a2b3c22](https://github.com/Sphereon-Opensource/OID4VCI/commit/a2b3c2294331bceea8c39228b9b3da1c385d01cd)) +- fixes after merge with CWALL-199 ([af967a9](https://github.com/Sphereon-Opensource/OID4VCI/commit/af967a96370f6dce8b9afad296fc2ff1c557dd84)) +- fixes for PAR. Several things were missing, wrong. Higly likely this is a problem for non PAR flows as well ([9ed5064](https://github.com/Sphereon-Opensource/OID4VCI/commit/9ed506466413b6fdb5df7bff50accf3a7a1ad874)) +- MetadataClient for version 13 and added better type distinction. added credential_definition to credential metadata of v13 ([e39bf71](https://github.com/Sphereon-Opensource/OID4VCI/commit/e39bf71625c2a66821061ece7625f0b08f1c0ad2)) +- set client_id on authorization url ([04e7cb8](https://github.com/Sphereon-Opensource/OID4VCI/commit/04e7cb8d60bddca7cea7d8ec04f3072ef989a2c3)) + +### Features + +- Add wallet signing support to VCI and notification support ([c4d3483](https://github.com/Sphereon-Opensource/OID4VCI/commit/c4d34836fb4923c98e7743221978c902c8427f2a)) +- created special type for CredentialRequest v1_0_13 and fixed the tests for it ([25a6051](https://github.com/Sphereon-Opensource/OID4VCI/commit/25a6051ed0bb096c2249f24cd054c1a7aec97f61)) +- expose functions for experimental subject issuer support ([c4adecc](https://github.com/Sphereon-Opensource/OID4VCI/commit/c4adeccdbde6b42a7df85dfbdcb821f2fab8b819)) +- Unify how we get types from different spec versions ([449364b](https://github.com/Sphereon-Opensource/OID4VCI/commit/449364b49db4eaf5b847d5124687f9a3cd4bbc40)) + +## [0.10.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.10.2...v0.10.3) (2024-04-25) + +**Note:** Version bump only for package @sphereon/oid4vci-common + +## [0.10.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.10.0...v0.10.1) (2024-03-12) + +### Bug Fixes + +- type for cred request ldp ([dbbe447](https://github.com/Sphereon-Opensource/OID4VCI/commit/dbbe44784f60234897c1b9ccdac09259a1226066)) + +# [0.10.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.9.0...v0.10.0) (2024-02-29) + +### Bug Fixes + +- enum type ([c39d8e1](https://github.com/Sphereon-Opensource/OID4VCI/commit/c39d8e1d0b10f6f683dbd229c14e6299a9163e1c)) +- Extend Alg enum to allow for more algorithms. refs [#88](https://github.com/Sphereon-Opensource/OID4VCI/issues/88) ([6e76f57](https://github.com/Sphereon-Opensource/OID4VCI/commit/6e76f5759d2cf989f246ed8a4d45e6c5bd2cb06f)) + +### Features + +- Open the signing algorithm list in the credential issuance process, refs [#88](https://github.com/Sphereon-Opensource/OID4VCI/issues/88) ([d9b17af](https://github.com/Sphereon-Opensource/OID4VCI/commit/d9b17af8098f55b688891de5e536fa95560ef8af)) + +# [0.9.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.8.1...v0.9.0) (2024-02-16) + +### Bug Fixes + +- Add back jwt_vc format support for older versions ([9f06ab1](https://github.com/Sphereon-Opensource/OID4VCI/commit/9f06ab1e0efef89848fb6e6a2b80ed874717e580)) +- Do not set a default redirect_uri, unless no authorization request options are set at all ([6c96089](https://github.com/Sphereon-Opensource/OID4VCI/commit/6c96089f1d328c60cd040f34a3d06ae3b0df392b)) +- Do not set default client_id ([7a1afbc](https://github.com/Sphereon-Opensource/OID4VCI/commit/7a1afbcee3de7c7b0dbe3e32330f0a96e1dcfa1e)) +- Fix uri to json conversion when no required params are provided ([36a70ca](https://github.com/Sphereon-Opensource/OID4VCI/commit/36a70ca634c1caf92555745108ea07c35570b423)) + +### Features + +- Add deferred support ([99dc87d](https://github.com/Sphereon-Opensource/OID4VCI/commit/99dc87d3748cb1f71aa67237b28b6c4bb667eb29)) +- add sd-jwt support ([a37ef06](https://github.com/Sphereon-Opensource/OID4VCI/commit/a37ef06d38fdc7a6d5acc372cd2da8935b4c414e)) +- Add support to get a client id from an offer, and from state JWTs. EBSI for instance is using this ([f089116](https://github.com/Sphereon-Opensource/OID4VCI/commit/f0891164a7a6863940c264afa386144a1e4ac19a)) +- Allow to create an authorization request URL when initiating the OID4VCI client ([84ea215](https://github.com/Sphereon-Opensource/OID4VCI/commit/84ea215c10da042417dabc1d30b2e3898b635bab)) +- PAR improvements ([99f55c2](https://github.com/Sphereon-Opensource/OID4VCI/commit/99f55c23e907022954b0eb169e276f3ef9ffb8ae)) +- PKCE support improvements. ([5d5cb06](https://github.com/Sphereon-Opensource/OID4VCI/commit/5d5cb060fda0790641c1b0d8d513af16ac041970)) +- Support sd-jwt 0.2.0 library ([77c9c24](https://github.com/Sphereon-Opensource/OID4VCI/commit/77c9c246ac994dff1b0ca80eb42819bf9bb1844a)) + +## [0.8.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.3...v0.8.1) (2023-10-14) + +**Note:** Version bump only for package @sphereon/oid4vci-common + +## [0.7.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.2...v0.7.3) (2023-09-30) + +**Note:** Version bump only for package @sphereon/oid4vci-common + +## [0.7.2](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.1...v0.7.2) (2023-09-28) + +### Bug Fixes + +- id lookup against server metadata not working ([592ec4b](https://github.com/Sphereon-Opensource/OID4VCI/commit/592ec4b837898eb3022d19479d79b6065e7a0d9e)) + +## [0.7.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.0...v0.7.1) (2023-09-28) + +### Bug Fixes + +- Better match credential offer types and formats onto issuer metadata ([4044c21](https://github.com/Sphereon-Opensource/OID4VCI/commit/4044c2175b4cbee16f44c8bb5499bba249ca4993)) +- Fix credential offer matching against metadata ([3c23bab](https://github.com/Sphereon-Opensource/OID4VCI/commit/3c23bab83569e04a4b5846fed83ce00d68e8ddce)) +- Fix credential offer matching against metadata ([b79027f](https://github.com/Sphereon-Opensource/OID4VCI/commit/b79027fe601ecccb1373ba399419e14f5ec2d7ff)) +- relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([cb5f9c1](https://github.com/Sphereon-Opensource/OID4VCI/commit/cb5f9c1c12285508c6d403814d032e8883a59e7d)) + +# [0.7.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.6.0...v0.7.0) (2023-08-19) + +### Bug Fixes + +- fix credential request properties ([0037025](https://github.com/Sphereon-Opensource/OID4VCI/commit/0037025ef27d3a1fa7c68954b1f87e660ef0c82c)) +- Revise well-known metadata retrieval for OID4VCI, OAuth 2.0 and OIDC. fixes [#62](https://github.com/Sphereon-Opensource/OID4VCI/issues/62) ([a750cc7](https://github.com/Sphereon-Opensource/OID4VCI/commit/a750cc76e084f12aeb58f2b1ac44b1bb5e69b5ae)) + +### Features + +- Integrate ssi-express-support to allow for future authn/authz. Also moved endpoints to functions, so solutions can include their own set of endpoints ([c749aba](https://github.com/Sphereon-Opensource/OID4VCI/commit/c749ababd4bec567d6aeeda49b76f195ec792201)) + +# [0.6.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.4.0...v0.6.0) (2023-06-24) + +### Bug Fixes + +- added a couple of todos for handling v11, plus changed the getIssuer method to throw exception if nothing is found, and some other pr notes ([091786e](https://github.com/Sphereon-Opensource/OID4VCI/commit/091786e31246da16f6c9385fc13e7fd3e01664dc)) +- added disable eslint comments in three places ([0e3ffdb](https://github.com/Sphereon-Opensource/OID4VCI/commit/0e3ffdb3a434e142d3bd8d0e04ca0b2b0f8f73e3)) +- made v1_0.09 types strict and added a few utility methods to it for ease of access ([9391f31](https://github.com/Sphereon-Opensource/OID4VCI/commit/9391f317ee41068b823901036c3ac7d4b33ce6dd)) +- Many v11 fixes on server and client side ([08be1ed](https://github.com/Sphereon-Opensource/OID4VCI/commit/08be1ed009fb80e910cffa2e4cf376758798b27e)) +- PAR objects where in the wrong locations and one had a wrong name ([24f98e7](https://github.com/Sphereon-Opensource/OID4VCI/commit/24f98e75137cf70595753cbcf77159584d7ebe08)) +- prettier, plus some type casting in test/mock files for v9 ([162af38](https://github.com/Sphereon-Opensource/OID4VCI/commit/162af3828b3dc826dc3cd5adffe3dab61925ad33)) +- removed type support for mso_mdoc ([867073c](https://github.com/Sphereon-Opensource/OID4VCI/commit/867073ccf3612e6ad869dbc662c791b292fe06ca)) +- rename jwt_vc_json_ld to jwt_vc_json-ld ([a366bef](https://github.com/Sphereon-Opensource/OID4VCI/commit/a366bef5a7bda052de6ffa201186e02b70447a79)) + +### Features + +- Add status support to sessions ([02c7eaf](https://github.com/Sphereon-Opensource/OID4VCI/commit/02c7eaf69af441e15c6302a9c0f2874d54066b32)) +- Add support for alg, kid, did, did document to Jwt Verification callback so we can ensure to set proper values in the resulting VC. ([62dd947](https://github.com/Sphereon-Opensource/OID4VCI/commit/62dd947d0e09360719e6f704db33d766dff2363a)) +- Add support for background_image for credentials ([a3c2561](https://github.com/Sphereon-Opensource/OID4VCI/commit/a3c2561c7596ad7303467528d92cdaa033c7af94)) +- Add supported flow type detection ([100f9e6](https://github.com/Sphereon-Opensource/OID4VCI/commit/100f9e6ccd7c53353f2876be81df4d6e3f7efde4)) +- Add VCI Issuer ([5cab075](https://github.com/Sphereon-Opensource/OID4VCI/commit/5cab07534e7a8b340f7a05343f56fbf091d64738)) +- added better support (and distinction) for types v1.0.09 and v1.0.11 ([f311258](https://github.com/Sphereon-Opensource/OID4VCI/commit/f31125865a3d63ce7719f790fc5ac74fea7f9ade)) +- added callback function for issuing credentials ([c478788](https://github.com/Sphereon-Opensource/OID4VCI/commit/c478788d3d3d2414073eedddd9d43cc3d593ee1b)) +- added error code invalid_scope ([e7864d9](https://github.com/Sphereon-Opensource/OID4VCI/commit/e7864d96476ae8ff21867646c0943975b773d7d5)) +- Added new mock data from actual issuers, fixed a small bug with v1_0_08 types, updated v1_0_08 types to support data from jff issuers ([a6b1eea](https://github.com/Sphereon-Opensource/OID4VCI/commit/a6b1eeaabc0f34cc13a79cf967a8c35a6d8dc7f5)) +- Added new tests for CredentialRequestClient plus fixed a problem with CredentialOfferUtil. a CredentialRequest can have no issuer field ([50f2292](https://github.com/Sphereon-Opensource/OID4VCI/commit/50f22928426761cc3bf5d973d1f15fea407a9175)) +- added support for creating offer deeplink from object and test it. plus some refactors ([a87dcb1](https://github.com/Sphereon-Opensource/OID4VCI/commit/a87dcb1ec10ea26a221d61ec0ffd4b4e098a594f)) +- added support for v8 in our types (partially) to make old logics work ([4b5abf1](https://github.com/Sphereon-Opensource/OID4VCI/commit/4b5abf16507bcde0d696ea3948f816d9a2de13c4)) +- added utility method for recognizing v1.0.11 objects ([ed6436e](https://github.com/Sphereon-Opensource/OID4VCI/commit/ed6436e3bd22307fe9f7b4411ff3c8086ddb940c)) +- added VcIssuer and builders related to that ([c2592a8](https://github.com/Sphereon-Opensource/OID4VCI/commit/c2592a8846061c5791050a76e522f50e21f617de)) +- Ass support to provide credential input data to the issuer whilst creating the offer to be used with a credential data supplier ([03d3e46](https://github.com/Sphereon-Opensource/OID4VCI/commit/03d3e46ab44b2e924320b6aed213c88d2ad161db)) +- Issuer credential offer and more fixes/features ([0bbe17c](https://github.com/Sphereon-Opensource/OID4VCI/commit/0bbe17c13de4df95e2fd79b3470a746cc7a5374a)) +- Support data supplier callback ([1c49cc8](https://github.com/Sphereon-Opensource/OID4VCI/commit/1c49cc80cfd83115956c7e9a040e12e814724e72)) +- Translate v8 credentials_supported to v11 ([b06fa22](https://github.com/Sphereon-Opensource/OID4VCI/commit/b06fa221bed33e69aa76ae0234779f80314f2887)) diff --git a/packages/common/LICENSE b/packages/common/LICENSE new file mode 100644 index 00000000..5f0d873b --- /dev/null +++ b/packages/common/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2022] [Sphereon B.V.] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/oid4vci-common/lib/functions/DPoP.ts b/packages/common/lib/dpop/DPoP.ts similarity index 96% rename from packages/oid4vci-common/lib/functions/DPoP.ts rename to packages/common/lib/dpop/DPoP.ts index 16b7219a..63fe2e10 100644 --- a/packages/oid4vci-common/lib/functions/DPoP.ts +++ b/packages/common/lib/dpop/DPoP.ts @@ -3,13 +3,17 @@ import SHA from 'sha.js'; import * as u8a from 'uint8arrays'; import { v4 as uuidv4 } from 'uuid'; -import { JwtHeader, JwtPayload, SigningAlgo } from '../types'; -import { JWK } from '../types/CredentialIssuance.types'; - -import { calculateJwkThumbprint } from './JwkThumbprint'; -import { CreateJwtCallback, JwtIssuerJwk } from './JwtIssuer'; -import { VerifyJwtCallbackBase } from './JwtVerifier'; -import { parseJWT } from './jwtUtils'; +import { + calculateJwkThumbprint, + CreateJwtCallback, + JWK, + JwtHeader, + JwtIssuerJwk, + JwtPayload, + parseJWT, + SigningAlgo, + VerifyJwtCallbackBase, +} from './../jwt'; export interface DPoPJwtIssuerWithContext extends JwtIssuerJwk { type: 'dpop'; diff --git a/packages/common/lib/dpop/index.ts b/packages/common/lib/dpop/index.ts new file mode 100644 index 00000000..3c7362b5 --- /dev/null +++ b/packages/common/lib/dpop/index.ts @@ -0,0 +1 @@ +export * from './DPoP'; diff --git a/packages/common/lib/index.ts b/packages/common/lib/index.ts new file mode 100644 index 00000000..b64fb827 --- /dev/null +++ b/packages/common/lib/index.ts @@ -0,0 +1,9 @@ +import { Loggers } from '@sphereon/ssi-types'; + +export const VCI_LOGGERS = Loggers.DEFAULT; +export const VCI_LOG_COMMON = VCI_LOGGERS.get('sphereon:common'); + +export * from './jwt'; +export * from './dpop'; + +export { v4 as uuidv4 } from 'uuid'; diff --git a/packages/common/lib/jwt/Jwk.types.ts b/packages/common/lib/jwt/Jwk.types.ts new file mode 100644 index 00000000..4d493144 --- /dev/null +++ b/packages/common/lib/jwt/Jwk.types.ts @@ -0,0 +1,34 @@ +export interface BaseJWK { + kty?: string; + crv?: string; + x?: string; + y?: string; + e?: string; + n?: string; +} + +export interface JWK extends BaseJWK { + alg?: string; + d?: string; + dp?: string; + dq?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kid?: string; + oth?: Array<{ + d?: string; + r?: string; + t?: string; + }>; + p?: string; + q?: string; + qi?: string; + use?: string; + x5c?: string[]; + x5t?: string; + 'x5t#S256'?: string; + x5u?: string; + + [propName: string]: unknown; +} diff --git a/packages/oid4vci-common/lib/functions/JwkThumbprint.ts b/packages/common/lib/jwt/JwkThumbprint.ts similarity index 57% rename from packages/oid4vci-common/lib/functions/JwkThumbprint.ts rename to packages/common/lib/jwt/JwkThumbprint.ts index 3b9a3bd2..190d66e4 100644 --- a/packages/oid4vci-common/lib/functions/JwkThumbprint.ts +++ b/packages/common/lib/jwt/JwkThumbprint.ts @@ -1,68 +1,70 @@ -import * as u8a from 'uint8arrays'; +import * as u8a from 'uint8arrays' -import { DigestAlgorithm, JWK } from '../types'; +import { DigestAlgorithm } from '../types' + +import { JWK } from '.' const check = (value: unknown, description: string) => { if (typeof value !== 'string' || !value) { - throw Error(`${description} missing or invalid`); + throw Error(`${description} missing or invalid`) } -}; +} const digest = async (algorithm: DigestAlgorithm, data: Uint8Array) => { - const subtleDigest = `SHA-${algorithm.slice(-3)}`; - return new Uint8Array(await crypto.subtle.digest(subtleDigest, data)); -}; + const subtleDigest = `SHA-${algorithm.slice(-3)}` + return new Uint8Array(await crypto.subtle.digest(subtleDigest, data)) +} export async function calculateJwkThumbprint(jwk: JWK, digestAlgorithm?: DigestAlgorithm): Promise { if (!jwk || typeof jwk !== 'object') { - throw new TypeError('JWK must be an object'); + throw new TypeError('JWK must be an object') } - const algorithm = digestAlgorithm ?? 'sha256'; + const algorithm = digestAlgorithm ?? 'sha256' if (algorithm !== 'sha256' && algorithm !== 'sha384' && algorithm !== 'sha512') { - throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"'); + throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"') } - let components; + let components switch (jwk.kty) { case 'EC': - check(jwk.crv, '"crv" (Curve) Parameter'); - check(jwk.x, '"x" (X Coordinate) Parameter'); - check(jwk.y, '"y" (Y Coordinate) Parameter'); - components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y }; - break; + check(jwk.crv, '"crv" (Curve) Parameter') + check(jwk.x, '"x" (X Coordinate) Parameter') + check(jwk.y, '"y" (Y Coordinate) Parameter') + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y } + break case 'OKP': - check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter'); - check(jwk.x, '"x" (Public Key) Parameter'); - components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x }; - break; + check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter') + check(jwk.x, '"x" (Public Key) Parameter') + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x } + break case 'RSA': - check(jwk.e, '"e" (Exponent) Parameter'); - check(jwk.n, '"n" (Modulus) Parameter'); - components = { e: jwk.e, kty: jwk.kty, n: jwk.n }; - break; + check(jwk.e, '"e" (Exponent) Parameter') + check(jwk.n, '"n" (Modulus) Parameter') + components = { e: jwk.e, kty: jwk.kty, n: jwk.n } + break case 'oct': - check(jwk.k, '"k" (Key Value) Parameter'); - components = { k: jwk.k, kty: jwk.kty }; - break; + check(jwk.k, '"k" (Key Value) Parameter') + components = { k: jwk.k, kty: jwk.kty } + break default: - throw Error('"kty" (Key Type) Parameter missing or unsupported'); + throw Error('"kty" (Key Type) Parameter missing or unsupported') } - const data = u8a.fromString(JSON.stringify(components), 'utf-8'); - return u8a.toString(await digest(algorithm, data), 'base64url'); + const data = u8a.fromString(JSON.stringify(components), 'utf-8') + return u8a.toString(await digest(algorithm, data), 'base64url') } export async function getDigestAlgorithmFromJwkThumbprintUri(uri: string): Promise { - const match = uri.match(/^urn:ietf:params:oauth:jwk-thumbprint:sha-(\w+):/); + const match = uri.match(/^urn:ietf:params:oauth:jwk-thumbprint:sha-(\w+):/) if (!match) { - throw new Error(`Invalid JWK thumbprint URI structure ${uri}`); + throw new Error(`Invalid JWK thumbprint URI structure ${uri}`) } - const algorithm = `sha${match[1]}` as DigestAlgorithm; + const algorithm = `sha${match[1]}` as DigestAlgorithm if (algorithm !== 'sha256' && algorithm !== 'sha384' && algorithm !== 'sha512') { - throw new Error(`Invalid JWK thumbprint URI digest algorithm ${uri}`); + throw new Error(`Invalid JWK thumbprint URI digest algorithm ${uri}`) } - return algorithm; + return algorithm } export async function calculateJwkThumbprintUri(jwk: JWK, digestAlgorithm: DigestAlgorithm = 'sha256'): Promise { - const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm); - return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`; + const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm) + return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}` } diff --git a/packages/common/lib/jwt/Jwt.types.ts b/packages/common/lib/jwt/Jwt.types.ts new file mode 100644 index 00000000..d24a74df --- /dev/null +++ b/packages/common/lib/jwt/Jwt.types.ts @@ -0,0 +1,25 @@ +import { JwtHeader as jwtDecodeJwtHeader, JwtPayload as jwtDecodePayload } from 'jwt-decode' + +import { JWK } from '.' +export type JwtHeader = jwtDecodeJwtHeader & { + alg?: string + x5c?: string[] + kid?: string + jwk?: JWK + jwt?: string +} & Record + +export type JwtPayload = jwtDecodePayload & { + client_id?: string + nonce?: string + request_uri?: string + client_id_scheme?: string +} & Record + +export enum SigningAlgo { + EDDSA = 'EdDSA', + RS256 = 'RS256', + PS256 = 'PS256', + ES256 = 'ES256', + ES256K = 'ES256K', +} diff --git a/packages/oid4vci-common/lib/functions/JwtIssuer.ts b/packages/common/lib/jwt/JwtIssuer.ts similarity index 100% rename from packages/oid4vci-common/lib/functions/JwtIssuer.ts rename to packages/common/lib/jwt/JwtIssuer.ts diff --git a/packages/oid4vci-common/lib/functions/JwtVerifier.ts b/packages/common/lib/jwt/JwtVerifier.ts similarity index 100% rename from packages/oid4vci-common/lib/functions/JwtVerifier.ts rename to packages/common/lib/jwt/JwtVerifier.ts diff --git a/packages/common/lib/jwt/index.ts b/packages/common/lib/jwt/index.ts new file mode 100644 index 00000000..8b119f01 --- /dev/null +++ b/packages/common/lib/jwt/index.ts @@ -0,0 +1,6 @@ +export * from './JwkThumbprint'; +export * from './Jwt.types'; +export * from './JwtIssuer'; +export * from './JwtVerifier'; +export * from './jwtUtils'; +export * from './Jwk.types'; diff --git a/packages/oid4vci-common/lib/functions/jwtUtils.ts b/packages/common/lib/jwt/jwtUtils.ts similarity index 100% rename from packages/oid4vci-common/lib/functions/jwtUtils.ts rename to packages/common/lib/jwt/jwtUtils.ts diff --git a/packages/common/lib/types/digest.types.ts b/packages/common/lib/types/digest.types.ts new file mode 100644 index 00000000..0cde5491 --- /dev/null +++ b/packages/common/lib/types/digest.types.ts @@ -0,0 +1 @@ +export type DigestAlgorithm = 'sha256' | 'sha384' | 'sha512'; diff --git a/packages/common/lib/types/index.ts b/packages/common/lib/types/index.ts new file mode 100644 index 00000000..a935008d --- /dev/null +++ b/packages/common/lib/types/index.ts @@ -0,0 +1 @@ +export * from './digest.types'; diff --git a/packages/common/package.json b/packages/common/package.json new file mode 100644 index 00000000..cc1d1edf --- /dev/null +++ b/packages/common/package.json @@ -0,0 +1,55 @@ +{ + "name": "@sphereon/common", + "version": "0.15.1", + "description": "OpenID 4 Verifiable Credentials Common", + "source": "lib/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "build:clean": "tsc --build --clean && tsc --build" + }, + "dependencies": { + "@sphereon/ssi-types": "0.28.0", + "jwt-decode": "^4.0.0", + "uint8arrays": "3.1.1", + "uuid": "^9.0.0", + "sha.js": "^2.4.11" + }, + "devDependencies": { + "@types/jest": "^29.5.12", + "@types/uuid": "^9.0.1", + "@types/sha.js": "^2.4.4", + "typescript": "5.4.5" + }, + "engines": { + "node": ">=18" + }, + "files": [ + "lib/**/*", + "dist/**/*" + ], + "prettier": { + "singleQuote": true, + "printWidth": 150 + }, + "keywords": [ + "Sphereon", + "Verifiable Credentials", + "OpenID", + "OpenID for Verifiable Credential Issuance", + "OAuth2", + "SSI", + "OpenID4VCI", + "OIDC4VCI", + "OID4VCI", + "Common", + "OpenId for Verifiable Presentations" + ], + "author": "Sphereon", + "license": "Apache-2.0", + "private": false, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json new file mode 100644 index 00000000..30cdb4c1 --- /dev/null +++ b/packages/common/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": "./lib", + "outDir": "./dist", + "declarationDir": "./dist", + "esModuleInterop": true, + "moduleResolution": "Node" + } +} diff --git a/packages/did-auth-siop-adapter/lib/DidJwtAdapter.ts b/packages/did-auth-siop-adapter/lib/DidJwtAdapter.ts index 35ec8bbc..a33a7ecc 100644 --- a/packages/did-auth-siop-adapter/lib/DidJwtAdapter.ts +++ b/packages/did-auth-siop-adapter/lib/DidJwtAdapter.ts @@ -1,6 +1,6 @@ import { AuthorizationRequestPayload, IDTokenPayload, JwtIssuerWithContext, RequestObjectPayload } from '@sphereon/did-auth-siop' import { JwtVerifier } from '@sphereon/did-auth-siop' -import { JwtHeader, JwtPayload } from '@sphereon/oid4vci-common' +import { JwtHeader, JwtPayload } from '@sphereon/common' import { Resolvable } from 'did-resolver' import { getAudience, getSubDidFromPayload, signIDTokenPayload, signRequestObjectPayload, validateLinkedDomainWithDid, verifyDidJWT } from './did' diff --git a/packages/did-auth-siop-adapter/lib/did/DidJWT.ts b/packages/did-auth-siop-adapter/lib/did/DidJWT.ts index 7d11cb5c..149a2bf5 100644 --- a/packages/did-auth-siop-adapter/lib/did/DidJWT.ts +++ b/packages/did-auth-siop-adapter/lib/did/DidJWT.ts @@ -1,3 +1,4 @@ +import { SigningAlgo } from '@sphereon/common' import { post } from '@sphereon/did-auth-siop' import { DEFAULT_EXPIRATION_TIME, @@ -9,7 +10,6 @@ import { SIOPResonse, VerifiedJWT, } from '@sphereon/did-auth-siop' -import { SigningAlgo } from '@sphereon/oid4vci-common' import { createJWT, decodeJWT, diff --git a/packages/did-auth-siop-adapter/lib/types/SIOP.types.ts b/packages/did-auth-siop-adapter/lib/types/SIOP.types.ts index 87357f62..2ec7b231 100644 --- a/packages/did-auth-siop-adapter/lib/types/SIOP.types.ts +++ b/packages/did-auth-siop-adapter/lib/types/SIOP.types.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { VerifyCallback as WellknownDIDVerifyCallback } from '@sphereon/wellknown-dids-client' import { JWTVerifyOptions } from 'did-jwt' import { Resolvable } from 'did-resolver' diff --git a/packages/did-auth-siop-adapter/package.json b/packages/did-auth-siop-adapter/package.json index 405acdb8..b568abd4 100644 --- a/packages/did-auth-siop-adapter/package.json +++ b/packages/did-auth-siop-adapter/package.json @@ -10,7 +10,7 @@ "clean": "rimraf dist coverage" }, "dependencies": { - "@sphereon/oid4vci-common": "workspace:*", + "@sphereon/common": "workspace:*", "@sphereon/did-auth-siop": "workspace:*", "@sphereon/did-uni-client": "^0.6.2", "@sphereon/wellknown-dids-client": "^0.1.3", diff --git a/packages/issuer-rest/lib/IssuerTokenEndpoint.ts b/packages/issuer-rest/lib/IssuerTokenEndpoint.ts index b0d750eb..92b92893 100644 --- a/packages/issuer-rest/lib/IssuerTokenEndpoint.ts +++ b/packages/issuer-rest/lib/IssuerTokenEndpoint.ts @@ -1,6 +1,5 @@ -import { GrantTypes, JWK, PRE_AUTHORIZED_CODE_REQUIRED_ERROR, TokenError, TokenErrorResponse } from '@sphereon/oid4vci-common' -import { uuidv4, verifyDPoP } from '@sphereon/oid4vci-common' -import { DPoPVerifyJwtCallback } from '@sphereon/oid4vci-common/lib/functions/DPoP' +import { DPoPVerifyJwtCallback, JWK, uuidv4, verifyDPoP } from '@sphereon/common' +import { GrantTypes, PRE_AUTHORIZED_CODE_REQUIRED_ERROR, TokenError, TokenErrorResponse } from '@sphereon/oid4vci-common' import { assertValidAccessTokenRequest, createAccessTokenResponse, ITokenEndpointOpts, VcIssuer } from '@sphereon/oid4vci-issuer' import { sendErrorResponse } from '@sphereon/ssi-express-support' import { NextFunction, Request, Response } from 'express' diff --git a/packages/issuer-rest/lib/__tests__/IssuerTokenServer.spec.ts b/packages/issuer-rest/lib/__tests__/IssuerTokenServer.spec.ts index dad5c527..bba06441 100644 --- a/packages/issuer-rest/lib/__tests__/IssuerTokenServer.spec.ts +++ b/packages/issuer-rest/lib/__tests__/IssuerTokenServer.spec.ts @@ -1,5 +1,6 @@ import { KeyObject } from 'crypto' +import { uuidv4 } from '@sphereon/common' import { Alg, CNonceState, @@ -9,7 +10,6 @@ import { Jwt, STATE_MISSING_ERROR, URIState, - uuidv4, } from '@sphereon/oid4vci-common' import { VcIssuer } from '@sphereon/oid4vci-issuer' import { MemoryStates } from '@sphereon/oid4vci-issuer/dist/state-manager' diff --git a/packages/issuer-rest/lib/oid4vci-api-functions.ts b/packages/issuer-rest/lib/oid4vci-api-functions.ts index d8d6d188..39f4e39f 100644 --- a/packages/issuer-rest/lib/oid4vci-api-functions.ts +++ b/packages/issuer-rest/lib/oid4vci-api-functions.ts @@ -1,3 +1,4 @@ +import { uuidv4 } from '@sphereon/common' import { ACCESS_TOKEN_ISSUER_REQUIRED_ERROR, adjustUrl, @@ -19,7 +20,6 @@ import { trimBoth, trimEnd, trimStart, - uuidv4, validateJWT, } from '@sphereon/oid4vci-common' import { ITokenEndpointOpts, LOG, VcIssuer } from '@sphereon/oid4vci-issuer' diff --git a/packages/issuer-rest/package.json b/packages/issuer-rest/package.json index 81812383..b8c3acc2 100644 --- a/packages/issuer-rest/package.json +++ b/packages/issuer-rest/package.json @@ -11,6 +11,7 @@ "build:clean": "tsc --build --clean && tsc --build" }, "dependencies": { + "@sphereon/common": "workspace:*", "@sphereon/oid4vci-common": "workspace:*", "@sphereon/oid4vci-issuer": "workspace:*", "@sphereon/ssi-express-support": "0.28.0", diff --git a/packages/issuer/lib/VcIssuer.ts b/packages/issuer/lib/VcIssuer.ts index bbafcf57..eb5d9b62 100644 --- a/packages/issuer/lib/VcIssuer.ts +++ b/packages/issuer/lib/VcIssuer.ts @@ -1,3 +1,4 @@ +import { uuidv4 } from '@sphereon/common' import { ALG_ERROR, AUD_ERROR, @@ -36,7 +37,6 @@ import { TxCode, TYP_ERROR, URIState, - uuidv4, } from '@sphereon/oid4vci-common' import { CredentialEventNames, CredentialOfferEventNames, EVENTS } from '@sphereon/oid4vci-common/dist/events' import { CredentialIssuerMetadataOptsV1_0_13 } from '@sphereon/oid4vci-common/dist/types/v1_0_13.types' diff --git a/packages/issuer/lib/__tests__/MemoryCNonceStateManager.spec.ts b/packages/issuer/lib/__tests__/MemoryCNonceStateManager.spec.ts index 046853d9..83c79e54 100644 --- a/packages/issuer/lib/__tests__/MemoryCNonceStateManager.spec.ts +++ b/packages/issuer/lib/__tests__/MemoryCNonceStateManager.spec.ts @@ -1,5 +1,5 @@ +import { uuidv4 } from '@sphereon/common' import { CNonceState, IStateManager, STATE_MISSING_ERROR } from '@sphereon/oid4vci-common' -import { uuidv4 } from '@sphereon/oid4vci-common' import { MemoryStates } from '../state-manager' diff --git a/packages/issuer/lib/__tests__/VcIssuer.spec.ts b/packages/issuer/lib/__tests__/VcIssuer.spec.ts index 3cb18fd3..469bad90 100644 --- a/packages/issuer/lib/__tests__/VcIssuer.spec.ts +++ b/packages/issuer/lib/__tests__/VcIssuer.spec.ts @@ -1,3 +1,4 @@ +import { uuidv4 } from '@sphereon/common' import { OpenID4VCIClientV1_0_13 } from '@sphereon/oid4vci-client' import { Alg, @@ -7,7 +8,6 @@ import { IssuerCredentialSubjectDisplay, IssueStatus, STATE_MISSING_ERROR, - uuidv4, } from '@sphereon/oid4vci-common' import { IProofPurpose, IProofType } from '@sphereon/ssi-types' import { DIDDocument } from 'did-resolver' diff --git a/packages/issuer/lib/__tests__/VcIssuerBuilder.spec.ts b/packages/issuer/lib/__tests__/VcIssuerBuilder.spec.ts index b72c8b44..96a2420c 100644 --- a/packages/issuer/lib/__tests__/VcIssuerBuilder.spec.ts +++ b/packages/issuer/lib/__tests__/VcIssuerBuilder.spec.ts @@ -1,5 +1,5 @@ +import { uuidv4 } from '@sphereon/common' import { CredentialConfigurationSupportedV1_0_13, IssuerCredentialSubjectDisplay, IssueStatus, TokenErrorResponse } from '@sphereon/oid4vci-common' -import { uuidv4 } from '@sphereon/oid4vci-common' import { CredentialSupportedBuilderV1_13, VcIssuerBuilder } from '../index' diff --git a/packages/issuer/lib/functions/CredentialOfferUtils.ts b/packages/issuer/lib/functions/CredentialOfferUtils.ts index a9cce840..fa8cbf43 100644 --- a/packages/issuer/lib/functions/CredentialOfferUtils.ts +++ b/packages/issuer/lib/functions/CredentialOfferUtils.ts @@ -1,3 +1,4 @@ +import { uuidv4 } from '@sphereon/common' import { CredentialIssuerMetadataOpts, CredentialIssuerMetadataOptsV1_0_13, @@ -14,7 +15,6 @@ import { PRE_AUTH_GRANT_LITERAL, TxCode, UniformCredentialOffer, - uuidv4, } from '@sphereon/oid4vci-common' export function createCredentialOfferObject( diff --git a/packages/issuer/lib/tokens/index.ts b/packages/issuer/lib/tokens/index.ts index dc371d56..46f1abcf 100644 --- a/packages/issuer/lib/tokens/index.ts +++ b/packages/issuer/lib/tokens/index.ts @@ -1,8 +1,8 @@ +import { calculateJwkThumbprint, JWK, uuidv4 } from '@sphereon/common' import { AccessTokenRequest, AccessTokenResponse, Alg, - calculateJwkThumbprint, CNonceState, CredentialOfferSession, EXPIRED_PRE_AUTHORIZED_CODE, @@ -10,7 +10,6 @@ import { INVALID_PRE_AUTHORIZED_CODE, IssueStatus, IStateManager, - JWK, Jwt, JWTSignerCallback, JWTVerifyCallback, @@ -24,7 +23,6 @@ import { USER_PIN_NOT_REQUIRED_ERROR, USER_PIN_REQUIRED_ERROR, USER_PIN_TX_CODE_SPEC_ERROR, - uuidv4, } from '@sphereon/oid4vci-common' import { isPreAuthorizedCodeExpired } from '../functions' diff --git a/packages/issuer/package.json b/packages/issuer/package.json index 22c2138f..0e8a05cd 100644 --- a/packages/issuer/package.json +++ b/packages/issuer/package.json @@ -10,6 +10,7 @@ "build:clean": "tsc --build --clean && tsc --build" }, "dependencies": { + "@sphereon/common": "workspace:*", "@sphereon/oid4vci-common": "workspace:*", "@sphereon/ssi-types": "0.28.0", "uuid": "^9.0.0" diff --git a/packages/oid4vci-common/lib/functions/ProofUtil.ts b/packages/oid4vci-common/lib/functions/ProofUtil.ts index c92a1c05..5fd9c91a 100644 --- a/packages/oid4vci-common/lib/functions/ProofUtil.ts +++ b/packages/oid4vci-common/lib/functions/ProofUtil.ts @@ -1,11 +1,10 @@ +import { BaseJWK, JWK } from '@sphereon/common'; import Debug from 'debug'; import { jwtDecode } from 'jwt-decode'; import { PoPMode, VCI_LOG_COMMON } from '..'; import { BAD_PARAMS, - BaseJWK, - JWK, JWS_NOT_VALID, Jwt, JWTHeader, diff --git a/packages/oid4vci-common/lib/functions/index.ts b/packages/oid4vci-common/lib/functions/index.ts index db51878b..edefaef6 100644 --- a/packages/oid4vci-common/lib/functions/index.ts +++ b/packages/oid4vci-common/lib/functions/index.ts @@ -11,8 +11,3 @@ export * from './ProofUtil'; export * from './AuthorizationResponseUtil'; export { randomBytes }; export * from './RandomUtils'; -export * from './DPoP'; -export * from './JwkThumbprint'; -export * from './JwtVerifier'; -export * from './jwtUtils'; -export * from './JwtIssuer'; diff --git a/packages/oid4vci-common/lib/index.ts b/packages/oid4vci-common/lib/index.ts index 2d6aec21..567f987f 100644 --- a/packages/oid4vci-common/lib/index.ts +++ b/packages/oid4vci-common/lib/index.ts @@ -7,4 +7,3 @@ export * from './functions'; export * from './types'; export * from './experimental/holder-vci'; export * from './events'; -export { v4 as uuidv4 } from 'uuid'; diff --git a/packages/oid4vci-common/lib/types/Authorization.types.ts b/packages/oid4vci-common/lib/types/Authorization.types.ts index e70612a8..62117b1b 100644 --- a/packages/oid4vci-common/lib/types/Authorization.types.ts +++ b/packages/oid4vci-common/lib/types/Authorization.types.ts @@ -1,4 +1,4 @@ -import { CreateDPoPClientOpts as CreateDPoPClientOpts } from '../functions/DPoP'; +import { CreateDPoPClientOpts } from '@sphereon/common'; import { Alg, CredentialOfferPayload, ProofOfPossessionCallbacks, UniformCredentialOffer } from './CredentialIssuance.types'; import { diff --git a/packages/oid4vci-common/lib/types/CredentialIssuance.types.ts b/packages/oid4vci-common/lib/types/CredentialIssuance.types.ts index 2e78d03c..1f2275ef 100644 --- a/packages/oid4vci-common/lib/types/CredentialIssuance.types.ts +++ b/packages/oid4vci-common/lib/types/CredentialIssuance.types.ts @@ -1,4 +1,5 @@ import { W3CVerifiableCredential } from '@sphereon/ssi-types'; +import { BaseJWK } from 'common/dist'; import { ExperimentalSubjectIssuance } from '../experimental/holder-vci'; @@ -94,41 +95,6 @@ export type DecodeURIAsJsonOpts = { arrayTypeProperties?: string[]; }; -export interface BaseJWK { - kty?: string; - crv?: string; - x?: string; - y?: string; - e?: string; - n?: string; -} - -export interface JWK extends BaseJWK { - alg?: string; - d?: string; - dp?: string; - dq?: string; - ext?: boolean; - k?: string; - key_ops?: string[]; - kid?: string; - oth?: Array<{ - d?: string; - r?: string; - t?: string; - }>; - p?: string; - q?: string; - qi?: string; - use?: string; - x5c?: string[]; - x5t?: string; - 'x5t#S256'?: string; - x5u?: string; - - [propName: string]: unknown; -} - export interface Jwt { header: JWTHeader; payload: JWTPayload; diff --git a/packages/oid4vci-common/lib/types/Generic.types.ts b/packages/oid4vci-common/lib/types/Generic.types.ts index 789c534a..0a9e4e40 100644 --- a/packages/oid4vci-common/lib/types/Generic.types.ts +++ b/packages/oid4vci-common/lib/types/Generic.types.ts @@ -398,5 +398,3 @@ export type NotificationResult = { export interface NotificationErrorResponse { error: NotificationError | string; } - -export type DigestAlgorithm = 'sha256' | 'sha384' | 'sha512'; diff --git a/packages/oid4vci-common/lib/types/Jwt.types.ts b/packages/oid4vci-common/lib/types/Jwt.types.ts deleted file mode 100644 index d81fb124..00000000 --- a/packages/oid4vci-common/lib/types/Jwt.types.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { JwtHeader as jwtDecodeJwtHeader, JwtPayload as jwtDecodePayload } from 'jwt-decode'; - -import { JWK } from './CredentialIssuance.types'; -export type JwtHeader = jwtDecodeJwtHeader & { - alg?: string; - x5c?: string[]; - kid?: string; - jwk?: JWK; - jwt?: string; -} & Record; - -export type JwtPayload = jwtDecodePayload & { - client_id?: string; - nonce?: string; - request_uri?: string; - client_id_scheme?: string; -} & Record; - -export enum SigningAlgo { - EDDSA = 'EdDSA', - RS256 = 'RS256', - PS256 = 'PS256', - ES256 = 'ES256', - ES256K = 'ES256K', -} diff --git a/packages/oid4vci-common/lib/types/ServerMetadata.ts b/packages/oid4vci-common/lib/types/ServerMetadata.ts index 9332244b..14db9d61 100644 --- a/packages/oid4vci-common/lib/types/ServerMetadata.ts +++ b/packages/oid4vci-common/lib/types/ServerMetadata.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from './Jwt.types'; +import { SigningAlgo } from '@sphereon/common'; export interface AuthorizationServerMetadata { issuer: string; diff --git a/packages/oid4vci-common/lib/types/index.ts b/packages/oid4vci-common/lib/types/index.ts index 68e6d540..5d60ee08 100644 --- a/packages/oid4vci-common/lib/types/index.ts +++ b/packages/oid4vci-common/lib/types/index.ts @@ -11,4 +11,3 @@ export * from './OpenID4VCIVersions.types'; export * from './StateManager.types'; export * from './Token.types'; export * from './QRCode.types'; -export * from './Jwt.types'; diff --git a/packages/oid4vci-common/lib/types/v1_0_13.types.ts b/packages/oid4vci-common/lib/types/v1_0_13.types.ts index 8d1908ca..789df449 100644 --- a/packages/oid4vci-common/lib/types/v1_0_13.types.ts +++ b/packages/oid4vci-common/lib/types/v1_0_13.types.ts @@ -1,6 +1,8 @@ +import { JWK } from 'common/dist'; + import { ExperimentalSubjectIssuance } from '../experimental/holder-vci'; -import { JWK, ProofOfPossession } from './CredentialIssuance.types'; +import { ProofOfPossession } from './CredentialIssuance.types'; import { AlgValue, CommonCredentialRequest, diff --git a/packages/oid4vci-common/package.json b/packages/oid4vci-common/package.json index 81c53d42..3391325d 100644 --- a/packages/oid4vci-common/package.json +++ b/packages/oid4vci-common/package.json @@ -10,6 +10,7 @@ "build:clean": "tsc --build --clean && tsc --build" }, "dependencies": { + "@sphereon/common": "workspace:*", "@sphereon/ssi-types": "0.28.0", "cross-fetch": "^3.1.8", "jwt-decode": "^4.0.0", diff --git a/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.request.spec.ts b/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.request.spec.ts index 59cd56a9..5dceb3dd 100644 --- a/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.request.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.request.spec.ts @@ -1,6 +1,6 @@ import { parse } from 'querystring' -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IPresentationDefinition } from '@sphereon/pex' import { IProofType } from '@sphereon/ssi-types' diff --git a/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.verify.spec.ts b/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.verify.spec.ts index e70c3122..cf72d3b1 100644 --- a/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.verify.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/AuthenticationRequest.verify.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IProofType } from '@sphereon/ssi-types' import Ajv from 'ajv' import * as dotenv from 'dotenv' diff --git a/packages/siop-oid4vp/lib/__tests__/AuthenticationResponse.response.spec.ts b/packages/siop-oid4vp/lib/__tests__/AuthenticationResponse.response.spec.ts index 4437b1d6..9db2cbd6 100644 --- a/packages/siop-oid4vp/lib/__tests__/AuthenticationResponse.response.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/AuthenticationResponse.response.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IPresentationDefinition } from '@sphereon/pex' import { ICredential, diff --git a/packages/siop-oid4vp/lib/__tests__/DidJwtTestUtils.ts b/packages/siop-oid4vp/lib/__tests__/DidJwtTestUtils.ts index 8c9cf221..05a8e688 100644 --- a/packages/siop-oid4vp/lib/__tests__/DidJwtTestUtils.ts +++ b/packages/siop-oid4vp/lib/__tests__/DidJwtTestUtils.ts @@ -1,4 +1,4 @@ -import { JwtPayload, parseJWT, SigningAlgo } from '@sphereon/oid4vci-common' +import { JwtPayload, parseJWT, SigningAlgo } from '@sphereon/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' diff --git a/packages/siop-oid4vp/lib/__tests__/IT.spec.ts b/packages/siop-oid4vp/lib/__tests__/IT.spec.ts index e8b76dce..b0d13cdc 100644 --- a/packages/siop-oid4vp/lib/__tests__/IT.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/IT.spec.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events' -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IPresentationDefinition } from '@sphereon/pex' import { CredentialMapper, IPresentation, IProofType, IVerifiableCredential, W3CVerifiablePresentation } from '@sphereon/ssi-types' import nock from 'nock' diff --git a/packages/siop-oid4vp/lib/__tests__/OP.request.spec.ts b/packages/siop-oid4vp/lib/__tests__/OP.request.spec.ts index e18f99b7..3ba7100d 100644 --- a/packages/siop-oid4vp/lib/__tests__/OP.request.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/OP.request.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IProofType } from '@sphereon/ssi-types' import nock from 'nock' diff --git a/packages/siop-oid4vp/lib/__tests__/PresentationExchange.spec.ts b/packages/siop-oid4vp/lib/__tests__/PresentationExchange.spec.ts index c4bd2f4a..4ef2f0ff 100644 --- a/packages/siop-oid4vp/lib/__tests__/PresentationExchange.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/PresentationExchange.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/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' diff --git a/packages/siop-oid4vp/lib/__tests__/RP.request.spec.ts b/packages/siop-oid4vp/lib/__tests__/RP.request.spec.ts index 3384a157..4ece679f 100644 --- a/packages/siop-oid4vp/lib/__tests__/RP.request.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/RP.request.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IProofType } from '@sphereon/ssi-types' import { diff --git a/packages/siop-oid4vp/lib/__tests__/SdJwt.spec.ts b/packages/siop-oid4vp/lib/__tests__/SdJwt.spec.ts index 81ce741b..8778cba4 100644 --- a/packages/siop-oid4vp/lib/__tests__/SdJwt.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/SdJwt.spec.ts @@ -1,6 +1,6 @@ import { createHash } from 'node:crypto' -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { IPresentationDefinition, SdJwtDecodedVerifiableCredentialWithKbJwtInput } from '@sphereon/pex' import { OriginalVerifiableCredential } from '@sphereon/ssi-types' diff --git a/packages/siop-oid4vp/lib/__tests__/TestUtils.ts b/packages/siop-oid4vp/lib/__tests__/TestUtils.ts index 811c1f23..260ac76f 100644 --- a/packages/siop-oid4vp/lib/__tests__/TestUtils.ts +++ b/packages/siop-oid4vp/lib/__tests__/TestUtils.ts @@ -1,6 +1,6 @@ import crypto from 'crypto' -import { JwtPayload, parseJWT, SigningAlgo, uuidv4 } from '@sphereon/oid4vci-common' +import { JwtPayload, parseJWT, SigningAlgo, uuidv4 } from '@sphereon/common' import { IProofType } from '@sphereon/ssi-types' import base58 from 'bs58' import { ethers } from 'ethers' diff --git a/packages/siop-oid4vp/lib/__tests__/e2e/EBSI.spec.ts b/packages/siop-oid4vp/lib/__tests__/e2e/EBSI.spec.ts index 4842f478..b4550f8c 100644 --- a/packages/siop-oid4vp/lib/__tests__/e2e/EBSI.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/e2e/EBSI.spec.ts @@ -1,7 +1,7 @@ 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 { SigningAlgo, uuidv4 } from '@sphereon/oid4vci-common' +import { SigningAlgo, uuidv4 } from '@sphereon/common' import { PresentationSignCallBackParams } from '@sphereon/pex' import { parseDid, W3CVerifiablePresentation } from '@sphereon/ssi-types' import { Resolver } from 'did-resolver' diff --git a/packages/siop-oid4vp/lib/__tests__/e2e/mattr.launchpad.spec.ts b/packages/siop-oid4vp/lib/__tests__/e2e/mattr.launchpad.spec.ts index 116b01b9..71d27764 100644 --- a/packages/siop-oid4vp/lib/__tests__/e2e/mattr.launchpad.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/e2e/mattr.launchpad.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { PresentationSignCallBackParams, PresentationSubmissionLocation } from '@sphereon/pex' import { W3CVerifiablePresentation } from '@sphereon/ssi-types' import * as ed25519 from '@transmute/did-key-ed25519' diff --git a/packages/siop-oid4vp/lib/__tests__/functions/DidSiopMetadata.spec.ts b/packages/siop-oid4vp/lib/__tests__/functions/DidSiopMetadata.spec.ts index 9c857102..ca2d5d91 100644 --- a/packages/siop-oid4vp/lib/__tests__/functions/DidSiopMetadata.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/functions/DidSiopMetadata.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { Format } from '@sphereon/pex-models' import { IProofType } from '@sphereon/ssi-types' diff --git a/packages/siop-oid4vp/lib/__tests__/regressions/ClientIdIsObject.spec.ts b/packages/siop-oid4vp/lib/__tests__/regressions/ClientIdIsObject.spec.ts index 49f9b1f7..91eb4ed6 100644 --- a/packages/siop-oid4vp/lib/__tests__/regressions/ClientIdIsObject.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/regressions/ClientIdIsObject.spec.ts @@ -1,4 +1,4 @@ -import { parseJWT, SigningAlgo } from '@sphereon/oid4vci-common' +import { parseJWT, SigningAlgo } from '@sphereon/common' import { PassBy, ResponseType, RevocationVerification, RP, Scope, SubjectType, SupportedVersion } from '../..' import { internalSignature } from '../DidJwtTestUtils' diff --git a/packages/siop-oid4vp/lib/__tests__/spec-compliance/jwtVCPresentationProfile.spec.ts b/packages/siop-oid4vp/lib/__tests__/spec-compliance/jwtVCPresentationProfile.spec.ts index 718a0b35..7f6ec6af 100644 --- a/packages/siop-oid4vp/lib/__tests__/spec-compliance/jwtVCPresentationProfile.spec.ts +++ b/packages/siop-oid4vp/lib/__tests__/spec-compliance/jwtVCPresentationProfile.spec.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { PresentationSignCallBackParams } from '@sphereon/pex' import { IProofType } from '@sphereon/ssi-types' import * as jose from 'jose' diff --git a/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts b/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts index 889e8d6f..9fd7bb2f 100644 --- a/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts +++ b/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts @@ -1,4 +1,4 @@ -import { parseJWT } from '@sphereon/oid4vci-common' +import { parseJWT } from '@sphereon/common' import { PresentationDefinitionWithLocation } from '../authorization-response' import { PresentationExchange } from '../authorization-response/PresentationExchange' diff --git a/packages/siop-oid4vp/lib/authorization-request/URI.ts b/packages/siop-oid4vp/lib/authorization-request/URI.ts index 8478d925..5848382f 100644 --- a/packages/siop-oid4vp/lib/authorization-request/URI.ts +++ b/packages/siop-oid4vp/lib/authorization-request/URI.ts @@ -1,4 +1,4 @@ -import { parseJWT } from '@sphereon/oid4vci-common' +import { parseJWT } from '@sphereon/common' import { PresentationExchange } from '../authorization-response/PresentationExchange' import { decodeUriAsJson, encodeJsonAsURI, fetchByReferenceOrUseByValue } from '../helpers' diff --git a/packages/siop-oid4vp/lib/authorization-request/types.ts b/packages/siop-oid4vp/lib/authorization-request/types.ts index 84eba8ee..01f761c3 100644 --- a/packages/siop-oid4vp/lib/authorization-request/types.ts +++ b/packages/siop-oid4vp/lib/authorization-request/types.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { Hasher } from '@sphereon/ssi-types' import { PresentationDefinitionPayloadOpts } from '../authorization-response' diff --git a/packages/siop-oid4vp/lib/authorization-response/OpenID4VP.ts b/packages/siop-oid4vp/lib/authorization-response/OpenID4VP.ts index 5a23b641..b02d9165 100644 --- a/packages/siop-oid4vp/lib/authorization-response/OpenID4VP.ts +++ b/packages/siop-oid4vp/lib/authorization-response/OpenID4VP.ts @@ -1,4 +1,4 @@ -import { parseJWT } from '@sphereon/oid4vci-common' +import { parseJWT } from '@sphereon/common' import { IPresentationDefinition, PEX } from '@sphereon/pex' import { Format } from '@sphereon/pex-models' import { diff --git a/packages/siop-oid4vp/lib/authorization-response/ResponseRegistration.ts b/packages/siop-oid4vp/lib/authorization-response/ResponseRegistration.ts index 368854b9..3b839065 100644 --- a/packages/siop-oid4vp/lib/authorization-response/ResponseRegistration.ts +++ b/packages/siop-oid4vp/lib/authorization-response/ResponseRegistration.ts @@ -1,4 +1,4 @@ -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { LanguageTagUtils, removeNullUndefined } from '../helpers' import { DiscoveryMetadataOpts, DiscoveryMetadataPayload, ResponseIss, ResponseType, Schema, Scope, SubjectType } from '../types' diff --git a/packages/siop-oid4vp/lib/authorization-response/types.ts b/packages/siop-oid4vp/lib/authorization-response/types.ts index cb7daf22..d438d813 100644 --- a/packages/siop-oid4vp/lib/authorization-response/types.ts +++ b/packages/siop-oid4vp/lib/authorization-response/types.ts @@ -1,4 +1,4 @@ -import { JwtIssuer } from '@sphereon/oid4vci-common' +import { JwtIssuer } from '@sphereon/common' import { IPresentationDefinition, PresentationSignCallBackParams } from '@sphereon/pex' import { Format } from '@sphereon/pex-models' import { CompactSdJwtVc, Hasher, PresentationSubmission, W3CVerifiablePresentation } from '@sphereon/ssi-types' diff --git a/packages/siop-oid4vp/lib/helpers/State.ts b/packages/siop-oid4vp/lib/helpers/State.ts index 573b101b..16cf5fcb 100644 --- a/packages/siop-oid4vp/lib/helpers/State.ts +++ b/packages/siop-oid4vp/lib/helpers/State.ts @@ -1,4 +1,4 @@ -import { uuidv4 } from '@sphereon/oid4vci-common' +import { uuidv4 } from '@sphereon/common' import SHA from 'sha.js' import { base64urlEncodeBuffer } from './Encodings' diff --git a/packages/siop-oid4vp/lib/id-token/IDToken.ts b/packages/siop-oid4vp/lib/id-token/IDToken.ts index d24a1156..8500862d 100644 --- a/packages/siop-oid4vp/lib/id-token/IDToken.ts +++ b/packages/siop-oid4vp/lib/id-token/IDToken.ts @@ -1,4 +1,4 @@ -import { calculateJwkThumbprintUri, JwtHeader, JwtIssuer, parseJWT } from '@sphereon/oid4vci-common' +import { calculateJwkThumbprintUri, JwtHeader, JwtIssuer, parseJWT } from '@sphereon/common' import { AuthorizationResponseOpts, VerifyAuthorizationResponseOpts } from '../authorization-response' import { assertValidVerifyOpts } from '../authorization-response/Opts' diff --git a/packages/siop-oid4vp/lib/op/OP.ts b/packages/siop-oid4vp/lib/op/OP.ts index 0b038e3f..6f91a3f9 100644 --- a/packages/siop-oid4vp/lib/op/OP.ts +++ b/packages/siop-oid4vp/lib/op/OP.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events' -import { JwtIssuer, uuidv4 } from '@sphereon/oid4vci-common' +import { JwtIssuer, uuidv4 } from '@sphereon/common' import { IIssuerId } from '@sphereon/ssi-types' import { AuthorizationRequest, URI, VerifyAuthorizationRequestOpts } from '../authorization-request' diff --git a/packages/siop-oid4vp/lib/request-object/Payload.ts b/packages/siop-oid4vp/lib/request-object/Payload.ts index 01101d39..021fd9cb 100644 --- a/packages/siop-oid4vp/lib/request-object/Payload.ts +++ b/packages/siop-oid4vp/lib/request-object/Payload.ts @@ -1,4 +1,4 @@ -import { uuidv4 } from '@sphereon/oid4vci-common' +import { uuidv4 } from '@sphereon/common' import { CreateAuthorizationRequestOpts, createPresentationDefinitionClaimsProperties } from '../authorization-request' import { createRequestRegistration } from '../authorization-request/RequestRegistration' diff --git a/packages/siop-oid4vp/lib/request-object/RequestObject.ts b/packages/siop-oid4vp/lib/request-object/RequestObject.ts index 39655947..aac61e24 100644 --- a/packages/siop-oid4vp/lib/request-object/RequestObject.ts +++ b/packages/siop-oid4vp/lib/request-object/RequestObject.ts @@ -1,4 +1,4 @@ -import { JwtIssuer, parseJWT } from '@sphereon/oid4vci-common' +import { JwtIssuer, parseJWT } from '@sphereon/common' import { ClaimPayloadCommonOpts, ClaimPayloadOptsVID1, CreateAuthorizationRequestOpts } from '../authorization-request' import { assertValidAuthorizationRequestOpts } from '../authorization-request/Opts' diff --git a/packages/siop-oid4vp/lib/request-object/types.ts b/packages/siop-oid4vp/lib/request-object/types.ts index b8887a1d..8ea041e4 100644 --- a/packages/siop-oid4vp/lib/request-object/types.ts +++ b/packages/siop-oid4vp/lib/request-object/types.ts @@ -1,4 +1,4 @@ -import { JwtIssuer } from '@sphereon/oid4vci-common' +import { JwtIssuer } from '@sphereon/common' import { ClaimPayloadCommonOpts, RequestObjectPayloadOpts } from '../authorization-request' import { ObjectBy } from '../types' diff --git a/packages/siop-oid4vp/lib/rp/RP.ts b/packages/siop-oid4vp/lib/rp/RP.ts index bc76e6a2..1e43d77f 100644 --- a/packages/siop-oid4vp/lib/rp/RP.ts +++ b/packages/siop-oid4vp/lib/rp/RP.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events' -import { JwtIssuer, uuidv4 } from '@sphereon/oid4vci-common' +import { JwtIssuer, uuidv4 } from '@sphereon/common' import { Hasher } from '@sphereon/ssi-types' import { diff --git a/packages/siop-oid4vp/lib/types/SIOP.types.ts b/packages/siop-oid4vp/lib/types/SIOP.types.ts index 4ed08191..55321608 100644 --- a/packages/siop-oid4vp/lib/types/SIOP.types.ts +++ b/packages/siop-oid4vp/lib/types/SIOP.types.ts @@ -1,6 +1,6 @@ // noinspection JSUnusedGlobalSymbols -import { SigningAlgo } from '@sphereon/oid4vci-common' +import { SigningAlgo } from '@sphereon/common' import { Format, PresentationDefinitionV1, PresentationDefinitionV2 } from '@sphereon/pex-models' import { AdditionalClaims, diff --git a/packages/siop-oid4vp/lib/types/VpJwtIssuer.ts b/packages/siop-oid4vp/lib/types/VpJwtIssuer.ts index 2c3ab73f..716c91fc 100644 --- a/packages/siop-oid4vp/lib/types/VpJwtIssuer.ts +++ b/packages/siop-oid4vp/lib/types/VpJwtIssuer.ts @@ -1,4 +1,4 @@ -import { CreateJwtCallback as CreateJwtCallbackBase, JwtIssuanceContextBase, JwtIssuer } from '@sphereon/oid4vci-common' +import { CreateJwtCallback as CreateJwtCallbackBase, JwtIssuanceContextBase, JwtIssuer } from '@sphereon/common' import { AuthorizationResponseOpts } from '../authorization-response' diff --git a/packages/siop-oid4vp/lib/types/VpJwtVerifier.ts b/packages/siop-oid4vp/lib/types/VpJwtVerifier.ts index d700d3e0..8d8781cd 100644 --- a/packages/siop-oid4vp/lib/types/VpJwtVerifier.ts +++ b/packages/siop-oid4vp/lib/types/VpJwtVerifier.ts @@ -13,9 +13,9 @@ import { SigningAlgo, VerifyJwtCallbackBase, X5cJwtVerifier, -} from '@sphereon/oid4vci-common' -import { getJwtVerifierWithContext as getJwtVerifierWithContextCommon } from '@sphereon/oid4vci-common' -import { JwtType, parseJWT } from '@sphereon/oid4vci-common' +} from '@sphereon/common' +import { getJwtVerifierWithContext as getJwtVerifierWithContextCommon } from '@sphereon/common' +import { JwtType, parseJWT } from '@sphereon/common' import SIOPErrors from './Errors' import { RequestObjectPayload } from './SIOP.types' diff --git a/packages/siop-oid4vp/package.json b/packages/siop-oid4vp/package.json index 312f442f..0a76de16 100644 --- a/packages/siop-oid4vp/package.json +++ b/packages/siop-oid4vp/package.json @@ -13,7 +13,7 @@ "uninstall": "rimraf dist coverage node_modules" }, "dependencies": { - "@sphereon/oid4vci-common": "workspace:*", + "@sphereon/common": "workspace:*", "@astronautlabs/jsonpath": "^1.1.2", "@sphereon/did-uni-client": "^0.6.2", "@sphereon/pex": "^3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e143606a..bf0afb94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,12 +65,15 @@ importers: '@digitalcredentials/vc': specifier: ^5.0.0 version: 5.0.0(encoding@0.1.13)(expo@48.0.21(@babel/core@7.24.9)(encoding@0.1.13))(react-native@0.71.19(@babel/core@7.24.9)(@babel/preset-env@7.24.8(@babel/core@7.24.9))(encoding@0.1.13)(react@18.3.1))(web-streams-polyfill@3.3.3) + '@sphereon/common': + specifier: workspace:* + version: link:../common '@sphereon/oid4vci-client': specifier: workspace:* version: link:../client '@sphereon/oid4vci-common': specifier: workspace:* - version: link:../common + version: link:../oid4vci-common '@sphereon/oid4vci-issuer': specifier: workspace:* version: link:../issuer @@ -111,9 +114,12 @@ importers: packages/client: dependencies: - '@sphereon/oid4vci-common': + '@sphereon/common': specifier: workspace:* version: link:../common + '@sphereon/oid4vci-common': + specifier: workspace:* + version: link:../oid4vci-common '@sphereon/ssi-types': specifier: 0.28.0 version: 0.28.0 @@ -205,9 +211,6 @@ importers: '@sphereon/ssi-types': specifier: 0.28.0 version: 0.28.0 - cross-fetch: - specifier: ^3.1.8 - version: 3.1.8(encoding@0.1.13) jwt-decode: specifier: ^4.0.0 version: 4.0.0 @@ -236,15 +239,15 @@ importers: packages/did-auth-siop-adapter: dependencies: + '@sphereon/common': + specifier: workspace:* + version: link:../common '@sphereon/did-auth-siop': specifier: workspace:* version: link:../siop-oid4vp '@sphereon/did-uni-client': specifier: ^0.6.2 version: 0.6.3(encoding@0.1.13) - '@sphereon/oid4vci-common': - specifier: workspace:* - version: link:../common '@sphereon/wellknown-dids-client': specifier: ^0.1.3 version: 0.1.3(encoding@0.1.13) @@ -267,9 +270,12 @@ importers: packages/issuer: dependencies: - '@sphereon/oid4vci-common': + '@sphereon/common': specifier: workspace:* version: link:../common + '@sphereon/oid4vci-common': + specifier: workspace:* + version: link:../oid4vci-common '@sphereon/ssi-types': specifier: 0.28.0 version: 0.28.0 @@ -301,9 +307,12 @@ importers: packages/issuer-rest: dependencies: - '@sphereon/oid4vci-common': + '@sphereon/common': specifier: workspace:* version: link:../common + '@sphereon/oid4vci-common': + specifier: workspace:* + version: link:../oid4vci-common '@sphereon/oid4vci-issuer': specifier: workspace:* version: link:../issuer @@ -384,17 +393,54 @@ importers: specifier: ^29.1.0 version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(jest@29.7.0(@types/node@18.19.42)(ts-node@10.9.2(@types/node@18.19.42)(typescript@5.4.5)))(typescript@5.4.5) + packages/oid4vci-common: + dependencies: + '@sphereon/common': + specifier: workspace:* + version: link:../common + '@sphereon/ssi-types': + specifier: 0.28.0 + version: 0.28.0 + cross-fetch: + specifier: ^3.1.8 + version: 3.1.8(encoding@0.1.13) + jwt-decode: + specifier: ^4.0.0 + version: 4.0.0 + sha.js: + specifier: ^2.4.11 + version: 2.4.11 + uint8arrays: + specifier: 3.1.1 + version: 3.1.1 + uuid: + specifier: ^9.0.0 + version: 9.0.1 + devDependencies: + '@types/jest': + specifier: ^29.5.12 + version: 29.5.12 + '@types/sha.js': + specifier: ^2.4.4 + version: 2.4.4 + '@types/uuid': + specifier: ^9.0.1 + version: 9.0.8 + typescript: + specifier: 5.4.5 + version: 5.4.5 + packages/siop-oid4vp: dependencies: '@astronautlabs/jsonpath': specifier: ^1.1.2 version: 1.1.2 + '@sphereon/common': + specifier: workspace:* + version: link:../common '@sphereon/did-uni-client': specifier: ^0.6.2 version: 0.6.3(encoding@0.1.13) - '@sphereon/oid4vci-common': - specifier: workspace:* - version: link:../common '@sphereon/pex': specifier: ^3.3.2 version: 3.3.3 @@ -10527,7 +10573,7 @@ snapshots: '@expo/bunyan': 4.0.0 '@expo/metro-config': 0.7.1 '@expo/osascript': 2.0.33 - '@expo/spawn-async': 1.5.0 + '@expo/spawn-async': 1.7.2 body-parser: 1.20.2 chalk: 4.1.2 connect: 3.7.0 @@ -10604,7 +10650,7 @@ snapshots: '@expo/osascript@2.0.33': dependencies: - '@expo/spawn-async': 1.5.0 + '@expo/spawn-async': 1.7.2 exec-async: 2.2.0 '@expo/osascript@2.1.3': @@ -10615,7 +10661,7 @@ snapshots: '@expo/package-manager@1.0.3': dependencies: '@expo/json-file': 8.3.3 - '@expo/spawn-async': 1.5.0 + '@expo/spawn-async': 1.7.2 ansi-regex: 5.0.1 chalk: 4.1.2 find-up: 5.0.0 @@ -14385,9 +14431,9 @@ snapshots: execa@5.0.0: dependencies: cross-spawn: 7.0.3 - get-stream: 6.0.0 + get-stream: 6.0.1 human-signals: 2.1.0 - is-stream: 2.0.0 + is-stream: 2.0.1 merge-stream: 2.0.0 npm-run-path: 4.0.1 onetime: 5.1.2 @@ -15730,7 +15776,7 @@ snapshots: jest-diff@29.7.0: dependencies: - chalk: 4.1.0 + chalk: 4.1.2 diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.7.0 @@ -17065,7 +17111,7 @@ snapshots: array-differ: 3.0.0 array-union: 2.1.0 arrify: 2.0.1 - minimatch: 3.0.5 + minimatch: 3.1.2 mute-stream@0.0.8: {} @@ -17296,7 +17342,7 @@ snapshots: '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.7 axios: 1.7.2 - chalk: 4.1.0 + chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 cliui: 8.0.1 @@ -17480,9 +17526,9 @@ snapshots: ora@5.3.0: dependencies: bl: 4.1.0 - chalk: 4.1.0 + chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.6.1 + cli-spinners: 2.9.2 is-interactive: 1.0.0 log-symbols: 4.1.0 strip-ansi: 6.0.1