jsonld-signatures
Advanced tools
Comparing version 11.2.1 to 11.3.0
/*! | ||
* Copyright (c) 2017-2023 Digital Bazaar, Inc. All rights reserved. | ||
* Copyright (c) 2017-2024 Digital Bazaar, Inc. All rights reserved. | ||
*/ | ||
@@ -8,2 +8,3 @@ 'use strict'; | ||
const jsonld = require('jsonld'); | ||
const rdfCanonize = require('rdf-canonize'); | ||
const util = require('../util'); | ||
@@ -216,4 +217,4 @@ const {sha256digest} = require('../sha256digest'); | ||
} | ||
return jsonld.canonize(input, { | ||
algorithm: 'URDNA2015', | ||
return _canonize(input, { | ||
algorithm: 'RDFC-1.0', | ||
// do not resolve any relative URLs or terms, throw errors instead | ||
@@ -465,1 +466,10 @@ base: null, | ||
} | ||
async function _canonize(input, options) { | ||
// convert to RDF dataset and do canonicalization | ||
const opts = {...options}; | ||
delete opts.format; | ||
opts.produceGeneralizedRdf = false; | ||
const dataset = await jsonld.toRDF(input, opts); | ||
return rdfCanonize.canonize(dataset, options); | ||
} |
{ | ||
"name": "jsonld-signatures", | ||
"version": "11.2.1", | ||
"version": "11.3.0", | ||
"description": "An implementation of the Linked Data Signatures specifications for JSON-LD in JavaScript.", | ||
@@ -33,2 +33,3 @@ "homepage": "https://github.com/digitalbazaar/jsonld-signatures", | ||
"jsonld": "^8.0.0", | ||
"rdf-canonize": "^4.0.1", | ||
"serialize-error": "^8.1.0" | ||
@@ -55,3 +56,3 @@ }, | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=18" | ||
}, | ||
@@ -58,0 +59,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67804
1535
4
+ Addedrdf-canonize@^4.0.1
+ Addedrdf-canonize@4.0.1(transitive)