Skip to content

Commit

Permalink
Miscellaneous reconciliations
Browse files Browse the repository at this point in the history
  • Loading branch information
kezike authored and dmitrizagidulin committed Aug 4, 2024
1 parent 13c710f commit fb5a62e
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 167 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ npm-debug.log
package-lock.json
.nyc_output
dist
.idea
129 changes: 45 additions & 84 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
# @digitalcredentials/vc ChangeLog

## 8.0.0 - 2024-08-03
## 8.0.0 - 2024-xx-xx

### Added
- Add support for VC 2.0 Verifiable Credentials issuance and verification.
- Add support for VC 2.0 Verifiable Presentations issuance and verification.
- Add support for VC 2.0 `validFrom` and `validUntil`.
- Add Test vectors for VC 2.0 VCs & VPs.
- Allow `credentialStatus` arrays in credential status check.
- Add `derive()` API for deriving new verifiable credentials from
existing ones, for the purpose of selective disclosure or
unlinkable presentation.
- Add optional param `now` to `verifyCredential()`, `createPresentation()`,
`verify()`, and `issue()`.

### Changed
- **BREAKING**: Switch dependencies to:
- `@digitalcredentials/jsonld`
- `@digitalcredentials/jsonld-signatures`
- `@digitalcredentials/http-client`
- **BREAKING**: Switch dependencies to:
- `@digitalcredentials/jsonld`
- `@digitalcredentials/jsonld-signatures`
- `@digitalcredentials/http-client`
- **BREAKING**: Default issuance now uses VC 2.0 context.
- **BREAKING**: DateTime validator is now an xml schema DateTime validator.
- Change `engines.node` to `>=18` to support newer keys & suites.
- Update dependencies.
- **BREAKING**: Remove support for `expansionMap`. (Removed in dependencies.)
- **BREAKING**: Use `jsonld-signatures@11` and `jsonld@8` to get new `safe`
mode (and on by default when using `canonize`) feature.
- **BREAKING**: Check if credential has expired when `expirationDate` property
exists.
- **BREAKING**: Convert to module (ESM).
- **BREAKING**: Require Node.js >=14.
- Update dependencies.
- **BREAKING**: `[email protected]` used in tests.
- Lint module.

### Fixed
- Ensure that `issuanceDate` is only checked on verification,
not issuance.
- Fix bug with option overrides for verifying presentations.

### Removed
- **BREAKING**: Remove ODRL and VC examples contexts from `./lib/contexts/` and
from the default document loader. The contexts are now available in
[`@digitalbazaar/odrl-context`](https://github.com/digitalbazaar/odrl-context)
and
[`@digitalbazaar/credentials-examples-context`](https://github.com/digitalbazaar/credentials-examples-context).

## 7.0.0 - 2024-02-07
### Changed
Expand Down Expand Up @@ -62,85 +101,7 @@

Version skipped to match upstream.

## 7.0.0 -

### Added
- Add support for VC 2.0 Verifiable Credentials issuance and verification.
- Add support for VC 2.0 Verifiable Presentations issuance and verification.
- Add support for VC 2.0 `validFrom` and `validUntil`.
- Add Test vectors for VC 2.0 VCs & VPs.

### Changed
- **BREAKING**: Default issuance now uses VC 2.0 context.
- **BREAKING**: DateTime validator is now an xml schema DateTime validator.

## 6.3.0 - 2023-xx-xx

### Changed
- Change `engines.node` to `>=18` to support newer keys & suites.

## 6.2.0 - 2023-11-14

### Added
- Allow `credentialStatus` arrays in credential status check.

## 6.1.0 - 2023-11-13

### Added
- Add `derive()` API for deriving new verifiable credentials from
existing ones, for the purpose of selective disclosure or
unlinkable presentation.

## 6.0.2 - 2023-08-04

### Fixed
- Ensure that `issuanceDate` is only checked on verification,
not issuance.

## 6.0.1 - 2023-03-17

### Fixed
- Fix bug with option overrides for verifying presentations.

## 6.0.0 - 2023-01-17

### Removed
- **BREAKING**: Remove ODRL and VC examples contexts from `./lib/contexts/` and
from the default document loader. The contexts are now available in
[`@digitalbazaar/odrl-context`](https://github.com/digitalbazaar/odrl-context)
and
[`@digitalbazaar/credentials-examples-context`](https://github.com/digitalbazaar/credentials-examples-context).

### Changed
- Update dependencies.
- **BREAKING**: Remove support for `expansionMap`. (Removed in dependencies.)

## 5.0.0 - 2022-08-24

### Changed
- **BREAKING**: Use `jsonld-signatures@11` and `jsonld@8` to get new `safe`
mode (and on by default when using `canonize`) feature.

## 4.0.0 - 2022-06-23

### Changed
- **BREAKING**: Check if credential has expired when `expirationDate` property
exists.

### Added
- Add optional param `now` to `verifyCredential()`, `createPresentation()`,
`verify()`, and `issue()`.

## 3.0.0 - 2022-06-15

### Changed
- **BREAKING**: Convert to module (ESM).
- **BREAKING**: Require Node.js >=14.
- Update dependencies.
- **BREAKING**: `[email protected]` used in tests.
- Lint module.

## 2.1.0 - 2021-12-20
## 2.1.0 - 2021-xx-xx

### Changed
- Sync VC example context from vc-data-model spec source.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ npm install @digitalbazaar/vc
To install locally (for development):

```
git clone https://github.com/digitalcredentials/vc-js.git
cd vc-js
git clone https://github.com/digitalcredentials/vc.git
cd vc
npm install
```

Expand Down
9 changes: 8 additions & 1 deletion karma.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ module.exports = function(config) {

webpack: {
mode: 'development',
devtool: 'inline-source-map'
devtool: 'inline-source-map',
resolve: {
fallback: {
crypto: false,
url: false,
util: false
}
}
},

// test results reporter to use
Expand Down
8 changes: 4 additions & 4 deletions lib/CredentialIssuancePurpose.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* Copyright (c) 2019-2023 Digital Bazaar, Inc. All rights reserved.
*/
'use strict';
const jsonld = require('@digitalcredentials/jsonld');
const {AssertionProofPurpose} =
require('@digitalcredentials/jsonld-signatures').purposes;
import jsigs from '@digitalcredentials/jsonld-signatures';
import jsonld from '@digitalcredentials/jsonld';

const {purposes: {AssertionProofPurpose}} = jsigs;

/**
* Creates a proof purpose that will validate whether the verification
Expand Down
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@digitalcredentials/ed25519-signature-2020": "^5.0.0",
"@digitalcredentials/security-document-loader": "digitalcredentials/security-document-loader#add-vc-2.0-context",
"@npmcli/package-json": "^5.0.0",
"c8": "^8.0.1",
"chai": "^4.3.7",
"cross-env": "^7.0.3",
"did-context": "^3.1.1",
Expand All @@ -65,19 +64,27 @@
"klona": "^2.0.6",
"mocha": "^10.2.0",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"rollup": "^2.77.2",
"uuid": "^9.0.0",
"veres-one-context": "^12.0.0",
"webpack": "^5.75.0"
},
"c8": {
"nyc": {
"exclude": [
"test"
],
"reporter": [
"lcov",
"text-summary",
"text"
"html",
"text-summary"
]
},
"browser": {
"Buffer": false,
"crypto": false,
"util": false
},
"engines": {
"node": ">=18"
},
Expand All @@ -99,9 +106,9 @@
"pretest": "node pre-test.js",
"rebuild": "npm run clear && npm run build",
"test": "npm run test-node",
"test-node": "cross-env NODE_ENV=test mocha -b --preserve-symlinks -t 10000 test/*.spec.js",
"test-karma": "karma start karma.conf.js",
"lint": "eslint lib test/*.spec.js",
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 10000 test/*.spec.js",
"test-karma": "karma start karma.conf.cjs",
"lint": "eslint 'lib/**/*.js' 'test/**/*.js'",
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm run test-node",
"coverage-ci": "cross-env NODE_ENV=test nyc --reporter=lcovonly npm run test-node",
"coverage-report": "nyc report"
Expand Down
67 changes: 0 additions & 67 deletions test/20-checkStatus.spec.js

This file was deleted.

0 comments on commit fb5a62e

Please sign in to comment.