@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.13.50 → 0.34.1-feature.SSISDK.13.51
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 +26 -24
- 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 +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +16 -16
- package/src/services/OID4VCIHolderService.ts +1 -0
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.13.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
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.SSISDK.13.
|
|
29
|
+
"@sphereon/did-auth-siop": "0.19.1-feature.SSISDK.13.32",
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/oid4vci-client": "0.19.1-feature.SSISDK.13.
|
|
32
|
-
"@sphereon/oid4vci-common": "0.19.1-feature.SSISDK.13.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.13.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.13.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.13.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.13.
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.13.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.13.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.13.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.13.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.13.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.13.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.13.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.13.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.13.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.13.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.13.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.13.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.13.
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-feature.SSISDK.13.32",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-feature.SSISDK.13.32",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
50
50
|
"@veramo/core": "4.2.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/utils": "4.2.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"xstate": "^4.38.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@sphereon/oid4vc-common": "0.19.1-feature.SSISDK.13.
|
|
62
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.13.
|
|
61
|
+
"@sphereon/oid4vc-common": "0.19.1-feature.SSISDK.13.32",
|
|
62
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.13.51+99d5c01e",
|
|
63
63
|
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
|
|
64
64
|
"@types/i18n-js": "^3.8.9",
|
|
65
65
|
"@types/lodash.memoize": "^4.1.9",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"OID4VCI",
|
|
90
90
|
"State Machine"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "99d5c01e523013b800f1bb7f87a959393d64792b"
|
|
93
93
|
}
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
} from '@sphereon/ssi-sdk-ext.identifier-resolution'
|
|
31
31
|
import { IJwtService, JwsHeader } from '@sphereon/ssi-sdk-ext.jwt-service'
|
|
32
32
|
import { signatureAlgorithmFromKey } from '@sphereon/ssi-sdk-ext.key-utils'
|
|
33
|
+
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
33
34
|
import {
|
|
34
35
|
ConnectionType,
|
|
35
36
|
CorrelationIdentifierType,
|
|
@@ -73,6 +74,18 @@ import { asArray, computeEntryHash } from '@veramo/utils'
|
|
|
73
74
|
import { decodeJWT } from 'did-jwt'
|
|
74
75
|
import { v4 as uuidv4 } from 'uuid'
|
|
75
76
|
import { OID4VCIMachine } from '../machines/oid4vciMachine'
|
|
77
|
+
import {
|
|
78
|
+
getBasicIssuerLocaleBranding,
|
|
79
|
+
getCredentialBranding,
|
|
80
|
+
getCredentialConfigsSupportedMerged,
|
|
81
|
+
getIdentifierOpts,
|
|
82
|
+
getIssuanceOpts,
|
|
83
|
+
mapCredentialToAccept,
|
|
84
|
+
selectCredentialLocaleBranding,
|
|
85
|
+
startFirstPartApplicationMachine,
|
|
86
|
+
verifyCredentialToAccept,
|
|
87
|
+
} from '../services/OID4VCIHolderService'
|
|
88
|
+
import 'cross-fetch/polyfill'
|
|
76
89
|
import {
|
|
77
90
|
AddContactIdentityArgs,
|
|
78
91
|
AssertValidCredentialsArgs,
|
|
@@ -111,19 +124,6 @@ import {
|
|
|
111
124
|
VerifyEBSICredentialIssuerArgs,
|
|
112
125
|
VerifyEBSICredentialIssuerResult,
|
|
113
126
|
} from '../types/IOID4VCIHolder'
|
|
114
|
-
import {
|
|
115
|
-
getBasicIssuerLocaleBranding,
|
|
116
|
-
getCredentialBranding,
|
|
117
|
-
getCredentialConfigsSupportedMerged,
|
|
118
|
-
getIdentifierOpts,
|
|
119
|
-
getIssuanceOpts,
|
|
120
|
-
mapCredentialToAccept,
|
|
121
|
-
selectCredentialLocaleBranding,
|
|
122
|
-
startFirstPartApplicationMachine,
|
|
123
|
-
verifyCredentialToAccept,
|
|
124
|
-
} from '../services/OID4VCIHolderService'
|
|
125
|
-
import 'cross-fetch/polyfill'
|
|
126
|
-
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* {@inheritDoc IOID4VCIHolder}
|
|
@@ -151,7 +151,7 @@ export function signCallback(
|
|
|
151
151
|
context: IAgentContext<IKeyManager & IDIDManager & IResolver & IIdentifierResolution & IJwtService>,
|
|
152
152
|
nonce?: string,
|
|
153
153
|
) {
|
|
154
|
-
return async (jwt: Jwt, kid?: string) => {
|
|
154
|
+
return async (jwt: Jwt, kid?: string, noIssPayloadUpdate?: boolean) => {
|
|
155
155
|
let resolution = await context.agent.identifierManagedGet(identifier)
|
|
156
156
|
const jwk = jwt.header.jwk ?? (resolution.method === 'jwk' ? resolution.jwk : undefined)
|
|
157
157
|
if (!resolution.issuer && !jwt.payload.iss) {
|
|
@@ -170,7 +170,7 @@ export function signCallback(
|
|
|
170
170
|
}
|
|
171
171
|
return (
|
|
172
172
|
await context.agent.jwtCreateJwsCompactSignature({
|
|
173
|
-
issuer: { ...resolution, noIssPayloadUpdate: false },
|
|
173
|
+
issuer: { ...resolution, noIssPayloadUpdate: noIssPayloadUpdate ?? false },
|
|
174
174
|
protectedHeader: header,
|
|
175
175
|
payload,
|
|
176
176
|
})
|
|
@@ -229,7 +229,7 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
229
229
|
oid4vciHolderStoreIssuerBranding: this.oid4vciHolderStoreIssuerBranding.bind(this),
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
private readonly vcFormatPreferences: Array<string> = ['dc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc']
|
|
232
|
+
private readonly vcFormatPreferences: Array<string> = ['dc+sd-jwt', 'vc+sd-jwt', 'mso_mdoc', 'jwt_vc_json', 'jwt_vc', 'ldp_vc']
|
|
233
233
|
private readonly jsonldCryptographicSuitePreferences: Array<string> = [
|
|
234
234
|
'Ed25519Signature2018',
|
|
235
235
|
'EcdsaSecp256k1Signature2019',
|
|
@@ -601,6 +601,7 @@ export const getIssuanceCryptoSuite = async (opts: GetIssuanceCryptoSuiteArgs):
|
|
|
601
601
|
case 'jwt':
|
|
602
602
|
case 'jwt_vc_json':
|
|
603
603
|
case 'jwt_vc':
|
|
604
|
+
case 'vc+sd-jwt':
|
|
604
605
|
case 'dc+sd-jwt':
|
|
605
606
|
case 'mso_mdoc': {
|
|
606
607
|
const supportedPreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString> = jwtCryptographicSuitePreferences.filter(
|