@sphereon/ssi-sdk.oid4vci-holder 0.34.1-fix.79 → 0.34.1-next.278
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 +56 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -36
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +14 -14
- package/src/machines/firstPartyMachine.ts +1 -1
- package/src/machines/oid4vciMachine.ts +1 -1
- package/src/mappers/OIDC4VCIBrandingMapper.ts +1 -1
- package/src/services/OID4VCIHolderService.ts +2 -2
- package/src/types/FirstPartyMachine.ts +1 -1
- package/src/types/IOID4VCIHolder.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.oid4vci-holder",
|
|
3
|
-
"version": "0.34.1-
|
|
3
|
+
"version": "0.34.1-next.278+0eacb25b",
|
|
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-
|
|
29
|
+
"@sphereon/did-auth-siop": "0.19.1-next.220",
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/oid4vci-client": "0.19.1-
|
|
32
|
-
"@sphereon/oid4vci-common": "0.19.1-
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-
|
|
41
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-next.220",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-next.220",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-next.278+0eacb25b",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-next.278+0eacb25b",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-next.278+0eacb25b",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-next.278+0eacb25b",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-next.278+0eacb25b",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-next.278+0eacb25b",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-next.278+0eacb25b",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-next.278+0eacb25b",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store-types": "0.34.1-next.278+0eacb25b",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-next.278+0eacb25b",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-next.278+0eacb25b",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-next.278+0eacb25b",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-next.278+0eacb25b",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-next.278+0eacb25b",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-next.278+0eacb25b",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-next.278+0eacb25b",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-next.278+0eacb25b",
|
|
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-
|
|
63
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-
|
|
62
|
+
"@sphereon/oid4vc-common": "0.19.1-next.220",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-next.278+0eacb25b",
|
|
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": "0eacb25b6e38cef88d04d696d84e3c2ebcf89ede"
|
|
94
94
|
}
|
|
@@ -9,8 +9,6 @@ import {
|
|
|
9
9
|
CredentialOfferRequestWithBaseUrl,
|
|
10
10
|
DefaultURISchemes,
|
|
11
11
|
EndpointMetadataResult,
|
|
12
|
-
getTypesFromAuthorizationDetails,
|
|
13
|
-
getTypesFromCredentialOffer,
|
|
14
12
|
getTypesFromObject,
|
|
15
13
|
Jwt,
|
|
16
14
|
NotificationRequest,
|
|
@@ -31,12 +29,11 @@ import {
|
|
|
31
29
|
import { IJwtService, JwsHeader } from '@sphereon/ssi-sdk-ext.jwt-service'
|
|
32
30
|
import { signatureAlgorithmFromKey } from '@sphereon/ssi-sdk-ext.key-utils'
|
|
33
31
|
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
32
|
+
import { ensureRawDocument } from '@sphereon/ssi-sdk.data-store-types'
|
|
34
33
|
import {
|
|
35
34
|
ConnectionType,
|
|
36
35
|
CorrelationIdentifierType,
|
|
37
36
|
CredentialCorrelationType,
|
|
38
|
-
CredentialRole,
|
|
39
|
-
ensureRawDocument,
|
|
40
37
|
FindPartyArgs,
|
|
41
38
|
IBasicCredentialLocaleBranding,
|
|
42
39
|
IBasicIssuerLocaleBranding,
|
|
@@ -45,10 +42,11 @@ import {
|
|
|
45
42
|
IIssuerLocaleBranding,
|
|
46
43
|
NonPersistedIdentity,
|
|
47
44
|
Party,
|
|
48
|
-
} from '@sphereon/ssi-sdk.data-store'
|
|
45
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
49
46
|
import {
|
|
50
47
|
CredentialMapper,
|
|
51
48
|
type CredentialProofFormat,
|
|
49
|
+
CredentialRole,
|
|
52
50
|
HasherSync,
|
|
53
51
|
IVerifiableCredential,
|
|
54
52
|
JoseSignatureAlgorithm,
|
|
@@ -70,6 +68,7 @@ import {
|
|
|
70
68
|
W3CVerifiableCredential,
|
|
71
69
|
} from '@veramo/core'
|
|
72
70
|
import { asArray, computeEntryHash } from '@veramo/utils'
|
|
71
|
+
import fetch from 'cross-fetch'
|
|
73
72
|
import { decodeJWT } from 'did-jwt'
|
|
74
73
|
import { v4 as uuidv4 } from 'uuid'
|
|
75
74
|
import { OID4VCIMachine } from '../machines/oid4vciMachine'
|
|
@@ -85,7 +84,6 @@ import {
|
|
|
85
84
|
startFirstPartApplicationMachine,
|
|
86
85
|
verifyCredentialToAccept,
|
|
87
86
|
} from '../services/OID4VCIHolderService'
|
|
88
|
-
import 'cross-fetch/polyfill'
|
|
89
87
|
import {
|
|
90
88
|
AddContactIdentityArgs,
|
|
91
89
|
AssertValidCredentialsArgs,
|
|
@@ -229,7 +227,7 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
229
227
|
oid4vciHolderStoreIssuerBranding: this.oid4vciHolderStoreIssuerBranding.bind(this),
|
|
230
228
|
}
|
|
231
229
|
|
|
232
|
-
private readonly vcFormatPreferences: Array<string> = ['dc+sd-jwt', 'vc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc']
|
|
230
|
+
private readonly vcFormatPreferences: Array<string> = ['dc+sd-jwt', 'vc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc'] // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
233
231
|
private readonly jsonldCryptographicSuitePreferences: Array<string> = [
|
|
234
232
|
'Ed25519Signature2018',
|
|
235
233
|
'EcdsaSecp256k1Signature2019',
|
|
@@ -400,7 +398,6 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
400
398
|
formats = Array.from(new Set(authFormats))
|
|
401
399
|
}
|
|
402
400
|
let oid4vciClient: OpenID4VCIClient
|
|
403
|
-
let types: string[][] | undefined = undefined
|
|
404
401
|
let offer: CredentialOfferRequestWithBaseUrl | undefined
|
|
405
402
|
if (requestData.existingClientState) {
|
|
406
403
|
oid4vciClient = await OpenID4VCIClient.fromState({ state: requestData.existingClientState })
|
|
@@ -442,20 +439,23 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
442
439
|
}
|
|
443
440
|
}
|
|
444
441
|
|
|
442
|
+
let configurationIds: Array<string> = []
|
|
445
443
|
if (offer) {
|
|
446
|
-
|
|
444
|
+
configurationIds = offer.original_credential_offer.credential_configuration_ids
|
|
447
445
|
} else {
|
|
448
|
-
|
|
449
|
-
.
|
|
450
|
-
.
|
|
446
|
+
configurationIds = asArray(authorizationRequestOpts.authorizationDetails)
|
|
447
|
+
.filter((authDetails): authDetails is Exclude<AuthorizationDetails, string> => typeof authDetails !== 'string')
|
|
448
|
+
.map((authReqOpts) => authReqOpts.credential_configuration_id)
|
|
449
|
+
.filter((id): id is string => !!id)
|
|
451
450
|
}
|
|
452
451
|
|
|
453
|
-
const serverMetadata = await oid4vciClient.retrieveServerMetadata()
|
|
454
452
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|
|
455
453
|
client: oid4vciClient,
|
|
456
454
|
vcFormatPreferences: formats,
|
|
457
|
-
|
|
455
|
+
configurationIds,
|
|
458
456
|
})
|
|
457
|
+
|
|
458
|
+
const serverMetadata = await oid4vciClient.retrieveServerMetadata()
|
|
459
459
|
const credentialBranding = await getCredentialBranding({ credentialsSupported, context })
|
|
460
460
|
const authorizationCodeURL = oid4vciClient.authorizationURL
|
|
461
461
|
if (authorizationCodeURL) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assign, createMachine, DoneInvokeEvent, interpret } from 'xstate'
|
|
2
2
|
import { AuthorizationChallengeCodeResponse, AuthorizationChallengeError, AuthorizationChallengeErrorResponse } from '@sphereon/oid4vci-common'
|
|
3
|
-
import { DidAuthConfig } from '@sphereon/ssi-sdk.data-store'
|
|
3
|
+
import { DidAuthConfig } from '@sphereon/ssi-sdk.data-store-types'
|
|
4
4
|
import { CreateConfigResult } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth'
|
|
5
5
|
import { createConfig, getSiopRequest, sendAuthorizationChallengeRequest, sendAuthorizationResponse } from '../services/FirstPartyMachineServices'
|
|
6
6
|
import { translate } from '../localization/Localization'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthorizationChallengeCodeResponse, AuthzFlowType, toAuthorizationResponsePayload } from '@sphereon/oid4vci-common'
|
|
2
|
-
import { IBasicIssuerLocaleBranding, Identity, IIssuerLocaleBranding, Party } from '@sphereon/ssi-sdk.data-store'
|
|
2
|
+
import { IBasicIssuerLocaleBranding, Identity, IIssuerLocaleBranding, Party } from '@sphereon/ssi-sdk.data-store-types'
|
|
3
3
|
import { assign, createMachine, DoneInvokeEvent, interpret } from 'xstate'
|
|
4
4
|
import { translate } from '../localization/Localization'
|
|
5
5
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CredentialsSupportedDisplay, NameAndLocale } from '@sphereon/oid4vci-common'
|
|
2
|
-
import { IBasicCredentialClaim, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store'
|
|
2
|
+
import { IBasicCredentialClaim, IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store-types'
|
|
3
3
|
import { SdJwtClaimDisplayMetadata, SdJwtClaimMetadata, SdJwtClaimPath, SdJwtTypeDisplayMetadata } from '@sphereon/ssi-types'
|
|
4
4
|
import {
|
|
5
5
|
IssuerLocaleBrandingFromArgs,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from '@sphereon/ssi-sdk-ext.identifier-resolution'
|
|
24
24
|
import { keyTypeFromCryptographicSuite } from '@sphereon/ssi-sdk-ext.key-utils'
|
|
25
25
|
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
26
|
-
import { IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store'
|
|
26
|
+
import { IBasicCredentialLocaleBranding, IBasicIssuerLocaleBranding } from '@sphereon/ssi-sdk.data-store-types'
|
|
27
27
|
import {
|
|
28
28
|
CredentialMapper,
|
|
29
29
|
Hasher,
|
|
@@ -580,7 +580,7 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
|
|
|
580
580
|
case 'jwt':
|
|
581
581
|
case 'jwt_vc_json':
|
|
582
582
|
case 'jwt_vc':
|
|
583
|
-
//case 'vc+sd-jwt':
|
|
583
|
+
//case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
|
|
584
584
|
case 'dc+sd-jwt':
|
|
585
585
|
case 'mso_mdoc': {
|
|
586
586
|
const supportedPreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString> = jwtCryptographicSuitePreferences.filter(
|
|
@@ -2,7 +2,7 @@ import { RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop'
|
|
|
2
2
|
import { OpenID4VCIClientState } from '@sphereon/oid4vci-client'
|
|
3
3
|
import { AuthorizationChallengeCodeResponse } from '@sphereon/oid4vci-common'
|
|
4
4
|
import { UniqueDigitalCredential } from '@sphereon/ssi-sdk.credential-store'
|
|
5
|
-
import { DidAuthConfig, Party } from '@sphereon/ssi-sdk.data-store'
|
|
5
|
+
import { DidAuthConfig, Party } from '@sphereon/ssi-sdk.data-store-types'
|
|
6
6
|
import { IIdentifier } from '@veramo/core'
|
|
7
7
|
import { DcqlQuery } from 'dcql'
|
|
8
8
|
import { BaseActionObject, Interpreter, ResolveTypegenMeta, ServiceMap, State, StateMachine, StatesConfig, TypegenDisabled } from 'xstate'
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
Identity,
|
|
35
35
|
IIssuerLocaleBranding,
|
|
36
36
|
Party,
|
|
37
|
-
} from '@sphereon/ssi-sdk.data-store'
|
|
37
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
38
38
|
import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding'
|
|
39
39
|
import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
|
|
40
40
|
import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
|