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

@smartledger/lumen-signatures

v1.0.2

Published

BSV-ECDSA-DER cryptographic signatures for LumenChat agent verification

Readme

@lumenchat/signatures

BSV-ECDSA-DER cryptographic signatures for LumenChat agent verification.

Features

  • Key Generation: Generate cryptographic keys for agents and platforms
  • Signing: Create DER-encoded ECDSA signatures
  • Verification: Verify signatures against public keys
  • Envelopes: Wrap data with cryptographic proof
  • Agent Identity: Unique cryptographic identity per agent session

Installation

npm install @lumenchat/signatures

Usage

Generate Keys

import { generateKeys } from '@lumenchat/signatures';

const keys = generateKeys();
// {
//   privateKey: 'L5oLkpV...',  // WIF format
//   publicKey: '02abc123...',  // Hex
//   address: '1ABC...'         // BSV address
// }

Create Agent Keys

import { createAgentKeys } from '@lumenchat/signatures';

const agentKeys = createAgentKeys('MyAgent');
// {
//   privateKey: '...',
//   publicKey: '...',
//   address: '...',
//   agentName: 'MyAgent',
//   created: '2025-11-20T...'
// }

Sign Data

import { signData } from '@lumenchat/signatures';

const signature = signData('Hello World', keys.privateKey);
// '304402207bdb86a9be5e...' (DER hex)

Verify Signature

import { verifySignature } from '@lumenchat/signatures';

const isValid = verifySignature('Hello World', signature, keys.publicKey);
// true

Create Signed Envelope

import { createSignedEnvelope } from '@lumenchat/signatures';

const envelope = createSignedEnvelope(
  { message: 'Hello' },
  agentKeys,
  { agentIdentity: 'MyAgent-session-123' }
);

// {
//   data: { message: 'Hello' },
//   _signature: {
//     signature: '3044022...',
//     publicKey: '02abc...',
//     address: '1XYZ...',
//     timestamp: '2025-11-20T...',
//     algorithm: 'BSV-ECDSA-DER',
//     responseHash: 'a1b2c3...',
//     agentIdentity: 'MyAgent-session-123'
//   }
// }

Verify Signed Envelope

import { verifySignedEnvelope } from '@lumenchat/signatures';

const result = verifySignedEnvelope(envelope);
// {
//   verified: true,
//   publicKey: '02abc...',
//   address: '1XYZ...',
//   agentIdentity: 'MyAgent-session-123',
//   timestamp: '2025-11-20T...'
// }

API Reference

generateKeys()

Generate new cryptographic keys.

Returns: { privateKey, publicKey, address }

createAgentKeys(agentName, options)

Create agent-specific keys with metadata.

Parameters:

  • agentName (string): Agent identifier
  • options (object): Additional metadata

Returns: { privateKey, publicKey, address, agentName, created, ...options }

signData(data, privateKeyWIF)

Sign data using BSV-ECDSA-DER.

Parameters:

  • data (string): Data to sign
  • privateKeyWIF (string): Private key in WIF format

Returns: string - DER-encoded signature (hex)

verifySignature(data, signatureHex, publicKey)

Verify a signature.

Parameters:

  • data (string): Original data
  • signatureHex (string): DER signature in hex
  • publicKey (string): Public key

Returns: boolean

createSignedEnvelope(data, agentKey, metadata)

Wrap data with cryptographic signature.

Parameters:

  • data (string|object): Data to sign
  • agentKey (object): Agent keys with privateKey, publicKey, address
  • metadata (object): Optional metadata

Returns: { data, _signature }

verifySignedEnvelope(envelope)

Verify a signed envelope.

Parameters:

  • envelope (object): Signed envelope

Returns: { verified, publicKey, address, agentIdentity, timestamp }

initializePlatformKeys()

Initialize platform keys from PLATFORM_PRIVATE_KEY env var or generate new ones.

Returns: { privateKey, publicKey, address }

License

PROPRIETARY - Copyright © 2025 Gregory J. Ward and SmartLedger.Technology