@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.50.101 → 0.34.1-feature.SSISDK.50.116
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 +11 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -14
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/services/OID4VCIHolderService.ts +10 -23
- package/src/types/FirstPartyMachine.ts +5 -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.50.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,27 +26,27 @@
|
|
|
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.98",
|
|
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.50.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.50.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.50.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.50.
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.50.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.50.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.50.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.50.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.50.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.50.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.50.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.50.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.50.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.50.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.50.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.50.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.50.
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-feature.DIIPv4.98",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-feature.DIIPv4.98",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
50
50
|
"@veramo/core": "4.2.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/utils": "4.2.0",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"xstate": "^4.38.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@sphereon/oid4vc-common": "0.19.1-feature.
|
|
63
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.50.
|
|
62
|
+
"@sphereon/oid4vc-common": "0.19.1-feature.DIIPv4.98",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.50.116+54ce8e3a",
|
|
64
64
|
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
|
|
65
65
|
"@types/i18n-js": "^3.8.9",
|
|
66
66
|
"@types/lodash.memoize": "^4.1.9",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"OID4VCI",
|
|
91
91
|
"State Machine"
|
|
92
92
|
],
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "54ce8e3a9ffc7eec66b27f60a05fb4aff91a38c3"
|
|
94
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,10 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
|
|
|
386
384
|
}
|
|
387
385
|
|
|
388
386
|
if (configurationId) {
|
|
389
|
-
|
|
387
|
+
if (!format) {
|
|
388
|
+
return Promise.reject(Error('format parameter missing from input'))
|
|
389
|
+
}
|
|
390
|
+
const allSupported = client.getCredentialsSupported(format)
|
|
390
391
|
return Object.fromEntries(
|
|
391
392
|
Object.entries(allSupported).filter(
|
|
392
393
|
([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId,
|
|
@@ -394,29 +395,15 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
|
|
|
394
395
|
)
|
|
395
396
|
}
|
|
396
397
|
|
|
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'))*/
|
|
398
|
+
if (!client.credentialOffer) {
|
|
399
|
+
return Promise.reject(Error('openID4VCIClient has no credentialOffer'))
|
|
401
400
|
}
|
|
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
|
-
}
|
|
401
|
+
if (!types) {
|
|
402
|
+
return Promise.reject(Error('openID4VCIClient has no types'))
|
|
416
403
|
}
|
|
417
404
|
|
|
418
405
|
const offerSupported = getSupportedCredentials({
|
|
419
|
-
types:
|
|
406
|
+
types: [types],
|
|
420
407
|
format,
|
|
421
408
|
version: client.version(),
|
|
422
409
|
issuerMetadata: client.endpointMetadata.credentialIssuerMetadata,
|
|
@@ -596,7 +583,7 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
|
|
|
596
583
|
case 'jwt':
|
|
597
584
|
case 'jwt_vc_json':
|
|
598
585
|
case 'jwt_vc':
|
|
599
|
-
case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
586
|
+
//case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
600
587
|
case 'dc+sd-jwt':
|
|
601
588
|
case 'mso_mdoc': {
|
|
602
589
|
const supportedPreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString> = jwtCryptographicSuitePreferences.filter(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BaseActionObject, Interpreter, ResolveTypegenMeta, ServiceMap, State, StateMachine, StatesConfig, TypegenDisabled } from 'xstate'
|
|
2
|
-
import { OpenID4VCIClientState } from '@sphereon/oid4vci-client'
|
|
3
|
-
import { DidAuthConfig, Party } from '@sphereon/ssi-sdk.data-store'
|
|
4
1
|
import { RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop'
|
|
5
|
-
import {
|
|
2
|
+
import { OpenID4VCIClientState } from '@sphereon/oid4vci-client'
|
|
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'
|
|
8
|
-
import { ErrorDetails, RequiredContext } from './IOID4VCIHolder'
|
|
9
7
|
import { DcqlQuery } from 'dcql'
|
|
8
|
+
import { BaseActionObject, Interpreter, ResolveTypegenMeta, ServiceMap, State, StateMachine, StatesConfig, TypegenDisabled } from 'xstate'
|
|
9
|
+
import { ErrorDetails, RequiredContext } from './IOID4VCIHolder'
|
|
10
10
|
|
|
11
11
|
export enum FirstPartyMachineStateTypes {
|
|
12
12
|
sendAuthorizationChallengeRequest = 'sendAuthorizationChallengeRequest',
|