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

@eecc/es256-signature-2020

v1.2.1

Published

ES256Signature2020 Linked Data Proof suite for use with jsonld-signatures using ECDSA with P-256 curve.

Readme

ES256Signature2020 Suite

A Linked Data Signature suite for creating and verifying Data Integrity Proofs using ECDSA with the P-256 curve (ES256 algorithm).

Installation

Install from NPM:

npm i @eecc/es256-signature-2020

Usage

Signing a Verifiable Credential

import jsigs from 'jsonld-signatures';
import * as jose from 'jose';
import { ES256Signature2020 } from 'es256-signature-2020';

const { purposes: { AssertionProofPurpose } } = jsigs;

// Create an unsigned credential
const unsignedCredential = {
  '@context': [
    'https://www.w3.org/2018/credentials/v1'
  ],
  id: 'https://example.edu/credentials/3732',
  type: ['VerifiableCredential'],
  issuer: 'https://example.edu/issuers/565049',
  issuanceDate: '2020-03-10T04:24:12.164Z',
  credentialSubject: {
    id: 'did:example:ebfeb1f712ebc6f1c276e12ec21'
  }
};

// Generate an ES256 key pair
const generatedKeyPair = await jose.generateKeyPair('ES256', { extractable: true });
const privateKeyJwk = await jose.exportJWK(generatedKeyPair.privateKey);
const publicKeyJwk = await jose.exportJWK(generatedKeyPair.publicKey);

// Create a key object with DID-based identifier
const key = {
  id: 'did:web:example.com#keys-1',
  type: 'JsonWebKey2020',
  controller: 'did:web:example.com',
  privateKey: privateKeyJwk
};

// Create the suite with the key
const suite = new ES256Signature2020({ key });

// Sign the credential
const signedCredential = await jsigs.sign(unsignedCredential, {
  suite,
  purpose: new AssertionProofPurpose(),
  documentLoader
});

console.log(JSON.stringify(signedCredential, null, 2));

Result:

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "id": "https://example.edu/credentials/3732",
  "type": ["VerifiableCredential"],
  "issuer": "https://example.edu/issuers/565049",
  "issuanceDate": "2020-03-10T04:24:12.164Z",
  "credentialSubject": {
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21"
  },
  "proof": {
    "type": "JsonWebSignature2020",
    "created": "2024-11-06T10:23:45Z",
    "verificationMethod": "did:web:example.com#keys-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "z3QJPuVjHMfKMVvnvP3YdKNZvxVj5xGc..."
  }
}

Verifying a Signed Credential

import jsigs from 'jsonld-signatures';
import { ES256Signature2020 } from 'es256-signature-2020';

const { purposes: { AssertionProofPurpose } } = jsigs;

// The signed credential from above
const signedCredential = { /* ... */ };

// Create a verification suite
const suite = new ES256Signature2020();

// Verify the credential
const result = await jsigs.verify(signedCredential, {
  suite,
  purpose: new AssertionProofPurpose(),
  documentLoader
});

console.log('Verified:', result.verified); // true

Compatibility

This library is compatible with @digitalbazaar/ecdsa-multikey for P-256 curve keys. You can use EcdsaMultikey key pairs with this signature suite, as demonstrated in our test suite.

Licence

BSD 3-Clause License © 2025 European EPC Competence Center GmbH