diff --git a/CHANGELOG.md b/CHANGELOG.md index 166e1410..9ecd6990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # jsonld-signatures ChangeLog +## 10.0.0 - + +### Changed +- Switch back to DB's `jsonld` and `http-client`. +- Switch to Sphereon's fork `@sphereon/isomorphic-webclient` + ## 9.4.0 - 2024-01-23 ### Changed - **BREAKING**: Removed deprecated `expansionMap` param. Making this a minor diff --git a/lib/ProofSet.js b/lib/ProofSet.js index 35259f86..f0607dfc 100644 --- a/lib/ProofSet.js +++ b/lib/ProofSet.js @@ -4,7 +4,7 @@ 'use strict'; const constants = require('./constants'); -const jsonld = require('@digitalcredentials/jsonld'); +const jsonld = require('jsonld'); const {extendContextLoader, strictDocumentLoader} = require('./documentLoader'); const {serializeError} = require('serialize-error'); @@ -116,6 +116,7 @@ module.exports = class ProofSet { } else { documentLoader = strictDocumentLoader; } + try { // shallow copy to allow for removal of proof set prior to canonize document = {...document}; diff --git a/lib/purposes/ControllerProofPurpose.js b/lib/purposes/ControllerProofPurpose.js index 8e0d93c8..3b7bc196 100644 --- a/lib/purposes/ControllerProofPurpose.js +++ b/lib/purposes/ControllerProofPurpose.js @@ -4,7 +4,7 @@ 'use strict'; const constants = require('../constants'); -const jsonld = require('@digitalcredentials/jsonld'); +const jsonld = require('jsonld'); const ProofPurpose = require('./ProofPurpose'); // DID documents can be specially optimized diff --git a/lib/purposes/ProofPurpose.js b/lib/purposes/ProofPurpose.js index ff2c7399..d8c331fb 100644 --- a/lib/purposes/ProofPurpose.js +++ b/lib/purposes/ProofPurpose.js @@ -73,7 +73,7 @@ module.exports = class ProofPurpose { * @return {Promise} resolves to the proof instance (in the * `constants.SECURITY_CONTEXT_URL`. */ - async update(proof, {/*document, suite, documentLoader */}) { + async update(proof, {/*document, suite, documentLoader*/}) { proof.proofPurpose = this.term; return proof; } diff --git a/lib/sha256digest-reactnative.js b/lib/sha256digest-reactnative.js index d4012ad8..a692dd7c 100644 --- a/lib/sha256digest-reactnative.js +++ b/lib/sha256digest-reactnative.js @@ -3,7 +3,7 @@ */ 'use strict'; -const crypto = require('isomorphic-webcrypto'); +const crypto = require('@sphereon/isomorphic-webcrypto'); require('fast-text-encoding'); module.exports = { diff --git a/lib/suites/LinkedDataSignature.js b/lib/suites/LinkedDataSignature.js index 15f7e904..19860429 100644 --- a/lib/suites/LinkedDataSignature.js +++ b/lib/suites/LinkedDataSignature.js @@ -4,7 +4,7 @@ 'use strict'; const constants = require('../constants'); -const jsonld = require('@digitalcredentials/jsonld'); +const jsonld = require('jsonld'); const util = require('../util'); const {sha256digest} = require('../sha256digest'); const LinkedDataProof = require('./LinkedDataProof'); diff --git a/package.json b/package.json index ddb0f2f7..87011cf8 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ "lib/**/*.js" ], "dependencies": { + "jsonld": "digitalcredentials/jsonld.js#react-native", "@digitalbazaar/security-context": "^1.0.0", - "@digitalcredentials/jsonld": "^6.0.0", + "@sphereon/isomorphic-webcrypto": "^2.4.0-unstable.4", "fast-text-encoding": "^1.0.3", - "isomorphic-webcrypto": "^2.3.8", "serialize-error": "^8.0.1" }, "devDependencies": { @@ -68,7 +68,7 @@ "crypto": false, "./lib/sha256digest.js": "./lib/sha256digest-browser.js", "fast-text-encoding": false, - "isomorphic-webcrypto": false + "@sphereon/isomorphic-webcrypto": false }, "react-native": { "crypto": false,