npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blockialabs/ssi-crypto

v2.0.8

Published

A library providing cryptographic functions for decentralized identity and verifiable credentials.

Readme

SSI Crypto

The ssi-crypto package provides cryptographic primitives for Self-Sovereign Identity (SSI) systems. It supports key generation, signing, verification, and key management operations using industry-standard algorithms like Ed25519 and Secp256k1.

Installation

Install the package via NPM:

npm install @blockialabs/ssi-crypto

Key Components

Core Classes

  • KeyManager: Manages cryptographic keys including creation, rotation, import/export operations.
  • Signer: Provides signing and verification functionality.
  • Key: Represents cryptographic key pairs with support for Ed25519 and Secp256k1.

Algorithms

  • Ed25519Algorithm: Implementation of Ed25519 digital signature algorithm.
  • Secp256k1Algorithm: Implementation of Secp256k1 elliptic curve cryptography.
  • SigningAlgorithmFactory: Factory for creating algorithm instances.

Storage

  • VaultKeyStore: Secure key storage implementation using the SSI storage abstraction.
  • KeyRecord: Data structure for storing key metadata.

Interfaces

  • IKeyManager: Interface for key management operations.
  • ISigner: Interface for signing and verification operations.
  • IKeyStore: Interface for key storage operations.
  • ISigningAlgorithm: Interface for cryptographic algorithms.

Basic Usage

1. Setup Key Storage

Initialize the key store and algorithm factory.

import { VaultKeyStore, SigningAlgorithmFactory } from '@blockialabs/ssi-crypto';
import { MemoryStorage } from '@blockialabs/ssi-storage';

// Setup storage (you can use any IStorage implementation)
const storage = new MemoryStorage<KeyRecord>();
const keyStore = new VaultKeyStore(storage);

// Setup algorithm factory
const algorithmFactory = new SigningAlgorithmFactory();

2. Initialize Key Manager

Create a key manager instance.

import { KeyManager } from '@blockialabs/ssi-crypto';

const keyManager = new KeyManager(keyStore, algorithmFactory);

3. Initialize Signer

Create a signer instance.

import { Signer } from '@blockialabs/ssi-crypto';

const signer = new Signer(keyManager, algorithmFactory);

4. Create a Key

Generate a new cryptographic key.

const key = await signer.createKey('Ed25519');
console.log('Created key with ID:', key.kid);

5. Sign a Message

Sign a message using the created key.

const message = new TextEncoder().encode('Hello, World!');
const signature = await signer.sign(message, key);
console.log('Signature:', signature);

6. Verify a Signature

Verify the signature against the original message.

const isValid = await signer.verify(signature, message, key);
console.log('Signature is valid:', isValid);

Building

Run nx build ssi-crypto to build the library.

Running unit tests

Run nx test ssi-crypto to execute the unit tests via Jest.

Running lint

Run nx lint ssi-crypto to check if there are lint errors.

See LICENSE.