@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.26.55 → 0.34.1-feature.SSISDK.26.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -14
- package/dist/index.js.map +1 -1
- package/package.json +25 -24
- package/src/services/OID4VCIHolderService.ts +7 -23
- package/src/types/FirstPartyMachine.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.oid4vci-holder",
|
|
3
|
-
"version": "0.34.1-feature.SSISDK.26.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,40 +26,41 @@
|
|
|
26
26
|
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sphereon/did-auth-siop": "0.19.1-feature.
|
|
29
|
+
"@sphereon/did-auth-siop": "0.19.1-feature.DIIPv4.86",
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/oid4vci-client": "0.19.1-feature.
|
|
32
|
-
"@sphereon/oid4vci-common": "0.19.1-feature.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.26.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.26.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.26.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.26.
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.26.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.26.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.26.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.26.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.26.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.26.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.26.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.26.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.26.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.26.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.26.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.26.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.26.
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-feature.DIIPv4.86",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-feature.DIIPv4.86",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
50
50
|
"@veramo/core": "4.2.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/utils": "4.2.0",
|
|
53
53
|
"ajv": "^8.17.1",
|
|
54
54
|
"ajv-formats": "^3.0.1",
|
|
55
|
+
"dcql": "1.0.1",
|
|
55
56
|
"i18n-js": "^3.9.2",
|
|
56
57
|
"lodash.memoize": "^4.1.2",
|
|
57
58
|
"uuid": "^9.0.1",
|
|
58
59
|
"xstate": "^4.38.3"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
|
-
"@sphereon/oid4vc-common": "0.19.1-feature.
|
|
62
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.26.
|
|
62
|
+
"@sphereon/oid4vc-common": "0.19.1-feature.DIIPv4.86",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.26.74+130d3bc8",
|
|
63
64
|
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
|
|
64
65
|
"@types/i18n-js": "^3.8.9",
|
|
65
66
|
"@types/lodash.memoize": "^4.1.9",
|
|
@@ -89,5 +90,5 @@
|
|
|
89
90
|
"OID4VCI",
|
|
90
91
|
"State Machine"
|
|
91
92
|
],
|
|
92
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "130d3bc8f273240e64c2c2ad2a1623087430b89d"
|
|
93
94
|
}
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
AuthorizationChallengeCodeResponse,
|
|
4
4
|
CredentialConfigurationSupported,
|
|
5
5
|
CredentialConfigurationSupportedSdJwtVcV1_0_15,
|
|
6
|
-
CredentialOfferFormatV1_0_11,
|
|
7
6
|
CredentialResponse,
|
|
8
7
|
CredentialResponseV1_0_15,
|
|
9
8
|
CredentialSupportedSdJwtVc,
|
|
@@ -11,7 +10,6 @@ import {
|
|
|
11
10
|
getTypesFromCredentialSupported,
|
|
12
11
|
getTypesFromObject,
|
|
13
12
|
MetadataDisplay,
|
|
14
|
-
OpenId4VCIVersion,
|
|
15
13
|
} from '@sphereon/oid4vci-common'
|
|
16
14
|
import { KeyUse } from '@sphereon/ssi-sdk-ext.did-resolver-jwk'
|
|
17
15
|
import { getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
|
|
@@ -386,7 +384,7 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
|
|
|
386
384
|
}
|
|
387
385
|
|
|
388
386
|
if (configurationId) {
|
|
389
|
-
const allSupported = client.getCredentialsSupported(
|
|
387
|
+
const allSupported = client.getCredentialsSupported(format)
|
|
390
388
|
return Object.fromEntries(
|
|
391
389
|
Object.entries(allSupported).filter(
|
|
392
390
|
([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId,
|
|
@@ -394,29 +392,15 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
|
|
|
394
392
|
)
|
|
395
393
|
}
|
|
396
394
|
|
|
397
|
-
if (!
|
|
398
|
-
return Promise.reject(Error('openID4VCIClient has no credentialOffer
|
|
399
|
-
/*} else if (!format && !client.credentialOffer) {
|
|
400
|
-
return Promise.reject(Error('openID4VCIClient has no credentialOffer and no formats where provided'))*/
|
|
395
|
+
if (!client.credentialOffer) {
|
|
396
|
+
return Promise.reject(Error('openID4VCIClient has no credentialOffer'))
|
|
401
397
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
if (
|
|
405
|
-
client.version() > OpenId4VCIVersion.VER_1_0_09 &&
|
|
406
|
-
typeof client.credentialOffer.credential_offer === 'object' &&
|
|
407
|
-
'credentials' in client.credentialOffer.credential_offer
|
|
408
|
-
) {
|
|
409
|
-
format = client.credentialOffer.credential_offer.credentials
|
|
410
|
-
.filter((cred: CredentialOfferFormatV1_0_11 | string) => typeof cred !== 'string')
|
|
411
|
-
.map((cred: CredentialOfferFormatV1_0_11 | string) => (cred as CredentialOfferFormatV1_0_11).format)
|
|
412
|
-
if (format?.length === 0) {
|
|
413
|
-
format = undefined // Otherwise we would match nothing
|
|
414
|
-
}
|
|
415
|
-
}
|
|
398
|
+
if (!types) {
|
|
399
|
+
return Promise.reject(Error('openID4VCIClient has no types'))
|
|
416
400
|
}
|
|
417
401
|
|
|
418
402
|
const offerSupported = getSupportedCredentials({
|
|
419
|
-
types:
|
|
403
|
+
types: [types],
|
|
420
404
|
format,
|
|
421
405
|
version: client.version(),
|
|
422
406
|
issuerMetadata: client.endpointMetadata.credentialIssuerMetadata,
|
|
@@ -596,7 +580,7 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
|
|
|
596
580
|
case 'jwt':
|
|
597
581
|
case 'jwt_vc_json':
|
|
598
582
|
case 'jwt_vc':
|
|
599
|
-
case 'vc+sd-jwt':
|
|
583
|
+
//case 'vc+sd-jwt': FIXME re-enable for vcdm2
|
|
600
584
|
case 'dc+sd-jwt':
|
|
601
585
|
case 'mso_mdoc': {
|
|
602
586
|
const supportedPreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString> = jwtCryptographicSuitePreferences.filter(
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop'
|
|
2
2
|
import { OpenID4VCIClientState } from '@sphereon/oid4vci-client'
|
|
3
|
-
import { DidAuthConfig, Party } from '@sphereon/ssi-sdk.data-store'
|
|
4
|
-
import { PresentationDefinitionWithLocation, RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop'
|
|
5
|
-
import { UniqueDigitalCredential } from '@sphereon/ssi-sdk.credential-store'
|
|
6
3
|
import { AuthorizationChallengeCodeResponse } from '@sphereon/oid4vci-common'
|
|
4
|
+
import { UniqueDigitalCredential } from '@sphereon/ssi-sdk.credential-store'
|
|
5
|
+
import { DidAuthConfig, Party } from '@sphereon/ssi-sdk.data-store'
|
|
7
6
|
import { IIdentifier } from '@veramo/core'
|
|
7
|
+
import { DcqlQuery } from 'dcql'
|
|
8
|
+
import { BaseActionObject, Interpreter, ResolveTypegenMeta, ServiceMap, State, StateMachine, StatesConfig, TypegenDisabled } from 'xstate'
|
|
8
9
|
import { ErrorDetails, RequiredContext } from './IOID4VCIHolder'
|
|
9
10
|
|
|
10
11
|
export enum FirstPartyMachineStateTypes {
|
|
@@ -149,7 +150,7 @@ export type SiopV2AuthorizationRequestData = {
|
|
|
149
150
|
clientIdScheme?: string
|
|
150
151
|
clientId?: string
|
|
151
152
|
entityId?: string
|
|
152
|
-
|
|
153
|
+
dcqlQuery: DcqlQuery
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
export type FirstPartyMachineNavigationArgs = {
|