Skip to content

Commit

Permalink
fix: updated version of vci and fixed the libs for it
Browse files Browse the repository at this point in the history
  • Loading branch information
sksadjad committed May 23, 2024
1 parent acc3199 commit ceb6074
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
IDENTIPROOF_OID4VCI_METADATA,
} from './MetadataMocks'
import { IMachineStatePersistence } from '@sphereon/ssi-sdk.xstate-machine-persistence'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import nock = require('nock')

type ConfiguredAgent = TAgent<IOID4VCIHolder & IMachineStatePersistence>
Expand All @@ -30,13 +32,13 @@ const mockedVC =
const INITIATE_QR_PRE_AUTHORIZED =
'openid-initiate-issuance://?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true'
const OFFER_QR_PRE_AUTHORIZED =
'openid-credential-offer://?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D'
'openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D'
const HTTPS_INITIATE_QR =
'https://issuer.research.identiproof.io?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true'
const HTTPS_OFFER_QR_AUTHORIZATION_CODE =
'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D'
'https://issuer.research.identiproof.io?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D'
const HTTPS_OFFER_QR_PRE_AUTHORIZED =
'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D'
'https://issuer.research.identiproof.io?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D'

function succeedWithAFullFlowWithClientSetup() {
nock(IDENTIPROOF_ISSUER_URL).get('/.well-known/openid-credential-issuer').reply(200, JSON.stringify(IDENTIPROOF_OID4VCI_METADATA))
Expand Down
4 changes: 2 additions & 2 deletions packages/oid4vci-holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-client": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-common": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-client": "0.10.4-unstable.61+bed9a57",
"@sphereon/oid4vci-common": "0.10.4-unstable.61+bed9a57",
"@sphereon/ssi-sdk-ext.did-utils": "0.18.0",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.18.0",
"@sphereon/ssi-sdk.contact-manager": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/oid4vci-issuer-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"start:dev": "ts-node __tests__/RestAPI.ts"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-issuer": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-issuer-server": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-common": "0.10.4-unstable.61+bed9a57",
"@sphereon/oid4vci-issuer": "0.10.4-unstable.61+bed9a57",
"@sphereon/oid4vci-issuer-server": "0.10.4-unstable.61+bed9a57",
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@sphereon/ssi-sdk.oid4vci-issuer": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createObjects, getConfig } from '../../agent-config/src'
import { createObjects, getConfig } from '../../agent-config/dist'

jest.setTimeout(60000)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Server } from 'http'
import { IAgent, createAgent, IAgentOptions } from '@veramo/core'
import { AgentRestClient } from '@veramo/remote-client'
import { AgentRouter, RequestWithAgentRouter } from '@veramo/remote-server'
import { createObjects, getConfig } from '../../agent-config/src'
import { createObjects, getConfig } from '../../agent-config/dist'
import { IOID4VCIRestClient } from '../src'
import issuanceRestClientAgentLogic from './shared/issuanceRestClientAgentLogic'

Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-common": "0.10.4-unstable.61+bed9a57",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
"cross-fetch": "^3.1.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/oid4vci-issuer-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-common": "0.10.4-unstable.61+bed9a57",
"@sphereon/ssi-sdk-ext.did-utils": "0.19.0",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
"@veramo/core": "4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/oid4vci-issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"build:clean": "tsc --build --clean && tsc --build"
},
"dependencies": {
"@sphereon/oid4vci-common": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-issuer": "0.10.4-unstable.52+125cb81",
"@sphereon/oid4vci-common": "0.10.4-unstable.61+bed9a57",
"@sphereon/oid4vci-issuer": "0.10.4-unstable.61+bed9a57",
"@sphereon/ssi-sdk-ext.did-utils": "0.19.0",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.kv-store-temp": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ValidationStatusEnum } from '@sphereon/wellknown-dids-client'
import { TAgent, IResolver } from '@veramo/core'
import { IWellKnownDidVerifier } from '../../src/types/IWellKnownDidVerifier'

import { IWellKnownDidVerifier } from '../../src'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const nock = require('nock')

type ConfiguredAgent = TAgent<IWellKnownDidVerifier | IResolver>
Expand Down
Loading

0 comments on commit ceb6074

Please sign in to comment.