Skip to content

Commit

Permalink
update pex (#712)
Browse files Browse the repository at this point in the history
* update pex

* add changeset
  • Loading branch information
nitro-neal authored Jun 26, 2024
1 parent 93e3884 commit 169bd1c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-cherries-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@web5/credentials": patch
---

update pex package to 3.3.3
4 changes: 2 additions & 2 deletions packages/credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@sphereon/pex": "2.1.0",
"@sphereon/pex": "3.3.3",
"@web5/common": "1.0.1",
"@web5/crypto": "1.0.1",
"@web5/dids": "1.1.1",
Expand All @@ -84,7 +84,7 @@
"devDependencies": {
"@playwright/test": "1.44.0",
"@sphereon/pex-models": "2.2.4",
"@sphereon/ssi-types": "0.23.4",
"@sphereon/ssi-types": "0.26.0",
"@types/chai": "4.3.16",
"@types/eslint": "8.56.10",
"@types/mocha": "10.0.6",
Expand Down
13 changes: 7 additions & 6 deletions packages/credentials/tests/presentation-exchange.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import PresentationExchangeSelectCredentialsTestVector from '../../../web5-spec/
import PresentationExchangeCreatePresentationFromCredentialsTestVector from '../../../web5-spec/test-vectors/presentation_exchange/create_presentation_from_credentials.json' assert { type: 'json' };
import PresentationExchangeValidateDefinitionTestVector from '../../../web5-spec/test-vectors/presentation_exchange/validate_definition.json' assert { type: 'json' };
import PresentationExchangeValidateSubmissionTestVector from '../../../web5-spec/test-vectors/presentation_exchange/validate_submission.json' assert { type: 'json' };
import { IPresentation } from '@sphereon/ssi-types';


class BitcoinCredential {
Expand Down Expand Up @@ -234,7 +235,7 @@ describe('PresentationExchange', () => {

const presentationEvaluationResults = PresentationExchange.evaluatePresentation({
presentationDefinition,
presentation: presentationResult.presentation
presentation: presentationResult.presentation as IPresentation
});
expect(presentationEvaluationResults.errors).to.deep.equal([]);
expect(presentationEvaluationResults.warnings).to.deep.equal([]);
Expand All @@ -255,7 +256,7 @@ describe('PresentationExchange', () => {

const { warnings, errors } = PresentationExchange.evaluatePresentation({
presentationDefinition,
presentation: presentationResult.presentation
presentation: presentationResult.presentation as IPresentation
});

expect(errors).to.be.an('array');
Expand All @@ -276,7 +277,7 @@ describe('PresentationExchange', () => {

const { warnings, errors } = PresentationExchange.evaluatePresentation({
presentationDefinition : groupPresentationDefinition,
presentation : presentationResult.presentation
presentation : presentationResult.presentation as IPresentation
});

expect(errors).to.be.an('array');
Expand Down Expand Up @@ -376,7 +377,7 @@ function createPresentationDefinition(): PresentationDefinitionV2 {
'fields': [
{
'path': [
'$.credentialSubject.btcAddress',
'$.vc.credentialSubject.btcAddress',
]
}
]
Expand Down Expand Up @@ -406,7 +407,7 @@ function createGroupPresentationDefinition(): PresentationDefinitionV2 {
'fields': [
{
'path': [
'$.credentialSubject.btcAddress',
'$.vc.credentialSubject.btcAddress',
]
}
]
Expand All @@ -420,7 +421,7 @@ function createGroupPresentationDefinition(): PresentationDefinitionV2 {
'fields': [
{
'path': [
'$.credentialSubject.dob',
'$.vc.credentialSubject.dob',
]
}
]
Expand Down
70 changes: 47 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 169bd1c

Please sign in to comment.