Skip to content

Commit

Permalink
VDX-167: working on Veramo V5 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Aug 2, 2023
1 parent ecd8ea5 commit e373602
Show file tree
Hide file tree
Showing 33 changed files with 316 additions and 263 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ test/*.js
/packages/issuance-branding/plugin.schema.json
/packages/oid4vci-issuer-rest-client/plugin.schema.json

/.env
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
},
"dependencies": {
"@veramo/core": "5.3.0"
"@veramo/core": "^5.3.0"
},
"devDependencies": {
"@types/debug": "^4.1.7",
Expand Down Expand Up @@ -103,6 +103,7 @@
"@veramo/url-handler": "5.3.0",
"@sphereon/ssi-types": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/pex": "2.1.1-unstable.0",
"@noble/hashes": "1.2.0",
"did-jwt": "6.11.6",
"did-jwt-vc": "3.1.3",
Expand Down
4 changes: 3 additions & 1 deletion packages/agent-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build",
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@veramo/core": "5.3.0",
"@veramo/core": "^5.3.0",
"@veramo/data-store": "^5.3.0",
"jsonpointer": "^5.0.1",
"typeorm": "^0.3.12",
"url-parse": "^1.5.10",
Expand Down
5 changes: 3 additions & 2 deletions packages/agent-config/src/objectCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ export async function createObjects(config: object, pointers: Record<string, str
const args = objectConfig['$args']
// console.log({module, member, type, query: parsed.query})

if (module.slice(0, 2) === './' || module.slice(0, 3) === '../') {
if (module.slice(0, 2) === './') {
module = resolve(module)
}

const resolvedArgs = args !== undefined ? await resolveRefs(args) : []
try {
let required = member ? (await import(module))[member] : await import(module)
const moduleImport = await import(module)
let required = member ? moduleImport[member] : moduleImport
if (type === 'class') {
object = new required(...resolvedArgs)
} else if (type === 'function') {
Expand Down
5 changes: 3 additions & 2 deletions packages/contact-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"IContactManager": "./src/types/IContactManager.ts"
Expand All @@ -22,8 +23,8 @@
"devDependencies": {
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@veramo/remote-client": "5.3.0",
"@veramo/remote-server": "5.3.0"
"@veramo/remote-client": "^5.3.0",
"@veramo/remote-server": "^5.3.0"
},
"files": [
"dist/**/*",
Expand Down
3 changes: 2 additions & 1 deletion packages/data-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build",
"typeorm": "ts-node --project ./tsconfig.json -r tsconfig-paths/register ../../node_modules/typeorm/cli.js --config src/migrations/internal-migrations-ormconfig.ts",
Expand All @@ -14,7 +15,7 @@
},
"dependencies": {
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "5.3.0",
"@veramo/core": "^5.3.0",
"class-validator": "^0.14.0",
"debug": "^4.3.4",
"typeorm": "^0.3.12"
Expand Down
1 change: 1 addition & 0 deletions packages/express-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build",
"build:clean": "tsc --build --clean && tsc --build"
Expand Down
5 changes: 3 additions & 2 deletions packages/issuance-branding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"IIssuanceBranding": "./src/types/IIssuanceBranding.ts"
Expand All @@ -23,8 +24,8 @@
},
"devDependencies": {
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@veramo/remote-client": "5.3.0",
"@veramo/remote-server": "5.3.0"
"@veramo/remote-client": "^5.3.0",
"@veramo/remote-server": "^5.3.0"
},
"files": [
"dist/**/*",
Expand Down
3 changes: 2 additions & 1 deletion packages/kv-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@veramo/utils": "5.3.0",
"@veramo/utils": "^5.3.0",
"debug": "^4.3.4",
"events": "^3.3.0",
"json-buffer": "^3.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/ms-authenticator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build",
"build:clean": "tsc --build --clean && tsc --build"
Expand Down
9 changes: 5 additions & 4 deletions packages/ms-request-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"IMsRequestApi": "./src/types/IMsRequestApi.ts"
Expand All @@ -17,7 +18,7 @@
},
"dependencies": {
"@sphereon/ssi-sdk.ms-authenticator": "workspace:*",
"@veramo/core": "5.3.0",
"@veramo/core": "^5.3.0",
"cross-fetch": "^3.1.5"
},
"devDependencies": {
Expand All @@ -26,9 +27,9 @@
"@types/express-session": "^1.17.4",
"@types/node": "^18.16.3",
"@types/uuid": "^9.0.1",
"@veramo/data-store": "5.3.0",
"@veramo/remote-client": "5.3.0",
"@veramo/remote-server": "5.3.0",
"@veramo/data-store": "^5.3.0",
"@veramo/remote-client": "^5.3.0",
"@veramo/remote-server": "^5.3.0",
"express": "^4.17.1",
"express-session": "^1.17.2",
"prettier": "^2.8.8",
Expand Down
38 changes: 20 additions & 18 deletions packages/oid4vci-issuer-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc --build",
"build:clean": "tsc --build --clean && tsc --build",
Expand All @@ -19,26 +20,27 @@
"@sphereon/ssi-sdk.oid4vci-issuer-store": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@types/uuid": "^9.0.1",
"@veramo/core": "5.3.0",
"@veramo/credential-w3c": "5.3.0",
"@veramo/core": "^5.3.0",
"@veramo/credential-w3c": "^5.3.0",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"cross-fetch": "^3.1.5",
"dotenv-flow": "^3.2.0",
"express": "^4.18.2",
"short-uuid": "^4.2.2",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"debug": "^4.3.4"
},
"devDependencies": {
"@decentralized-identity/ion-sdk": "^0.6.0",
"@sphereon/did-uni-client": "^0.6.0",
"@sphereon/pex": "^2.0.1",
"@sphereon/pex": "2.0.1",
"@sphereon/pex-models": "^2.0.2",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.13.0",
"@sphereon/ssi-sdk-ext.key-manager": "0.13.0",
"@sphereon/ssi-sdk-ext.key-utils": "0.13.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.13.0",
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk-ext.key-manager": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk-ext.key-utils": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk-ext.kms-local": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.vc-handler-ld-local": "workspace:*",
"@types/body-parser": "^1.19.2",
Expand All @@ -49,16 +51,16 @@
"@types/express": "^4.17.13",
"@types/express-http-proxy": "^1.6.3",
"@types/node": "^18.15.0",
"@veramo/data-store": "5.3.0",
"@veramo/did-manager": "5.3.0",
"@veramo/did-provider-ethr": "5.3.0",
"@veramo/did-provider-ion": "5.3.0",
"@veramo/did-provider-key": "5.3.0",
"@veramo/did-provider-web": "5.3.0",
"@veramo/did-resolver": "5.3.0",
"@veramo/key-manager": "5.3.0",
"@veramo/kms-local": "5.3.0",
"@veramo/utils": "5.3.0",
"@veramo/data-store": "^5.3.0",
"@veramo/did-manager": "^5.3.0",
"@veramo/did-provider-ethr": "^5.3.0",
"@veramo/did-provider-ion": "^5.3.0",
"@veramo/did-provider-key": "^5.3.0",
"@veramo/did-provider-web": "^5.3.0",
"@veramo/did-resolver": "^5.3.0",
"@veramo/key-manager": "^5.3.0",
"@veramo/kms-local": "^5.3.0",
"@veramo/utils": "^5.3.0",
"did-resolver": "^4.1.0",
"nock": "^13.2.1",
"ts-node": "^10.9.1",
Expand Down
11 changes: 7 additions & 4 deletions packages/oid4vci-issuer-rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"IOID4VCIRestClient": "./src/types/IOID4VCIRestClient.ts"
Expand All @@ -13,18 +14,20 @@
"scripts": {
"build": "tsc --build",
"build:clean": "tsc --build --clean && tsc --build",
"build:copyfiles": "copyfiles plugin.schema.json dist",
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.6.0",
"@veramo/core": "5.3.0",
"cross-fetch": "^3.1.5"
"@veramo/core": "^5.3.0",
"cross-fetch": "^3.1.5",
"debug": "^4.3.4"
},
"devDependencies": {
"@sphereon/ssi-sdk.dev": "workspace:*",
"@types/node": "^18.16.3",
"@veramo/remote-client": "5.3.0",
"@veramo/remote-server": "5.3.0",
"@veramo/remote-client": "^5.3.0",
"@veramo/remote-server": "^5.3.0",
"nock": "^13.3.0",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
Expand Down
13 changes: 7 additions & 6 deletions packages/oid4vci-issuer-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"ISIOPv2RP": "./src/types/ISIOPv2RP.ts"
Expand All @@ -16,19 +17,19 @@
},
"dependencies": {
"@sphereon/oid4vci-common": "0.6.0",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.0",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@types/uuid": "^9.0.1",
"@veramo/core": "5.3.0",
"@veramo/credential-w3c": "5.3.0",
"@veramo/core": "^5.3.0",
"@veramo/credential-w3c": "^5.3.0",
"cross-fetch": "^3.1.5",
"uuid": "^8.3.2"
},
"devDependencies": {
"@sphereon/did-uni-client": "^0.6.0",
"@veramo/did-provider-key": "5.3.0",
"@veramo/did-resolver": "5.3.0",
"@veramo/utils": "5.3.0",
"@veramo/did-provider-key": "^5.3.0",
"@veramo/did-resolver": "^5.3.0",
"@veramo/utils": "^5.3.0",
"did-resolver": "^4.1.0",
"nock": "^13.2.1"
},
Expand Down
13 changes: 7 additions & 6 deletions packages/oid4vci-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"ISIOPv2RP": "./src/types/ISIOPv2RP.ts"
Expand All @@ -17,22 +18,22 @@
"dependencies": {
"@sphereon/oid4vci-common": "0.6.0",
"@sphereon/oid4vci-issuer": "0.6.0",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.0",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-sdk.oid4vci-issuer-store": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@types/uuid": "^9.0.1",
"@veramo/core": "5.3.0",
"@veramo/credential-w3c": "5.3.0",
"@veramo/core": "^5.3.0",
"@veramo/credential-w3c": "^5.3.0",
"cross-fetch": "^3.1.5",
"uuid": "^8.3.2"
},
"devDependencies": {
"@sphereon/did-uni-client": "^0.6.0",
"@veramo/did-provider-key": "5.3.0",
"@veramo/did-resolver": "5.3.0",
"@veramo/utils": "5.3.0",
"@veramo/did-provider-key": "^5.3.0",
"@veramo/did-resolver": "^5.3.0",
"@veramo/utils": "^5.3.0",
"did-resolver": "^4.1.0",
"nock": "^13.2.1"
},
Expand Down
18 changes: 10 additions & 8 deletions packages/presentation-exchange/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"veramo": {
"pluginInterfaces": {
"IPresentationExchange": "./src/types/IPresentationExchange.ts"
Expand All @@ -17,25 +18,26 @@
"dependencies": {
"@sphereon/pex": "2.0.1",
"@sphereon/pex-models": "^2.0.2",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.0",
"@sphereon/ssi-sdk-ext.did-utils": "0.13.1-unstable.3+bf7e638",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "5.3.0"
"@veramo/core": "^5.3.0",
"@veramo/data-store": "^5.3.0"
},
"devDependencies": {
"@sphereon/did-uni-client": "^0.6.0",
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@types/json-buffer": "^3.0.0",
"@veramo/did-provider-key": "5.3.0",
"@veramo/did-resolver": "5.3.0",
"@veramo/remote-client": "5.3.0",
"@veramo/remote-server": "5.3.0",
"@veramo/utils": "5.3.0",
"@veramo/did-provider-key": "^5.3.0",
"@veramo/did-resolver": "^5.3.0",
"@veramo/remote-client": "^5.3.0",
"@veramo/remote-server": "^5.3.0",
"@veramo/utils": "^5.3.0",
"did-resolver": "^4.1.0",
"nock": "^13.2.1"
},
"resolutions": {
"@veramo/utils": "5.3.0"
"@veramo/utils": "^5.3.0"
},
"files": [
".yalc/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ export class PresentationExchange implements IAgentPlugin {
return {
id: args.presentationDefinition.id,
selectResults,
filteredCredentials: selectResults.verifiableCredential?.map((vc) => CredentialMapper.storedCredentialToOriginalFormat(vc)) ?? [],
filteredCredentials:
selectResults.verifiableCredential?.map((vc) => CredentialMapper.storedCredentialToOriginalFormat(vc as W3CVerifiableCredential)) ?? [],
}
}

Expand Down
Loading

0 comments on commit e373602

Please sign in to comment.