@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.78.306 → 0.34.1-feature.SSISDK.82.linkedVP.326
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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +6 -6
- package/src/services/OID4VCIHolderService.ts +1 -1
- package/src/types/IOID4VCIHolder.ts +10 -10
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.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
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-next.
|
|
29
|
+
"@sphereon/did-auth-siop": "0.19.1-next.226",
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/oid4vci-client": "0.19.1-next.
|
|
32
|
-
"@sphereon/oid4vci-common": "0.19.1-next.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store-types": "0.34.1-feature.SSISDK.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-next.226",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-next.226",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store-types": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
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-next.
|
|
63
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.
|
|
62
|
+
"@sphereon/oid4vc-common": "0.19.1-next.226",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.82.linkedVP.326+2b4ebda9",
|
|
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": "2b4ebda97cd73ad5b73555cb8bb9d087f0d98395"
|
|
94
94
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialOfferClient, MetadataClient, OpenID4VCIClient } from '@sphereon/oid4vci-client'
|
|
1
|
+
import { CredentialOfferClient, MetadataClient, OpenID4VCIClient, OpenID4VCIClientV1_0_15 } from '@sphereon/oid4vci-client'
|
|
2
2
|
import {
|
|
3
3
|
AuthorizationDetails,
|
|
4
4
|
AuthorizationRequestOpts,
|
|
@@ -402,10 +402,10 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
402
402
|
if (authFormats && authFormats.length > 0) {
|
|
403
403
|
formats = Array.from(new Set(authFormats))
|
|
404
404
|
}
|
|
405
|
-
let oid4vciClient:
|
|
405
|
+
let oid4vciClient: OpenID4VCIClientV1_0_15
|
|
406
406
|
let offer: CredentialOfferRequestWithBaseUrl | undefined
|
|
407
407
|
if (requestData.existingClientState) {
|
|
408
|
-
oid4vciClient = await
|
|
408
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromState({ state: requestData.existingClientState })
|
|
409
409
|
offer = oid4vciClient.credentialOffer
|
|
410
410
|
} else {
|
|
411
411
|
offer = requestData.credentialOffer
|
|
@@ -427,7 +427,7 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
427
427
|
if (!offer) {
|
|
428
428
|
// else no offer, meaning we have an issuer URL
|
|
429
429
|
logger.log(`Issuer url received (no credential offer): ${uri}`)
|
|
430
|
-
oid4vciClient = await
|
|
430
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromCredentialIssuer({
|
|
431
431
|
credentialIssuer: uri,
|
|
432
432
|
authorizationRequest: authorizationRequestOpts,
|
|
433
433
|
clientId: authorizationRequestOpts.clientId,
|
|
@@ -435,7 +435,7 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
435
435
|
})
|
|
436
436
|
} else {
|
|
437
437
|
logger.log(`Credential offer received: ${uri}`)
|
|
438
|
-
oid4vciClient = await
|
|
438
|
+
oid4vciClient = await OpenID4VCIClientV1_0_15.fromURI({
|
|
439
439
|
uri,
|
|
440
440
|
authorizationRequest: authorizationRequestOpts,
|
|
441
441
|
clientId: authorizationRequestOpts.clientId,
|
|
@@ -623,7 +623,7 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
623
623
|
return Promise.reject(Error('Missing openID4VCI client state in context'))
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
const client = await
|
|
626
|
+
const client = await OpenID4VCIClientV1_0_15.fromState({ state: openID4VCIClientState })
|
|
627
627
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|
|
628
628
|
client,
|
|
629
629
|
vcFormatPreferences: this.vcFormatPreferences,
|
|
@@ -382,7 +382,7 @@ export const getCredentialConfigsSupportedBySingleTypeOrId = async (
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
if (configurationId) {
|
|
385
|
-
const allSupported = client.getCredentialsSupported(format)
|
|
385
|
+
const allSupported = client.getCredentialsSupported(undefined, format)
|
|
386
386
|
return Object.fromEntries(
|
|
387
387
|
Object.entries(allSupported).filter(
|
|
388
388
|
([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common'
|
|
2
|
+
import { OpenID4VCIClientState, OpenID4VCIClientV1_0_15 } from '@sphereon/oid4vci-client'
|
|
2
3
|
import {
|
|
3
4
|
AuthorizationRequestOpts,
|
|
4
5
|
AuthorizationResponse,
|
|
@@ -15,7 +16,6 @@ import {
|
|
|
15
16
|
MetadataDisplay,
|
|
16
17
|
NotificationRequest,
|
|
17
18
|
} from '@sphereon/oid4vci-common'
|
|
18
|
-
import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common'
|
|
19
19
|
import { CreateOrGetIdentifierOpts, IdentifierProviderOpts, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
|
|
20
20
|
import {
|
|
21
21
|
IIdentifierResolution,
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service'
|
|
27
27
|
import { IContactManager } from '@sphereon/ssi-sdk.contact-manager'
|
|
28
28
|
import { ICredentialStore } from '@sphereon/ssi-sdk.credential-store'
|
|
29
|
+
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
|
|
29
30
|
import {
|
|
30
31
|
DigitalCredential,
|
|
31
32
|
IBasicCredentialClaim,
|
|
@@ -38,7 +39,6 @@ import {
|
|
|
38
39
|
import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding'
|
|
39
40
|
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
|
|
40
41
|
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
|
|
41
|
-
import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
|
|
42
42
|
import { IDidAuthSiopOpAuthenticator } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth'
|
|
43
43
|
import {
|
|
44
44
|
HasherSync,
|
|
@@ -514,7 +514,7 @@ export type CredentialToAccept = {
|
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
export type GetCredentialConfigsSupportedArgs = {
|
|
517
|
-
client:
|
|
517
|
+
client: OpenID4VCIClientV1_0_15
|
|
518
518
|
vcFormatPreferences: Array<string>
|
|
519
519
|
format?: Array<string>
|
|
520
520
|
types?: Array<Array<string>>
|
|
@@ -526,7 +526,7 @@ export type GetCredentialConfigsSupportedArgs = {
|
|
|
526
526
|
* It can potentially return multiple results mainly because of different formats.
|
|
527
527
|
*/
|
|
528
528
|
export type GetCredentialConfigsSupportedBySingleTypeOrIdArgs = {
|
|
529
|
-
client:
|
|
529
|
+
client: OpenID4VCIClientV1_0_15
|
|
530
530
|
vcFormatPreferences: Array<string>
|
|
531
531
|
format?: string[]
|
|
532
532
|
types?: string[]
|
|
@@ -561,7 +561,7 @@ export type GetDefaultIssuanceOptsArgs = {
|
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
export type DefaultIssuanceOpts = {
|
|
564
|
-
client:
|
|
564
|
+
client: OpenID4VCIClientV1_0_15
|
|
565
565
|
}
|
|
566
566
|
|
|
567
567
|
export type GetIdentifierArgs = {
|
|
@@ -598,7 +598,7 @@ export type CreateIdentifierCreateOpts = {
|
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
export type GetIssuanceOptsArgs = {
|
|
601
|
-
client:
|
|
601
|
+
client: OpenID4VCIClientV1_0_15
|
|
602
602
|
credentialsSupported: Record<string, CredentialConfigurationSupported>
|
|
603
603
|
serverMetadata: EndpointMetadataResult
|
|
604
604
|
context: RequiredContext
|
|
@@ -610,13 +610,13 @@ export type GetIssuanceOptsArgs = {
|
|
|
610
610
|
|
|
611
611
|
export type GetIssuanceDidMethodArgs = {
|
|
612
612
|
credentialSupported: CredentialConfigurationSupported
|
|
613
|
-
client:
|
|
613
|
+
client: OpenID4VCIClientV1_0_15
|
|
614
614
|
didMethodPreferences: Array<SupportedDidMethodEnum>
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
export type GetIssuanceCryptoSuiteArgs = {
|
|
618
618
|
credentialSupported: CredentialConfigurationSupported
|
|
619
|
-
client:
|
|
619
|
+
client: OpenID4VCIClientV1_0_15
|
|
620
620
|
jwtCryptographicSuitePreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString>
|
|
621
621
|
jsonldCryptographicSuitePreferences: Array<string>
|
|
622
622
|
}
|
|
@@ -624,7 +624,7 @@ export type GetIssuanceCryptoSuiteArgs = {
|
|
|
624
624
|
export type GetCredentialArgs = {
|
|
625
625
|
pin?: string
|
|
626
626
|
issuanceOpt: IssuanceOpts
|
|
627
|
-
client:
|
|
627
|
+
client: OpenID4VCIClientV1_0_15
|
|
628
628
|
accessTokenOpts?: AccessTokenOpts
|
|
629
629
|
}
|
|
630
630
|
|