Skip to content

Commit

Permalink
Support signing @direction w/LinkedDataSignature.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Dec 17, 2024
1 parent 3577088 commit b8909de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# jsonld-signatures ChangeLog

## 11.5.0 - 2024-12-dd

### Added
- Add support for signing `@direction` in documents when using the
base `LinkedDataSignature` class. Other cryptosuites may already
support `@direction` if they were not using this class.

## 11.4.0 - 2024-12-15

### Added
Expand Down
5 changes: 3 additions & 2 deletions lib/suites/LinkedDataSignature.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,10 @@ function _processSignatureParams({key, signer, verifier}) {

async function _canonize(input, options) {
// convert to RDF dataset and do canonicalization
const opts = {...options};
const opts = {
rdfDirection: 'i18n-datatype', ...options, produceGeneralizedRdf: false,
};
delete opts.format;
opts.produceGeneralizedRdf = false;
const dataset = await jsonld.toRDF(input, opts);
return rdfCanonize.canonize(dataset, options);
}

0 comments on commit b8909de

Please sign in to comment.