Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@digitalcredentials/jsonld-signatures

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalcredentials/jsonld-signatures - npm Package Compare versions

Comparing version 11.0.0 to 12.0.0

6

lib/sha256digest-reactnative.js
/*
* Copyright (c) 2025 Digital Credentials Consortium - React Native addition.
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.

@@ -6,3 +7,3 @@ */

const crypto = require('@sphereon/isomorphic-webcrypto');
import * as Crypto from 'expo-crypto';
require('fast-text-encoding');

@@ -21,5 +22,4 @@

return new Uint8Array(
await crypto.subtle.digest({name: 'SHA-256'}, bytes)
);
await Crypto.digest(Crypto.CryptoDigestAlgorithm.SHA256, bytes));
}
};
{
"name": "@digitalcredentials/jsonld-signatures",
"version": "11.0.0",
"version": "12.0.0",
"description": "An implementation of the Linked Data Signatures specifications for JSON-LD in JavaScript.",

@@ -19,3 +19,2 @@ "homepage": "https://github.com/digitalcredentials/jsonld-signatures",

"@digitalbazaar/security-context": "^1.0.0",
"@sphereon/isomorphic-webcrypto": "^2.5.0-unstable.0",
"fast-text-encoding": "^1.0.3",

@@ -71,4 +70,5 @@ "serialize-error": "^8.0.1"

"./lib/sha256digest.js": "./lib/sha256digest-browser.js",
"./lib/sha256digest-reactnative.js": false,
"fast-text-encoding": false,
"@sphereon/isomorphic-webcrypto": false
"expo-crypto": false
},

@@ -75,0 +75,0 @@ "react-native": {

@@ -17,19 +17,5 @@ # JSON-LD Signatures _(@digitalcredentials/jsonld-signatures)_

## Version Compatibility
(Forked from [`jsonld-signatures` v9.0.0](https://github.com/digitalbazaar/jsonld-signatures)
to provide TypeScript compatibility.)
to provide TypeScript, Jest, and React Native compatibility.)
`jsonld-signatures` **v9.0** is compatible with the following signature suites:
* [`ed25519-signature-2020`](https://github.com/digitalcredentials/ed25519-signature-2020)
`>= 2.1.0`.
and the following related libraries:
* `crypto-ld` `>= 5.0.0` (and related key crypto suites such as
[`ed25519-verification-key-2020`](https://github.com/digitalbazaar/ed25519-verification-key-2020)
`>= 2.1.0`).
* `@digitalcredentials/vc` `>= 1.0`
## Background

@@ -65,3 +51,3 @@

working with those, you should use a higher-level library that's specifically
made for that purpose, such as [`@digitalcredentials/vc`](https://github.com/digitalcredentials/vc-js).
made for that purpose, such as [`@digitalcredentials/vc`](https://github.com/digitalcredentials/vc).
(Incidentally, `vc-js` uses this library, `jsonld-signatures`, under the hood.)

@@ -116,3 +102,18 @@

`jsonld-signatures` (version `8.x` and above) is not meant for standalone use.
### React Native Usage
This library depends on `expo-crypto` when used inside React Native projects.
That means you must add `expo-crypto` to your project's dependencies.
Sample `package.json`:
```
"dependencies": {
"expo-crypto": "~12.8.0"
}
```
### Node.js and Browser Usage
`jsonld-signatures` (version `12.x` and above) is not meant for standalone use.
Instead, it's generally used through an individual _crypto suite_.

@@ -143,9 +144,2 @@ For detailed usage instructions, see the READMEs of the supported suites:

### Node.js Native Canonize Bindings
Specialized use cases may wish to use the native canonize bindings. This mode
can be enabled by setting the `useNativeCanonize` option to `true`. See the
[jsonld.js notes](https://github.com/digitalbazaar/jsonld.js#nodejs-native-canonize-bindings)
on this feature and note you should benchmark performance before using it.
## Contribute

@@ -152,0 +146,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc