@verii/server-credentialagent 1.0.0-pre.1754473009 → 1.0.0-pre.1754543687

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.
@@ -39,7 +39,7 @@ const { ServiceTypes } = require('@verii/organizations-registry');
39
39
  // jwtSign,
40
40
  // } = require('@verii/jwt');
41
41
  // const { getDidUriFromJwk } = require('@verii/did-doc');
42
- // const { hashOffer } = require('@verii/velocity-issuing');
42
+ // const { hashOffer } = require('@verii/verii-issuing');
43
43
  // const { CheckResults } = require('@verii/vc-checks');
44
44
 
45
45
  const { addMonths } = require('date-fns/fp');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verii/server-credentialagent",
3
- "version": "1.0.0-pre.1754473009",
3
+ "version": "1.0.0-pre.1754543687",
4
4
  "description": "Credential Agent application",
5
5
  "main": "src/index.js",
6
6
  "repository": "https://github.com/LFDT-Verii/core",
@@ -38,31 +38,31 @@
38
38
  "@fastify/view": "^11.0.0",
39
39
  "@spencejs/spence-factories": "^0.10.2",
40
40
  "@spencejs/spence-mongo-repos": "^0.10.2",
41
- "@verii/auth": "1.0.0-pre.1754473009",
42
- "@verii/base-contract-io": "1.0.0-pre.1754473009",
43
- "@verii/blockchain-functions": "1.0.0-pre.1754473009",
44
- "@verii/common-fetchers": "1.0.0-pre.1754473009",
45
- "@verii/common-functions": "1.0.0-pre.1754473009",
46
- "@verii/common-schemas": "1.0.0-pre.1754473009",
47
- "@verii/config": "1.0.0-pre.1754473009",
48
- "@verii/contract-permissions": "1.0.0-pre.1754473009",
49
- "@verii/crypto": "1.0.0-pre.1754473009",
50
- "@verii/csv-parser": "1.0.0-pre.1754473009",
51
- "@verii/db-kms": "1.0.0-pre.1754473009",
52
- "@verii/did-doc": "1.0.0-pre.1754473009",
53
- "@verii/fastify-plugins": "1.0.0-pre.1754473009",
54
- "@verii/jwt": "1.0.0-pre.1754473009",
55
- "@verii/metadata-registration": "1.0.0-pre.1754473009",
56
- "@verii/organizations-registry": "1.0.0-pre.1754473009",
57
- "@verii/request": "1.0.0-pre.1754473009",
58
- "@verii/rest-queries": "1.0.0-pre.1754473009",
59
- "@verii/server-provider": "1.0.0-pre.1754473009",
60
- "@verii/spencer-mongo-extensions": "1.0.0-pre.1754473009",
61
- "@verii/test-regexes": "1.0.0-pre.1754473009",
62
- "@verii/validation": "1.0.0-pre.1754473009",
63
- "@verii/vc-checks": "1.0.0-pre.1754473009",
64
- "@verii/velocity-issuing": "1.0.0-pre.1754473009",
65
- "@verii/verifiable-credentials": "1.0.0-pre.1754473009",
41
+ "@verii/auth": "1.0.0-pre.1754543687",
42
+ "@verii/base-contract-io": "1.0.0-pre.1754543687",
43
+ "@verii/blockchain-functions": "1.0.0-pre.1754543687",
44
+ "@verii/common-fetchers": "1.0.0-pre.1754543687",
45
+ "@verii/common-functions": "1.0.0-pre.1754543687",
46
+ "@verii/common-schemas": "1.0.0-pre.1754543687",
47
+ "@verii/config": "1.0.0-pre.1754543687",
48
+ "@verii/contract-permissions": "1.0.0-pre.1754543687",
49
+ "@verii/crypto": "1.0.0-pre.1754543687",
50
+ "@verii/csv-parser": "1.0.0-pre.1754543687",
51
+ "@verii/db-kms": "1.0.0-pre.1754543687",
52
+ "@verii/did-doc": "1.0.0-pre.1754543687",
53
+ "@verii/fastify-plugins": "1.0.0-pre.1754543687",
54
+ "@verii/jwt": "1.0.0-pre.1754543687",
55
+ "@verii/metadata-registration": "1.0.0-pre.1754543687",
56
+ "@verii/organizations-registry": "1.0.0-pre.1754543687",
57
+ "@verii/request": "1.0.0-pre.1754543687",
58
+ "@verii/rest-queries": "1.0.0-pre.1754543687",
59
+ "@verii/server-provider": "1.0.0-pre.1754543687",
60
+ "@verii/spencer-mongo-extensions": "1.0.0-pre.1754543687",
61
+ "@verii/test-regexes": "1.0.0-pre.1754543687",
62
+ "@verii/validation": "1.0.0-pre.1754543687",
63
+ "@verii/vc-checks": "1.0.0-pre.1754543687",
64
+ "@verii/verii-issuing": "1.0.0-pre.1754543687",
65
+ "@verii/verii-verification": "1.0.0-pre.1754543687",
66
66
  "ajv": "8.17.1",
67
67
  "canonicalize": "^2.1.0",
68
68
  "date-fns": "~3.6.0",
@@ -81,10 +81,10 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@spencejs/spence-config": "0.10.2",
84
- "@verii/endpoints-organizations-registrar": "1.0.0-pre.1754473009",
85
- "@verii/sample-data": "1.0.0-pre.1754473009",
84
+ "@verii/endpoints-organizations-registrar": "1.0.0-pre.1754543687",
85
+ "@verii/sample-data": "1.0.0-pre.1754543687",
86
86
  "@verii/test-regexes": "0.5.0-build",
87
- "@verii/tests-helpers": "1.0.0-pre.1754473009",
87
+ "@verii/tests-helpers": "1.0.0-pre.1754543687",
88
88
  "cheerio": "1.1.2",
89
89
  "dotenv": "16.6.1",
90
90
  "eslint": "8.57.1",
@@ -105,5 +105,5 @@
105
105
  "prettier": "2.8.8",
106
106
  "qs": "6.14.0"
107
107
  },
108
- "gitHead": "3bcb49930cb7b2b22c8557836ddc4e69683d9336"
108
+ "gitHead": "8e7d25a089f4398a2d754426613e56100dc2d29c"
109
109
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  const {
18
18
  verifyVerifiablePresentationJwt,
19
- } = require('@verii/verifiable-credentials');
19
+ } = require('@verii/verii-verification');
20
20
  const {
21
21
  exchangeLoaderPlugin,
22
22
  ensureDisclosureConfigurationTypePlugin,
@@ -32,7 +32,7 @@ const {
32
32
  values,
33
33
  pick,
34
34
  } = require('lodash/fp');
35
- const { hashOffer } = require('@verii/velocity-issuing');
35
+ const { hashOffer } = require('@verii/verii-issuing');
36
36
  const {
37
37
  ensureExchangeStateValid,
38
38
  initValidateOffer,
@@ -16,7 +16,7 @@
16
16
 
17
17
  const {
18
18
  verifyVerifiablePresentationJwt,
19
- } = require('@verii/verifiable-credentials');
19
+ } = require('@verii/verii-verification');
20
20
  const { handlePresentationSubmission } = require('../../../../entities');
21
21
 
22
22
  const controller = async (fastify) => {
@@ -16,7 +16,7 @@
16
16
 
17
17
  const { nanoid } = require('nanoid');
18
18
  const { map } = require('lodash/fp');
19
- const { verifyCredentials } = require('@verii/verifiable-credentials');
19
+ const { verifyCredentials } = require('@verii/verii-verification');
20
20
  const httpError = require('http-errors');
21
21
 
22
22
  const { KeyPurposes } = require('@verii/crypto');
@@ -21,7 +21,7 @@ const { nanoid } = require('nanoid/non-secure');
21
21
  const { initTransformToFinder } = require('@verii/rest-queries');
22
22
  const { tableRegistry } = require('@spencejs/spence-mongo-repos');
23
23
  const { KeyPurposes } = require('@verii/crypto');
24
- const { getRevocationRegistry } = require('@verii/velocity-issuing');
24
+ const { getRevocationRegistry } = require('@verii/verii-issuing');
25
25
  const { sendPush } = require('../../../../../fetchers');
26
26
  const { issuedCredentialProjection } = require('../../../../../entities');
27
27
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  const { pick, mapValues, flow, isEmpty, map, isObject } = require('lodash/fp');
18
18
 
19
- const { hashOffer } = require('@verii/velocity-issuing');
19
+ const { hashOffer } = require('@verii/verii-issuing');
20
20
  const { generateLinkCode } = require('./generate-link-code');
21
21
 
22
22
  const buildOffer = (offer, credentialRefsMap, { tenant, exchange }) => {
@@ -20,13 +20,8 @@ const OfferType = {
20
20
  LEGACY: 'LEGACY',
21
21
  };
22
22
  const ISSUING_CHALLENGE_SIZE = 16;
23
- const VELOCITY_NETWORK_CREDENTIAL_TYPE = {
24
- LAYER_1: 'VelocityNetworkLayer1Credential',
25
- LAYER_2: 'VelocityNetworkLayer2Credential',
26
- };
27
23
 
28
24
  module.exports = {
29
25
  OfferType,
30
26
  ISSUING_CHALLENGE_SIZE,
31
- VELOCITY_NETWORK_CREDENTIAL_TYPE,
32
27
  };
@@ -17,7 +17,7 @@
17
17
  const { register } = require('@spencejs/spence-factories');
18
18
  const { nanoid } = require('nanoid/non-secure');
19
19
  const { ObjectId } = require('mongodb');
20
- const { hashOffer } = require('@verii/velocity-issuing');
20
+ const { hashOffer } = require('@verii/verii-issuing');
21
21
  const { offerRepoPlugin } = require('../repos');
22
22
  const { initTenantFactory } = require('../../tenants');
23
23
  const { initOfferExchangeFactory } = require('../../exchanges');
@@ -20,9 +20,9 @@ const { KeyPurposes, calcSha384 } = require('@verii/crypto');
20
20
  const { toDidUrl } = require('@verii/did-doc');
21
21
  const { hexFromJwk, jwtDecode } = require('@verii/jwt');
22
22
  const {
23
- issueVelocityVerifiableCredentials,
23
+ issueVeriiCredentials,
24
24
  mongoAllocationListQueries,
25
- } = require('@verii/velocity-issuing');
25
+ } = require('@verii/verii-issuing');
26
26
  const { mongoDb } = require('@spencejs/spence-mongo-repos');
27
27
  const { first, isEmpty, map, size } = require('lodash/fp');
28
28
  const newError = require('http-errors');
@@ -96,14 +96,14 @@ const doIssueVerifiableCredentials = async (
96
96
  'allocations'
97
97
  );
98
98
 
99
- return issueVelocityVerifiableCredentials(
99
+ return issueVeriiCredentials(
100
100
  offers,
101
101
  credentialSubjectId,
102
102
  credentialTypesMap,
103
103
  {
104
104
  id: tenant._id,
105
105
  did: tenant.did,
106
- issuingServiceId: first(tenant.serviceIds),
106
+ issuingRefreshServiceId: first(tenant.serviceIds),
107
107
  issuingServiceKMSKeyId: issuerServiceKey.keyId,
108
108
  issuingServiceDIDKeyId: toDidUrl(
109
109
  tenant.did,
@@ -19,11 +19,11 @@ const { getCredentialTypeMetadata } = require('@verii/common-fetchers');
19
19
  const { flow, keyBy, map, uniq } = require('lodash/fp');
20
20
  const { extractCredentialType } = require('@verii/vc-checks');
21
21
 
22
- /** @import { VelocityOffer, Context, CredentialTypeMetadata } from "@verii/velocity-issuing" */
22
+ /** @import { CredentialOffer, Context, CredentialTypeMetadata } from "@verii/verii-issuing" */
23
23
 
24
24
  /**
25
25
  * Gets credential metadata from the Velocity Network registrar
26
- * @param {VelocityOffer[]} offers The offers that need metadata
26
+ * @param {CredentialOffer[]} offers The offers that need metadata
27
27
  * @param {Context} context the context
28
28
  * @returns {Promise<{[Name: string]: CredentialTypeMetadata}>} the map of types to metadata
29
29
  */
@@ -18,9 +18,7 @@
18
18
  const createError = require('http-errors');
19
19
  const { reduce, isEmpty, first, includes } = require('lodash/fp');
20
20
  const { jwtDecode } = require('@verii/jwt');
21
- const {
22
- validatePresentationContext,
23
- } = require('@verii/verifiable-credentials');
21
+ const { validatePresentationContext } = require('@verii/verii-verification');
24
22
  const { getJsonAtPath } = require('../../common');
25
23
  const {
26
24
  ExchangeErrorCodeState,
@@ -17,9 +17,7 @@
17
17
 
18
18
  const newError = require('http-errors');
19
19
  const { isString, isEmpty } = require('lodash/fp');
20
- const {
21
- buildFailedCheckResultError,
22
- } = require('@verii/verifiable-credentials');
20
+ const { buildFailedCheckResultError } = require('@verii/verii-verification');
23
21
  const { ExchangeStates } = require('../../exchanges');
24
22
  const { identifyUserOnVendor } = require('../../../fetchers');
25
23
  const { VendorEndpoint } = require('../../disclosures');
@@ -17,7 +17,7 @@
17
17
 
18
18
  const { isNil, map, reject, range } = require('lodash/fp');
19
19
  const { nanoid } = require('nanoid');
20
- const { verifyCredentials } = require('@verii/verifiable-credentials');
20
+ const { verifyCredentials } = require('@verii/verii-verification');
21
21
  const { decodeCredentialJwt } = require('@verii/jwt');
22
22
  const {
23
23
  getOrganizationVerifiedProfile,
@@ -73,11 +73,7 @@ const jwtVcExpectation = ({
73
73
  ),
74
74
  '@context': credentialContextExpectation,
75
75
  vnfProtocolVersion: offer.vnfProtocolVersion ?? 1,
76
- type: [
77
- first(offer.type),
78
- 'VelocityNetworkLayer1Credential',
79
- 'VerifiableCredential',
80
- ],
76
+ type: [first(offer.type), 'VerifiableCredential'],
81
77
  id: credentialId,
82
78
  issuer: issuer ?? {
83
79
  id: expect.stringMatching(DID_FORMAT),
@@ -22,7 +22,7 @@ const { nanoid } = require('nanoid');
22
22
  const { mapWithIndex, wait } = require('@verii/common-functions');
23
23
  const { jwtDecode, jwtSign, hexFromJwk, jwkThumbprint } = require('@verii/jwt');
24
24
  const {
25
- VnfProtocolVersions,
25
+ VeriiProtocolVersions,
26
26
  VelocityRevocationListType,
27
27
  } = require('@verii/vc-checks');
28
28
  const { generateKeyPair: joseGenerateKeyPair, exportJWK } = require('jose');
@@ -56,7 +56,7 @@ const {
56
56
  } = require('@verii/tests-helpers');
57
57
  const { KeyPurposes, generateKeyPair } = require('@verii/crypto');
58
58
  const { toEthereumAddress } = require('@verii/blockchain-functions');
59
- const { hashOffer } = require('@verii/velocity-issuing');
59
+ const { hashOffer } = require('@verii/verii-issuing');
60
60
 
61
61
  const {
62
62
  nockCredentialTypes,
@@ -6635,7 +6635,7 @@ describe('Holder Issuing Test Suite', () => {
6635
6635
  credentialId: vc.payload.jti,
6636
6636
  offer: {
6637
6637
  ...offer,
6638
- vnfProtocolVersion: VnfProtocolVersions.VNF_PROTOCOL_VERSION_2,
6638
+ vnfProtocolVersion: VeriiProtocolVersions.PROTOCOL_VERSION_2,
6639
6639
  credentialSubject: {
6640
6640
  id: didJwk,
6641
6641
  ...offer.credentialSubject,
@@ -6704,7 +6704,7 @@ describe('Holder Issuing Test Suite', () => {
6704
6704
  credentialId: vc.payload.jti,
6705
6705
  offer: {
6706
6706
  ...offer,
6707
- vnfProtocolVersion: VnfProtocolVersions.VNF_PROTOCOL_VERSION_2,
6707
+ vnfProtocolVersion: VeriiProtocolVersions.PROTOCOL_VERSION_2,
6708
6708
  credentialSubject: {
6709
6709
  id: didJwk,
6710
6710
  ...offer.credentialSubject,
@@ -6773,7 +6773,7 @@ describe('Holder Issuing Test Suite', () => {
6773
6773
  credentialId: vc.payload.jti,
6774
6774
  offer: {
6775
6775
  ...offer,
6776
- vnfProtocolVersion: VnfProtocolVersions.VNF_PROTOCOL_VERSION_2,
6776
+ vnfProtocolVersion: VeriiProtocolVersions.PROTOCOL_VERSION_2,
6777
6777
  credentialSubject: {
6778
6778
  id: didJwkThumbprint,
6779
6779
  ...offer.credentialSubject,
@@ -6888,11 +6888,7 @@ const offerExpectation = ({
6888
6888
  ...castArray(offer['@context']),
6889
6889
  ])
6890
6890
  ),
6891
- type: [
6892
- first(offer.type),
6893
- 'VelocityNetworkLayer1Credential',
6894
- 'VerifiableCredential',
6895
- ],
6891
+ type: [first(offer.type), 'VerifiableCredential'],
6896
6892
  credentialSchema: {
6897
6893
  id: credentialTypeMetadata[first(offer.type)].schemaUrl,
6898
6894
  type: 'JsonSchemaValidator2018',
@@ -31,7 +31,7 @@ const {
31
31
  } = require('@verii/jwt');
32
32
  const { sampleOrganizationProfile1 } = require('@verii/sample-data');
33
33
  const { errorResponseMatcher } = require('@verii/tests-helpers');
34
- const { VnfProtocolVersions } = require('@verii/vc-checks');
34
+ const { VeriiProtocolVersions } = require('@verii/vc-checks');
35
35
  const { map, isString } = require('lodash/fp');
36
36
  const { nanoid } = require('nanoid');
37
37
  const nock = require('nock');
@@ -57,8 +57,8 @@ const {
57
57
  } = require('../../src/entities');
58
58
 
59
59
  jest.mock('@verii/metadata-registration');
60
- jest.mock('@verii/verifiable-credentials', () => ({
61
- ...jest.requireActual('@verii/verifiable-credentials'),
60
+ jest.mock('@verii/verii-verification', () => ({
61
+ ...jest.requireActual('@verii/verii-verification'),
62
62
  verifyCredentials: mockVerifyCredentials,
63
63
  }));
64
64
  jest.mock('../../src/fetchers', () => {
@@ -686,7 +686,7 @@ describe('presentation submission', () => {
686
686
  method: 'POST',
687
687
  url: inspectUrl(tenant, '/submit-presentation'),
688
688
  headers: {
689
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
689
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
690
690
  }, // actually irrelevant as verifiable-credentials calls are all mocked out
691
691
  payload: {
692
692
  exchange_id: disclosurePresentationExchange._id,
@@ -17,7 +17,7 @@
17
17
  // eslint-disable-next-line import/order
18
18
  const buildFastify = require('./helpers/credentialagent-holder-build-fastify');
19
19
  const { generateKeyPair } = require('@verii/crypto');
20
- const { VnfProtocolVersions } = require('@verii/vc-checks');
20
+ const { VeriiProtocolVersions } = require('@verii/vc-checks');
21
21
  const { mongoDb } = require('@spencejs/spence-mongo-repos');
22
22
  const { ObjectId } = require('mongodb');
23
23
  const { decodeJwt } = require('jose');
@@ -38,12 +38,12 @@ const DEFAULT_CREDENTIAL_CHECKS = {
38
38
  jest.mock('@verii/metadata-registration');
39
39
 
40
40
  const mockVerifyCredentials = jest.fn();
41
- jest.mock('@verii/verifiable-credentials', () => ({
42
- ...jest.requireActual('@verii/verifiable-credentials'),
41
+ jest.mock('@verii/verii-verification', () => ({
42
+ ...jest.requireActual('@verii/verii-verification'),
43
43
  verifyCredentials: (...args) => mockVerifyCredentials(...args),
44
44
  }));
45
45
 
46
- const { CredentialCheckResultValue } = require('@verii/verifiable-credentials');
46
+ const { CredentialCheckResultValue } = require('@verii/verii-verification');
47
47
  const { getDidUriFromJwk } = require('@verii/did-doc');
48
48
  const { holderConfig } = require('../../src/config/holder-config');
49
49
  const {
@@ -1140,7 +1140,7 @@ describe('submit identification disclosure', () => {
1140
1140
  method: 'POST',
1141
1141
  url: idUrl(tenant),
1142
1142
  headers: {
1143
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1143
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1144
1144
  },
1145
1145
  payload: {
1146
1146
  jwt_vp: await presentationEmail.sign(
@@ -1211,7 +1211,7 @@ describe('submit identification disclosure', () => {
1211
1211
  method: 'POST',
1212
1212
  url: idUrl(tenant),
1213
1213
  headers: {
1214
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1214
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1215
1215
  },
1216
1216
  payload: {
1217
1217
  jwt_vp: await presentationEmail.sign(
@@ -1287,7 +1287,7 @@ describe('submit identification disclosure', () => {
1287
1287
  const response = await fastify.injectJson({
1288
1288
  method: 'POST',
1289
1289
  headers: {
1290
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1290
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1291
1291
  },
1292
1292
  url: idUrl(tenant),
1293
1293
  payload: {
@@ -1382,7 +1382,7 @@ describe('submit identification disclosure', () => {
1382
1382
  const response = await fastify.injectJson({
1383
1383
  method: 'POST',
1384
1384
  headers: {
1385
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1385
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1386
1386
  },
1387
1387
  url: idUrl(tenant),
1388
1388
  payload: {
@@ -1452,7 +1452,7 @@ describe('submit identification disclosure', () => {
1452
1452
  const response = await fastify.injectJson({
1453
1453
  method: 'POST',
1454
1454
  headers: {
1455
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1455
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1456
1456
  },
1457
1457
  url: idUrl(tenant),
1458
1458
  payload: {
@@ -1571,7 +1571,7 @@ describe('submit identification disclosure', () => {
1571
1571
  method: 'POST',
1572
1572
  url: idUrl(tenant),
1573
1573
  headers: {
1574
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1574
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1575
1575
  },
1576
1576
  payload: {
1577
1577
  exchange_id: emptyDisclosureExchange._id,
@@ -1654,7 +1654,7 @@ describe('submit identification disclosure', () => {
1654
1654
  method: 'POST',
1655
1655
  url: idUrl(tenant),
1656
1656
  headers: {
1657
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1657
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1658
1658
  },
1659
1659
  payload: {
1660
1660
  exchange_id: exchange._id,
@@ -1772,7 +1772,7 @@ describe('submit identification disclosure', () => {
1772
1772
  method: 'POST',
1773
1773
  url: idUrl(customTenant),
1774
1774
  headers: {
1775
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1775
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1776
1776
  },
1777
1777
  payload: {
1778
1778
  exchange_id: customExchange._id,
@@ -1897,7 +1897,7 @@ describe('submit identification disclosure', () => {
1897
1897
  method: 'POST',
1898
1898
  url: idUrl(customTenant),
1899
1899
  headers: {
1900
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1900
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1901
1901
  },
1902
1902
  payload: {
1903
1903
  exchange_id: customExchange._id,
@@ -1964,7 +1964,7 @@ describe('submit identification disclosure', () => {
1964
1964
  method: 'POST',
1965
1965
  url: idUrl(tenant),
1966
1966
  headers: {
1967
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
1967
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
1968
1968
  },
1969
1969
  payload: {
1970
1970
  jwt_vp: await presentationEmail.sign(
@@ -2056,7 +2056,7 @@ describe('submit identification disclosure', () => {
2056
2056
  method: 'POST',
2057
2057
  url: idUrl(tenant),
2058
2058
  headers: {
2059
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2059
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2060
2060
  },
2061
2061
  payload: {
2062
2062
  jwt_vp: await presentationEmail.sign(
@@ -2145,7 +2145,7 @@ describe('submit identification disclosure', () => {
2145
2145
  method: 'POST',
2146
2146
  url: idUrl(tenant),
2147
2147
  headers: {
2148
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2148
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2149
2149
  },
2150
2150
  payload: {
2151
2151
  jwt_vp: await presentationEmail.sign(
@@ -2236,7 +2236,7 @@ describe('submit identification disclosure', () => {
2236
2236
  method: 'POST',
2237
2237
  url: idUrl(tenant),
2238
2238
  headers: {
2239
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2239
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2240
2240
  },
2241
2241
  payload: {
2242
2242
  jwt_vp: await presentationEmail.sign(
@@ -2325,7 +2325,7 @@ describe('submit identification disclosure', () => {
2325
2325
  method: 'POST',
2326
2326
  url: idUrl(tenant),
2327
2327
  headers: {
2328
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2328
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2329
2329
  },
2330
2330
  payload: {
2331
2331
  jwt_vp: await presentationPhone.sign(
@@ -2414,7 +2414,7 @@ describe('submit identification disclosure', () => {
2414
2414
  method: 'POST',
2415
2415
  url: idUrl(tenant),
2416
2416
  headers: {
2417
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2417
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2418
2418
  },
2419
2419
  payload: {
2420
2420
  jwt_vp: await presentationVerificationIdentifier.sign(
@@ -2510,7 +2510,7 @@ describe('submit identification disclosure', () => {
2510
2510
  method: 'POST',
2511
2511
  url: idUrl(tenant),
2512
2512
  headers: {
2513
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2513
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2514
2514
  },
2515
2515
  payload: {
2516
2516
  jwt_vp: await presentation.sign(
@@ -2614,7 +2614,7 @@ describe('submit identification disclosure', () => {
2614
2614
  method: 'POST',
2615
2615
  url: idUrl(tenant),
2616
2616
  headers: {
2617
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2617
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2618
2618
  },
2619
2619
  payload: {
2620
2620
  jwt_vp: await presentationWhatever.sign(
@@ -2686,7 +2686,7 @@ describe('submit identification disclosure', () => {
2686
2686
  method: 'POST',
2687
2687
  url: idUrl(tenant),
2688
2688
  headers: {
2689
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2689
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2690
2690
  },
2691
2691
  payload: {
2692
2692
  jwt_vp: await presentationMixed.sign(
@@ -2778,7 +2778,7 @@ describe('submit identification disclosure', () => {
2778
2778
  method: 'POST',
2779
2779
  url: idUrl(tenant),
2780
2780
  headers: {
2781
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2781
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2782
2782
  },
2783
2783
  payload: {
2784
2784
  jwt_vp: await presentationMixed.sign(
@@ -2893,7 +2893,7 @@ describe('submit identification disclosure', () => {
2893
2893
  method: 'POST',
2894
2894
  url: idUrl(tenant),
2895
2895
  headers: {
2896
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
2896
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
2897
2897
  },
2898
2898
  payload: {
2899
2899
  jwt_vp: await presentationMixed.sign(
@@ -3012,7 +3012,7 @@ describe('submit identification disclosure', () => {
3012
3012
  method: 'POST',
3013
3013
  url: idUrl(tenant),
3014
3014
  headers: {
3015
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3015
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3016
3016
  },
3017
3017
  payload: {
3018
3018
  jwt_vp: await presentationIdDocument.sign(
@@ -3139,7 +3139,7 @@ describe('submit identification disclosure', () => {
3139
3139
  method: 'POST',
3140
3140
  url: idUrl(customTenant),
3141
3141
  headers: {
3142
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3142
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3143
3143
  },
3144
3144
  payload: {
3145
3145
  jwt_vp: await presentationIdDocument.sign(
@@ -3228,7 +3228,7 @@ describe('submit identification disclosure', () => {
3228
3228
  method: 'POST',
3229
3229
  url: idUrl(tenant),
3230
3230
  headers: {
3231
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3231
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3232
3232
  },
3233
3233
  payload: {
3234
3234
  jwt_vp: await presentationIdDocument.sign(
@@ -3260,7 +3260,7 @@ describe('submit identification disclosure', () => {
3260
3260
  method: 'POST',
3261
3261
  url: idUrl(tenant),
3262
3262
  headers: {
3263
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3263
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3264
3264
  },
3265
3265
  payload: {
3266
3266
  jwt_vp: await presentationIdDocument.sign(
@@ -3310,7 +3310,7 @@ describe('submit identification disclosure', () => {
3310
3310
  method: 'POST',
3311
3311
  url: idUrl(tenant),
3312
3312
  headers: {
3313
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3313
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3314
3314
  },
3315
3315
  payload: {
3316
3316
  jwt_vp: await presentationIdDocument.sign(
@@ -3361,7 +3361,7 @@ describe('submit identification disclosure', () => {
3361
3361
  method: 'POST',
3362
3362
  url: idUrl(tenant),
3363
3363
  headers: {
3364
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3364
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3365
3365
  },
3366
3366
  payload: {
3367
3367
  jwt_vp: await presentationIdDocument.sign(
@@ -3409,7 +3409,7 @@ describe('submit identification disclosure', () => {
3409
3409
  method: 'POST',
3410
3410
  url: idUrl(tenant),
3411
3411
  headers: {
3412
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3412
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3413
3413
  },
3414
3414
  payload: {
3415
3415
  jwt_vp: await presentationIdDocument.sign(
@@ -3456,7 +3456,7 @@ describe('submit identification disclosure', () => {
3456
3456
  method: 'POST',
3457
3457
  url: idUrl(tenant),
3458
3458
  headers: {
3459
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3459
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3460
3460
  },
3461
3461
  payload: {
3462
3462
  jwt_vp: await presentationIdDocument.sign(
@@ -3502,7 +3502,7 @@ describe('submit identification disclosure', () => {
3502
3502
  method: 'POST',
3503
3503
  url: idUrl(tenant),
3504
3504
  headers: {
3505
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3505
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3506
3506
  },
3507
3507
  payload: {
3508
3508
  jwt_vp: await presentationIdDocument.sign(
@@ -3551,7 +3551,7 @@ describe('submit identification disclosure', () => {
3551
3551
  method: 'POST',
3552
3552
  url: idUrl(tenant),
3553
3553
  headers: {
3554
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3554
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3555
3555
  },
3556
3556
  payload: {
3557
3557
  jwt_vp: await presentationIdDocument.sign(
@@ -3585,7 +3585,7 @@ describe('submit identification disclosure', () => {
3585
3585
  method: 'POST',
3586
3586
  url: idUrl(tenant),
3587
3587
  headers: {
3588
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3588
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3589
3589
  },
3590
3590
  payload: {
3591
3591
  jwt_vp: await presentationIdDocument.sign(
@@ -3634,7 +3634,7 @@ describe('submit identification disclosure', () => {
3634
3634
  });
3635
3635
 
3636
3636
  const headers = {
3637
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3637
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3638
3638
  };
3639
3639
  const payload = {
3640
3640
  jwt_vp: await presentationEmail.sign(
@@ -3697,7 +3697,7 @@ describe('submit identification disclosure', () => {
3697
3697
  });
3698
3698
 
3699
3699
  const headers = {
3700
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3700
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3701
3701
  };
3702
3702
 
3703
3703
  const response = await fastify.injectJson({
@@ -3808,7 +3808,7 @@ describe('submit identification disclosure', () => {
3808
3808
 
3809
3809
  nock(mockVendorUrl).post(identifyUserOnVendorEndpoint).reply(404);
3810
3810
  const headers = {
3811
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3811
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3812
3812
  };
3813
3813
 
3814
3814
  const response = await fastify.injectJson({
@@ -3924,7 +3924,7 @@ describe('submit identification disclosure', () => {
3924
3924
 
3925
3925
  nock(mockVendorUrl).post(identifyUserOnVendorEndpoint).reply(500);
3926
3926
  const headers = {
3927
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
3927
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
3928
3928
  };
3929
3929
 
3930
3930
  const response = await fastify.injectJson({
@@ -4276,7 +4276,7 @@ describe('submit identification disclosure', () => {
4276
4276
  method: 'POST',
4277
4277
  url: idUrl(tenant),
4278
4278
  headers: {
4279
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4279
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4280
4280
  },
4281
4281
  payload: {
4282
4282
  jwt_vp: await presentationEmail.sign(
@@ -4344,7 +4344,7 @@ describe('submit identification disclosure', () => {
4344
4344
  method: 'POST',
4345
4345
  url: idUrl(tenant),
4346
4346
  headers: {
4347
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4347
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4348
4348
  },
4349
4349
  payload: {
4350
4350
  jwt_vp: await presentationEmail.sign(
@@ -4474,7 +4474,7 @@ describe('submit identification disclosure', () => {
4474
4474
  method: 'POST',
4475
4475
  url: idUrl(tenant),
4476
4476
  headers: {
4477
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4477
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4478
4478
  },
4479
4479
  payload: {
4480
4480
  jwt_vp: await presentationEmail.sign(
@@ -4551,7 +4551,7 @@ describe('submit identification disclosure', () => {
4551
4551
  method: 'POST',
4552
4552
  url: idUrl(tenant),
4553
4553
  headers: {
4554
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4554
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4555
4555
  },
4556
4556
  payload: {
4557
4557
  jwt_vp: await presentationEmail.sign(
@@ -4656,7 +4656,7 @@ describe('submit identification disclosure', () => {
4656
4656
  method: 'POST',
4657
4657
  url: idUrl(tenant),
4658
4658
  headers: {
4659
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4659
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4660
4660
  },
4661
4661
  payload: {
4662
4662
  exchange_id: exchange._id,
@@ -4687,7 +4687,7 @@ describe('submit identification disclosure', () => {
4687
4687
  method: 'POST',
4688
4688
  url: idUrl(tenant),
4689
4689
  headers: {
4690
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4690
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4691
4691
  },
4692
4692
  payload: {
4693
4693
  exchange_id: exchange._id,
@@ -4719,7 +4719,7 @@ describe('submit identification disclosure', () => {
4719
4719
  method: 'POST',
4720
4720
  url: idUrl(tenant),
4721
4721
  headers: {
4722
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4722
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4723
4723
  },
4724
4724
  payload: {
4725
4725
  exchange_id: exchange._id,
@@ -4755,7 +4755,7 @@ describe('submit identification disclosure', () => {
4755
4755
  method: 'POST',
4756
4756
  url: idUrl(tenant),
4757
4757
  headers: {
4758
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4758
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4759
4759
  },
4760
4760
  payload: {
4761
4761
  exchange_id: exchange._id,
@@ -4782,7 +4782,7 @@ describe('submit identification disclosure', () => {
4782
4782
  method: 'POST',
4783
4783
  url: idUrl(tenant),
4784
4784
  headers: {
4785
- 'x-vnf-protocol-version': `${VnfProtocolVersions.VNF_PROTOCOL_VERSION_2}`,
4785
+ 'x-vnf-protocol-version': `${VeriiProtocolVersions.PROTOCOL_VERSION_2}`,
4786
4786
  },
4787
4787
  payload: {
4788
4788
  exchange_id: exchange._id,
@@ -38,7 +38,7 @@ const buildCheckCredentialsUrl = ({ _id }) =>
38
38
  `/operator-api/v0.8/tenants/${_id}/check-credentials`;
39
39
 
40
40
  jest.mock('@verii/metadata-registration');
41
- jest.mock('@verii/verifiable-credentials', () => ({
41
+ jest.mock('@verii/verii-verification', () => ({
42
42
  verifyCredentials: mockVerifyCredentials,
43
43
  }));
44
44
  jest.mock('../../src/fetchers', () => ({
@@ -34,7 +34,7 @@ const {
34
34
  testAuthToken,
35
35
  errorResponseMatcher,
36
36
  } = require('@verii/tests-helpers');
37
- const { hashOffer } = require('@verii/velocity-issuing');
37
+ const { hashOffer } = require('@verii/verii-issuing');
38
38
  const { openBadgeCredentialExample } = require('@verii/sample-data');
39
39
  const {
40
40
  nockRegistrarAppSchemaName,