@sphereon/ssi-sdk.ebsi-support 0.34.1-next.6 → 0.34.1-next.85
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 +13 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -64
- package/dist/index.js.map +1 -1
- package/package.json +25 -25
- package/plugin.schema.json +1 -1
- package/src/agent/EbsiSupport.ts +42 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.ebsi-support",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.85+019802c5",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,43 +27,43 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ethersproject/random": "^5.7.0",
|
|
30
|
-
"@sphereon/did-auth-siop": "0.19.1-
|
|
31
|
-
"@sphereon/did-auth-siop-adapter": "0.19.1-
|
|
30
|
+
"@sphereon/did-auth-siop": "0.19.1-feature.SSISDK.45.86",
|
|
31
|
+
"@sphereon/did-auth-siop-adapter": "0.19.1-feature.SSISDK.45.86",
|
|
32
32
|
"@sphereon/pex": "5.0.0-unstable.28",
|
|
33
33
|
"@sphereon/pex-models": "^2.3.2",
|
|
34
|
-
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.
|
|
37
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.
|
|
38
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.
|
|
39
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-next.
|
|
40
|
-
"@sphereon/ssi-sdk.core": "0.34.1-next.
|
|
41
|
-
"@sphereon/ssi-sdk.oid4vci-holder": "0.34.1-next.
|
|
42
|
-
"@sphereon/ssi-sdk.presentation-exchange": "0.34.1-next.
|
|
43
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-next.
|
|
44
|
-
"@sphereon/ssi-types": "0.34.1-next.
|
|
34
|
+
"@sphereon/ssi-sdk-ext.did-resolver-ebsi": "0.34.1-next.85+019802c5",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-next.85+019802c5",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-next.85+019802c5",
|
|
37
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-next.85+019802c5",
|
|
38
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-next.85+019802c5",
|
|
39
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-next.85+019802c5",
|
|
40
|
+
"@sphereon/ssi-sdk.core": "0.34.1-next.85+019802c5",
|
|
41
|
+
"@sphereon/ssi-sdk.oid4vci-holder": "0.34.1-next.85+019802c5",
|
|
42
|
+
"@sphereon/ssi-sdk.presentation-exchange": "0.34.1-next.85+019802c5",
|
|
43
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-next.85+019802c5",
|
|
44
|
+
"@sphereon/ssi-types": "0.34.1-next.85+019802c5",
|
|
45
45
|
"@veramo/core": "4.2.0",
|
|
46
46
|
"@veramo/did-manager": "4.2.0",
|
|
47
47
|
"@veramo/utils": "4.2.0",
|
|
48
|
-
"cross-fetch": "^
|
|
48
|
+
"cross-fetch": "^4.1.0",
|
|
49
49
|
"debug": "^4.3.5",
|
|
50
50
|
"did-resolver": "^4.1.0",
|
|
51
51
|
"ethers": "^6.13.1",
|
|
52
52
|
"multiformats": "9.9.0",
|
|
53
53
|
"qs": "^6.12.3",
|
|
54
|
-
"uint8arrays": "
|
|
54
|
+
"uint8arrays": "3.1.1",
|
|
55
55
|
"uuid": "^9.0.1",
|
|
56
56
|
"xstate": "^4.38.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@sphereon/oid4vci-client": "0.19.1-
|
|
60
|
-
"@sphereon/oid4vci-common": "0.19.1-
|
|
61
|
-
"@sphereon/ssi-express-support": "0.34.1-next.
|
|
62
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.
|
|
63
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.
|
|
64
|
-
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.
|
|
65
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-next.
|
|
66
|
-
"@sphereon/ssi-sdk.public-key-hosting": "0.34.1-next.
|
|
59
|
+
"@sphereon/oid4vci-client": "0.19.1-feature.SSISDK.45.86",
|
|
60
|
+
"@sphereon/oid4vci-common": "0.19.1-feature.SSISDK.45.86",
|
|
61
|
+
"@sphereon/ssi-express-support": "0.34.1-next.85+019802c5",
|
|
62
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.34.1-next.85+019802c5",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.34.1-next.85+019802c5",
|
|
64
|
+
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.85+019802c5",
|
|
65
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-next.85+019802c5",
|
|
66
|
+
"@sphereon/ssi-sdk.public-key-hosting": "0.34.1-next.85+019802c5",
|
|
67
67
|
"@transmute/json-web-signature": "0.7.0-unstable.81",
|
|
68
68
|
"@types/cors": "^2.8.17",
|
|
69
69
|
"@types/express": "^4.17.21",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"EBSI",
|
|
99
99
|
"EBSI Authorization Client"
|
|
100
100
|
],
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "019802c57e9c1f9e3df4ecbb1d6a17f49e8fdbeb"
|
|
102
102
|
}
|
package/plugin.schema.json
CHANGED
package/src/agent/EbsiSupport.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { PresentationDefinitionLocation, PresentationDefinitionWithLocation, SupportedVersion } from '@sphereon/did-auth-siop'
|
|
2
1
|
import { CreateRequestObjectMode } from '@sphereon/oid4vci-common'
|
|
3
|
-
import { IPEXFilterResult } from '@sphereon/ssi-sdk.presentation-exchange'
|
|
4
2
|
import { CredentialMapper, PresentationSubmission } from '@sphereon/ssi-types'
|
|
5
3
|
import { IAgentPlugin } from '@veramo/core'
|
|
6
4
|
import fetch from 'cross-fetch'
|
|
@@ -29,7 +27,6 @@ import {
|
|
|
29
27
|
} from '../types/IEbsiSupport'
|
|
30
28
|
|
|
31
29
|
import { v4 } from 'uuid'
|
|
32
|
-
import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter'
|
|
33
30
|
import { defaultHasher } from '@sphereon/ssi-sdk.core'
|
|
34
31
|
|
|
35
32
|
export const ebsiSupportMethods: Array<string> = [
|
|
@@ -181,49 +178,54 @@ export class EbsiSupport implements IAgentPlugin {
|
|
|
181
178
|
}
|
|
182
179
|
}
|
|
183
180
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
// FIXME SSISDK-40 should use DCQL
|
|
182
|
+
// const definition = {
|
|
183
|
+
// definition: definitionResponse,
|
|
184
|
+
// location: PresentationDefinitionLocation.TOPLEVEL_PRESENTATION_DEF,
|
|
185
|
+
// version: SupportedVersion.SIOPv2_D11,
|
|
186
|
+
// } satisfies PresentationDefinitionWithLocation
|
|
189
187
|
|
|
190
|
-
const pexResult = hasInputDescriptors
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const opSession = await context.agent.siopRegisterOPSession({
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
188
|
+
// const pexResult = hasInputDescriptors
|
|
189
|
+
// ? await context.agent.pexDefinitionFilterCredentials({
|
|
190
|
+
// presentationDefinition: definitionResponse,
|
|
191
|
+
// credentialFilterOpts: { credentialRole: args.credentialRole, verifiableCredentials: [attestationCredential!] },
|
|
192
|
+
// })
|
|
193
|
+
// : ({
|
|
194
|
+
// // LOL, let's see whether we can trick PEX to create a VP without VCs
|
|
195
|
+
// filteredCredentials: [],
|
|
196
|
+
// id: definitionResponse.id,
|
|
197
|
+
// selectResults: { verifiableCredential: [], areRequiredCredentialsPresent: 'info' },
|
|
198
|
+
// } satisfies IPEXFilterResult)
|
|
199
|
+
// const opSession = await context.agent.siopRegisterOPSession({
|
|
200
|
+
// requestJwtOrUri: '', // Siop assumes we use an auth request, which we don't have in this case
|
|
201
|
+
// op: { checkLinkedDomains: CheckLinkedDomain.NEVER },
|
|
202
|
+
// //providedPresentationDefinitions: [definition],
|
|
203
|
+
// })
|
|
204
|
+
|
|
205
|
+
//const oid4vp = await opSession.getOID4VP({ allIdentifiers: [identifier.did] })
|
|
206
|
+
// const vp = await oid4vp.createVerifiablePresentation(
|
|
207
|
+
// args.credentialRole,
|
|
208
|
+
// { dcqlQuery: definition, credentials: pexResult.filteredCredentials },
|
|
209
|
+
// {
|
|
210
|
+
// proofOpts: { domain: openIDMetadata.issuer, nonce: v4(), created: new Date(Date.now() - 120_000).toString() },
|
|
211
|
+
// holder: identifier.did,
|
|
212
|
+
// idOpts: idOpts,
|
|
213
|
+
// skipDidResolution,
|
|
214
|
+
// forceNoCredentialsInVP: !hasInputDescriptors,
|
|
215
|
+
// },
|
|
216
|
+
// )
|
|
218
217
|
|
|
219
|
-
const presentationSubmission =
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
const presentationSubmission = { id: v4(), definition_id: definitionResponse.id, descriptor_map: [] } satisfies PresentationSubmission
|
|
219
|
+
// FIXME SSISDK-40
|
|
220
|
+
//hasInputDescriptors
|
|
221
|
+
//? vp.presentationSubmission
|
|
222
|
+
//: ({ id: v4(), definition_id: definitionResponse.id, descriptor_map: [] } satisfies PresentationSubmission)
|
|
222
223
|
|
|
223
224
|
console.log(`Presentation submission`, presentationSubmission)
|
|
224
225
|
const tokenRequestArgs = {
|
|
225
226
|
grant_type: 'vp_token',
|
|
226
|
-
|
|
227
|
+
// FIXME SSISDK-40
|
|
228
|
+
vp_token: '',//CredentialMapper.toCompactJWT(vp.verifiablePresentations[0]), // FIXME How are we going to send multiple presentations in a vp_token?
|
|
227
229
|
scope,
|
|
228
230
|
presentation_submission: presentationSubmission,
|
|
229
231
|
apiOpts: { environment, version: 'v4' },
|