Skip to content

Commit

Permalink
Merge pull request #526 from docknetwork/fix/presentation-changing-cr…
Browse files Browse the repository at this point in the history
…edential-order
  • Loading branch information
cykoder authored Feb 14, 2025
2 parents 944f88c + 95c02c3 commit 73fcb65
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 26 deletions.
9 changes: 9 additions & 0 deletions examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @docknetwork/sdk-examples

## 0.18.3

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0
- @docknetwork/dock-blockchain-api@0.20.3
- @docknetwork/dock-blockchain-modules@0.26.3

## 0.18.2

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@docknetwork/sdk-examples",
"private": true,
"type": "module",
"version": "0.18.2",
"version": "0.18.3",
"scripts": {
"bbs-dock-example": "babel-node ./bbs-dock.js",
"claim-deduction-example": "babel-node ./claim-deduction.js",
Expand All @@ -19,9 +19,9 @@
"lint": "eslint \"*.js\""
},
"dependencies": {
"@docknetwork/credential-sdk": "0.44.0",
"@docknetwork/dock-blockchain-api": "0.20.2",
"@docknetwork/dock-blockchain-modules": "0.26.2"
"@docknetwork/credential-sdk": "0.45.0",
"@docknetwork/dock-blockchain-api": "0.20.3",
"@docknetwork/dock-blockchain-modules": "0.26.3"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/cheqd-blockchain-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/cheqd-blockchain-api

## 0.31.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0

## 0.31.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cheqd-blockchain-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/cheqd-blockchain-api",
"version": "0.31.0",
"version": "0.31.1",
"license": "MIT",
"main": "./dist/esm/index.js",
"type": "module",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@cheqd/sdk": "^5.1.0-develop.11",
"@docknetwork/credential-sdk": "0.44.0"
"@docknetwork/credential-sdk": "0.45.0"
},
"devDependencies": {
"@babel/cli": "^7.24.1",
Expand Down
7 changes: 7 additions & 0 deletions packages/cheqd-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/cheqd-blockchain-modules

## 0.31.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0

## 0.31.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/cheqd-blockchain-modules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/cheqd-blockchain-modules",
"version": "0.31.0",
"version": "0.31.1",
"type": "module",
"license": "MIT",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.44.0"
"@docknetwork/credential-sdk": "0.45.0"
},
"devDependencies": {
"@babel/cli": "^7.24.1",
Expand All @@ -41,7 +41,7 @@
"@babel/plugin-syntax-import-attributes": "^7.25.6",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@docknetwork/cheqd-blockchain-api": "0.31.0",
"@docknetwork/cheqd-blockchain-api": "0.31.1",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/credential-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @docknetwork/credential-sdk

## 0.45.0

### Minor Changes

- Fix VerifiablePresentation class potentially re-ordering credentials

## 0.44.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/credential-sdk",
"version": "0.44.0",
"version": "0.45.0",
"license": "MIT",
"type": "module",
"files": [
Expand Down
9 changes: 3 additions & 6 deletions packages/credential-sdk/src/vc/verifiable-presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class VerifiablePresentation {
}

/**
* Add a Verifiable Credential to this Presentation. Duplicates will be ignored.
* Add a Verifiable Credential to this Presentation.
* @param {object} credential - Verifiable Credential for the presentation
* @returns {VerifiablePresentation}
*/
Expand All @@ -147,16 +147,13 @@ class VerifiablePresentation {
cred = credential.toJSON();
}
ensureObjectWithId(cred, 'credential');
this.credentials = getUniqueElementsFromArray(
[...this.credentials, cred],
JSON.stringify,
);
this.credentials.push(cred);

return this;
}

/**
* Add multiple Verifiable Credentials to this Presentation. Duplicates will be ignored.
* Add multiple Verifiable Credentials to this Presentation.
* @param {Array<object>} credentials - Verifiable Credential for the presentation
* @returns {VerifiablePresentation}
*/
Expand Down
7 changes: 7 additions & 0 deletions packages/dock-blockchain-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/dock-blockchain-api

## 0.20.3

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0

## 0.20.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/dock-blockchain-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/dock-blockchain-api",
"version": "0.20.2",
"version": "0.20.3",
"license": "MIT",
"main": "./dist/esm/index.js",
"type": "module",
Expand Down Expand Up @@ -88,7 +88,7 @@
"@polkadot/api": "10.12.4"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.44.0",
"@docknetwork/credential-sdk": "0.45.0",
"@docknetwork/node-types": "^0.17.0",
"@juanelas/base64": "^1.0.5",
"@polkadot/api": "10.12.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/dock-blockchain-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @docknetwork/dock-blockchain-modules

## 0.26.3

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0

## 0.26.2

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/dock-blockchain-modules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/dock-blockchain-modules",
"version": "0.26.2",
"version": "0.26.3",
"license": "MIT",
"type": "module",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@docknetwork/credential-sdk": "0.44.0"
"@docknetwork/credential-sdk": "0.45.0"
},
"devDependencies": {
"@babel/cli": "^7.24.1",
Expand All @@ -41,7 +41,7 @@
"@babel/plugin-syntax-import-attributes": "^7.25.6",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@docknetwork/dock-blockchain-api": "0.20.2",
"@docknetwork/dock-blockchain-api": "0.20.3",
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down
10 changes: 10 additions & 0 deletions scripts/migration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @docknetwork/migration

## 0.8.1

### Patch Changes

- Updated dependencies
- @docknetwork/credential-sdk@0.45.0
- @docknetwork/cheqd-blockchain-api@0.31.1
- @docknetwork/dock-blockchain-api@0.20.3
- @docknetwork/dock-blockchain-modules@0.26.3

## 0.8.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions scripts/migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"name": "@docknetwork/migration",
"private": true,
"type": "module",
"version": "0.8.0",
"version": "0.8.1",
"scripts": {
"migrate": "babel-node src/index.js",
"did-by-id": "babel-node src/did-by-id.js",
"dock-id-to-cheqd": "babel-node src/dock-id-to-cheqd.js"
},
"dependencies": {
"@docknetwork/cheqd-blockchain-api": "0.31.0",
"@docknetwork/credential-sdk": "0.44.0",
"@docknetwork/dock-blockchain-api": "0.20.2",
"@docknetwork/dock-blockchain-modules": "0.26.2",
"@docknetwork/cheqd-blockchain-api": "0.31.1",
"@docknetwork/credential-sdk": "0.45.0",
"@docknetwork/dock-blockchain-api": "0.20.3",
"@docknetwork/dock-blockchain-modules": "0.26.3",
"p-limit": "^6.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit 73fcb65

Please sign in to comment.