Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@spruceid/didkit-wasm
Advanced tools
[![](https://img.shields.io/npm/v/@spruceid/didkit-wasm?label=%40spruceid%2Fdidkit-wasm&logo=npm)](https://www.npmjs.com/package/@spruceid/didkit-wasm) [![](https://img.shields.io/npm/v/@spruceid/didkit-wasm-node?label=%40spruceid%2Fdidkit-wasm-node&logo=
NPM packages are available but if you would like to compile DIDKit yourself (e.g. to enable different cryptographic backends) you will need the WASM compiler toolchain as well as a specific build tool:
$ rustup target add wasm32-unknown-unknown
$ cargo install wasm-pack
# OR
# $ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
WASM can be used in Node.js (any recent version):
$ npm i @spruceid/didkit-wasm-node
Or build it from source:
$ wasm-pack build --target nodejs
WASM can be used with web frameworks and bundlers like Webpack:
$ npm i @spruceid/didkit-wasm
Or build it from source:
$ wasm-pack build
If Webpack doesn't work with the default configuration, you can have a look at our configuration for tzprofiles.
WASM can be used with plain Javascript with newer browsers. As it cannot be used as a NPM package you have to build it manually:
$ wasm-pack build --target web
The manual tests in test/
serve as an example on how to import DIDKit.
The test/
directory contains manual tests to run in the browser. Instructions
are in the README of the directory.
The current version of the ring
crate does not provide all the symbols
needed to run on the browser, see DEPS.md
To compile all features plus wasm32_c
on ring
, a C compiler is needed, see
spruceid/ssi:
On Ubuntu this one option is to install clang
and llvm
:
sudo apt install clang-10 llvm-10
Then to compile with all features:
TARGET_CC=clang-10 TARGET_AR=llvm-ar-10 wasm-pack build --out-dir pkg
To use a custom subset of features:
wasm-pack build --out-dir pkg -- --no-default-features --features=issue # issue credential/presentation
wasm-pack build --out-dir pkg -- --no-default-features --features=verify # verify credential/presentation
wasm-pack build --out-dir pkg -- --no-default-features --features=credential # issue/verify credential
wasm-pack build --out-dir pkg -- --no-default-features --features=presentation # issue/verify presentation
don't forget to add TARGET_CC
and TARGET_AR
if using ring
with wasm32_c
FAQs
[![](https://img.shields.io/npm/v/@spruceid/didkit-wasm?label=%40spruceid%2Fdidkit-wasm&logo=npm)](https://www.npmjs.com/package/@spruceid/didkit-wasm) [![](https://img.shields.io/npm/v/@spruceid/didkit-wasm-node?label=%40spruceid%2Fdidkit-wasm-node&logo=
We found that @spruceid/didkit-wasm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.